summaryrefslogtreecommitdiff
path: root/compiler/main/DriverPipeline.hs
diff options
context:
space:
mode:
authorGeoffrey Mainland <gmainlan@microsoft.com>2013-09-16 12:27:37 -0400
committerGeoffrey Mainland <gmainlan@microsoft.com>2013-09-22 22:34:00 -0400
commit1ed36c54d50e0e97aee95d15d674f95cabab0b77 (patch)
tree3f3b2ebd3459328dbcad5e3f03eaaea85edbef76 /compiler/main/DriverPipeline.hs
parentd2b95264c97b3d7786b359fbf04fb297a160daa3 (diff)
downloadhaskell-1ed36c54d50e0e97aee95d15d674f95cabab0b77.tar.gz
Enable -msse to be specified by itself.
This sets the SSE "version" to 1.0.
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r--compiler/main/DriverPipeline.hs11
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 63f203aaf5..44a6fa57a1 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1414,6 +1414,7 @@ runPhase (RealPhase LlvmLlc) input_fn dflags
sseOpts | isSse4_2Enabled dflags = ["-mattr=+sse42"]
| isSse2Enabled dflags = ["-mattr=+sse2"]
+ | isSseEnabled dflags = ["-mattr=+sse"]
| otherwise = []
avxOpts | isAvx512fEnabled dflags = ["-mattr=+avx512f"]
@@ -2033,12 +2034,10 @@ doCpp dflags raw input_fn output_fn = do
-- remember, in code we *compile*, the HOST is the same our TARGET,
-- and BUILD is the same as our HOST.
- let sse2 = isSse2Enabled dflags
- sse4_2 = isSse4_2Enabled dflags
- sse_defs =
- [ "-D__SSE__=1" | sse2 || sse4_2 ] ++
- [ "-D__SSE2__=1" | sse2 || sse4_2 ] ++
- [ "-D__SSE4_2__=1" | sse4_2 ]
+ let sse_defs =
+ [ "-D__SSE__=1" | isSseEnabled dflags ] ++
+ [ "-D__SSE2__=1" | isSse2Enabled dflags ] ++
+ [ "-D__SSE4_2__=1" | isSse4_2Enabled dflags ]
let avx_defs =
[ "-D__AVX__=1" | isAvxEnabled dflags ] ++