diff options
author | Chris Lattner <sabre@nondot.org> | 2008-01-17 19:59:44 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-01-17 19:59:44 +0000 |
commit | 3bc0850bd4beeec5b464fce8513d3c749ee413eb (patch) | |
tree | ccfaeb8139d4ccbaee5c9bb214958ba9b805dc56 /test/CodeGen/X86 | |
parent | 38aa47580ab5d7bfd05fb08be9f284a63bbbd571 (diff) | |
download | external_llvm-3bc0850bd4beeec5b464fce8513d3c749ee413eb.zip external_llvm-3bc0850bd4beeec5b464fce8513d3c749ee413eb.tar.gz external_llvm-3bc0850bd4beeec5b464fce8513d3c749ee413eb.tar.bz2 |
This commit changes:
1. Legalize now always promotes truncstore of i1 to i8.
2. Remove patterns and gunk related to truncstore i1 from targets.
3. Rename the StoreXAction stuff to TruncStoreAction in TLI.
4. Make the TLI TruncStoreAction table a 2d table to handle from/to conversions.
5. Mark a wide variety of invalid truncstores as such in various targets, e.g.
X86 currently doesn't support truncstore of any of its integer types.
6. Add legalize support for truncstores with invalid value input types.
7. Add a dag combine transform to turn store(truncate) into truncstore when
safe.
The later allows us to compile CodeGen/X86/storetrunc-fp.ll to:
_foo:
fldt 20(%esp)
fldt 4(%esp)
faddp %st(1)
movl 36(%esp), %eax
fstps (%eax)
ret
instead of:
_foo:
subl $4, %esp
fldt 24(%esp)
fldt 8(%esp)
faddp %st(1)
fstps (%esp)
movl 40(%esp), %eax
movss (%esp), %xmm0
movss %xmm0, (%eax)
addl $4, %esp
ret
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46140 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86')
-rw-r--r-- | test/CodeGen/X86/storetrunc-fp.ll | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/X86/storetrunc-fp.ll b/test/CodeGen/X86/storetrunc-fp.ll new file mode 100644 index 0000000..655cbd6 --- /dev/null +++ b/test/CodeGen/X86/storetrunc-fp.ll @@ -0,0 +1,8 @@ +; RUN: llvm-as < %s | llc -march=x86 | not grep flds + +define void @foo(x86_fp80 %a, x86_fp80 %b, float* %fp) { + %c = add x86_fp80 %a, %b + %d = fptrunc x86_fp80 %c to float + store float %d, float* %fp + ret void +} |