OSDN Git Service

Set trunc store action to Expand for all X86 targets.
authorBob Wilson <bob.wilson@apple.com>
Tue, 9 Sep 2014 01:13:36 +0000 (01:13 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 9 Sep 2014 01:13:36 +0000 (01:13 +0000)
commit086832979ba34527c4fe97f75037a7e87089fcb4
tree3793c4b2e956cafa622db4e91a865a01f2c12555
parent0acb48923d89a1cecc39836016d6183c0449a3fe
Set trunc store action to Expand for all X86 targets.

When compiling without SSE2, isTruncStoreLegal(F64, F32) would return Legal, whereas with SSE2 it would return Expand. And since the Target doesn't seem to actually handle a truncstore for double -> float, it would just output a store of a full double in the space for a float hence overwriting other bits on the stack.

Patch by Luqman Aden!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217410 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
test/CodeGen/X86/dont-trunc-store-double-to-float.ll [new file with mode: 0644]