aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PowerPC/stfiwx-2.ll
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2013-04-01 17:52:07 +0000
committerHal Finkel <hfinkel@anl.gov>2013-04-01 17:52:07 +0000
commit46479197843ecb651adc9417c49bbd1b00acfcb6 (patch)
tree143df888333c2baabf6cf07c8ef7297b86b5035c /test/CodeGen/PowerPC/stfiwx-2.ll
parenta1f4290ac94f34173e3561c717390de07dccc646 (diff)
downloadexternal_llvm-46479197843ecb651adc9417c49bbd1b00acfcb6.zip
external_llvm-46479197843ecb651adc9417c49bbd1b00acfcb6.tar.gz
external_llvm-46479197843ecb651adc9417c49bbd1b00acfcb6.tar.bz2
Add more PPC floating-point conversion instructions
The P7 and A2 have additional floating-point conversion instructions which allow a direct two-instruction sequence (plus load/store) to convert from all combinations (signed/unsigned i32/i64) <--> (float/double) (on previous cores, only some combinations were directly available). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/PowerPC/stfiwx-2.ll')
-rw-r--r--test/CodeGen/PowerPC/stfiwx-2.ll9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/CodeGen/PowerPC/stfiwx-2.ll b/test/CodeGen/PowerPC/stfiwx-2.ll
index c49b25c..345f1c9 100644
--- a/test/CodeGen/PowerPC/stfiwx-2.ll
+++ b/test/CodeGen/PowerPC/stfiwx-2.ll
@@ -1,11 +1,14 @@
-; This cannot be a stfiwx
-; RUN: llc < %s -march=ppc32 -mcpu=g5 | grep stb
-; RUN: llc < %s -march=ppc32 -mcpu=g5 | not grep stfiwx
+; RUN: llc < %s -march=ppc32 -mcpu=g5 | FileCheck %s
define void @test(float %F, i8* %P) {
%I = fptosi float %F to i32
%X = trunc i32 %I to i8
store i8 %X, i8* %P
ret void
+; CHECK: fctiwz 0, 1
+; CHECK: stfiwx 0, 0, 4
+; CHECK: lwz 4, 12(1)
+; CHECK: stb 4, 0(3)
+; CHECK: blr
}