Commit 571ecdd8 authored by tibbe's avatar tibbe

If -msse is specified, pass it to the LLVM backend

parent b7189de7
......@@ -1436,7 +1436,8 @@ runPhase LlvmLlc input_fn dflags
++ map SysTools.Option lc_opts
++ [SysTools.Option tbaa]
++ map SysTools.Option fpOpts
++ map SysTools.Option abiOpts)
++ map SysTools.Option abiOpts
++ map SysTools.Option sseOpts)
return (next_phase, output_fn)
where
......@@ -1462,6 +1463,10 @@ runPhase LlvmLlc input_fn dflags
ArchARM ARMv7 _ _ -> []
_ -> []
sseOpts | isSse4_2Enabled dflags = ["-mattr=+sse42"]
| isSse2Enabled dflags = ["-mattr=+sse2"]
| otherwise = []
-----------------------------------------------------------------------------
-- LlvmMangle phase
......
......@@ -3410,6 +3410,10 @@ makeDynFlagsConsistent dflags
-- -----------------------------------------------------------------------------
-- SSE
-- TODO: Instead of using a separate predicate (i.e. isSse2Enabled) to
-- check if SSE is enabled, we might have x86-64 imply the -msse2
-- flag.
isSse2Enabled :: DynFlags -> Bool
isSse2Enabled dflags = case platformArch (targetPlatform dflags) of
ArchX86_64 -> -- SSE2 is fixed on for x86_64. It would be
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment