summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/asm-constraints.ll
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2016-03-24 21:04:52 +0000
committerEric Christopher <echristo@gmail.com>2016-03-24 21:04:52 +0000
commitb979d51afae8d9684e29884b8d12080399e0bbfa (patch)
treef3531e6771b60bbd397cb0de948c279224f667bd /llvm/test/CodeGen/PowerPC/asm-constraints.ll
parent8c95d53d45961d1e0d9463b1c6285d01d96fe761 (diff)
downloadbcm5719-llvm-b979d51afae8d9684e29884b8d12080399e0bbfa.tar.gz
bcm5719-llvm-b979d51afae8d9684e29884b8d12080399e0bbfa.zip
Finish the incomplete 'd' inline asm constraint support for PPC by
making sure we give it a register and mark it as a register constraint. llvm-svn: 264340
Diffstat (limited to 'llvm/test/CodeGen/PowerPC/asm-constraints.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/asm-constraints.ll32
1 files changed, 31 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/PowerPC/asm-constraints.ll b/llvm/test/CodeGen/PowerPC/asm-constraints.ll
index 888c49bf1ab..e7b6366bf99 100644
--- a/llvm/test/CodeGen/PowerPC/asm-constraints.ll
+++ b/llvm/test/CodeGen/PowerPC/asm-constraints.ll
@@ -37,7 +37,37 @@ entry:
ret void
}
-attributes #0 = { nounwind "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "unsafe-fp-math"="false" "use-soft-float"="false" }
+; Function Attrs: nounwind
+; Check that we accept the 'd' constraint.
+; Generated from the following C code:
+; int foo(double x) {
+; int64_t result;
+; __asm__ __volatile__("fctid %0, %1"
+; : "=d"(result)
+; : "d"(x)
+; : /* No clobbers */);
+; return result;
+; }
+define signext i32 @bar(double %x) #0 {
+
+; CHECK-LABEL: @bar
+; CHECK: fctid 0, 1
+entry:
+ %x.addr = alloca double, align 8
+ %result = alloca i64, align 8
+ store double %x, double* %x.addr, align 8
+ %0 = load double, double* %x.addr, align 8
+ %1 = call i64 asm sideeffect "fctid $0, $1", "=d,d"(double %0) #1, !srcloc !1
+ store i64 %1, i64* %result, align 8
+ %2 = load i64, i64* %result, align 8
+ %conv = trunc i64 %2 to i32
+ ret i32 %conv
+}
+
+
+attributes #0 = { nounwind "disable-tail-calls"="false" "less-precise-fpmad"="false" "no-frame-pointer-elim"="true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="ppc64le" "target-features"="+altivec,+bpermd,+crypto,+direct-move,+extdiv,+power8-vector,+vsx,-qpx" "unsafe-fp-math"="false" "use-soft-float"="false" }
+
attributes #1 = { nounwind }
!0 = !{i32 67, i32 91, i32 110, i32 126}
+!1 = !{i32 84}
OpenPOWER on IntegriCloud