diff options
author | Geoffrey Mainland <gmainlan@microsoft.com> | 2013-02-14 21:25:54 +0000 |
---|---|---|
committer | Geoffrey Mainland <gmainlan@microsoft.com> | 2013-09-22 22:33:59 -0400 |
commit | afdb2fc3d2013ced6c136853f4e24e84b6f150e9 (patch) | |
tree | 0ceb0b40d4e27ea60cf5337150edcef184e58fbd /compiler/main/DriverPipeline.hs | |
parent | e074c1c23307649bd2d240d40a73d3829b06a4b4 (diff) | |
download | haskell-afdb2fc3d2013ced6c136853f4e24e84b6f150e9.tar.gz |
Set LLVM option -stack-alignment=32 when compiling AVX instructions.
Diffstat (limited to 'compiler/main/DriverPipeline.hs')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index a123564984..76f6186443 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1381,7 +1381,8 @@ runPhase (RealPhase LlvmLlc) input_fn dflags ++ map SysTools.Option fpOpts ++ map SysTools.Option abiOpts ++ map SysTools.Option sseOpts - ++ map SysTools.Option avxOpts) + ++ map SysTools.Option avxOpts + ++ map SysTools.Option stackAlignOpts) return (RealPhase next_phase, output_fn) where @@ -1418,6 +1419,11 @@ runPhase (RealPhase LlvmLlc) input_fn dflags | isAvxEnabled dflags = ["-mattr=+avx"] | otherwise = [] + stackAlignOpts = + case platformArch (targetPlatform dflags) of + ArchX86_64 | isAvxEnabled dflags -> ["-stack-alignment=32"] + _ -> [] + ----------------------------------------------------------------------------- -- LlvmMangle phase |