aboutsummaryrefslogtreecommitdiff
path: root/clang/test
diff options
context:
space:
mode:
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-12-04 10:02:36 +0000
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>2013-12-04 10:02:36 +0000
commit50e0cddf3e7d7cb5a325d3c44387598997b416c4 (patch)
treeabd08161e6ad0ee163a597fc1475bf0b98026941 /clang/test
parent8ee6edbc6dfd334ebf62b7256de8b68b864dc3bd (diff)
downloadllvm-50e0cddf3e7d7cb5a325d3c44387598997b416c4.zip
llvm-50e0cddf3e7d7cb5a325d3c44387598997b416c4.tar.gz
llvm-50e0cddf3e7d7cb5a325d3c44387598997b416c4.tar.bz2
Merging r196370:
------------------------------------------------------------------------ r196370 | rsandifo | 2013-12-04 09:59:57 +0000 (Wed, 04 Dec 2013) | 14 lines [SystemZ] Fix handling of pass-by-pointer arguments I'd misunderstood getIndirect() to mean that the argument should be passed as a pointer at the ABI level, with the ByVal argument choosing caller-copy semantics over no-caller-copy (callee-copy-on-write) semantics. But getIndirect(x) actually means that x is passed by pointer at the IR level but (at least on all other targets I looked at) directly at the ABI level. getIndirect(x, false) selects a pointer to a caller-made copy, which is what SystemZ was aiming for. This fixes a miscompilation of c-index-test. Structure arguments were being passed by pointer, but no copy was being made, so a write in the callee stomped over a caller's local variable. ------------------------------------------------------------------------ llvm-svn: 196371
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGen/systemz-inline-asm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/test/CodeGen/systemz-inline-asm.c b/clang/test/CodeGen/systemz-inline-asm.c
index eb0f912..c937233 100644
--- a/clang/test/CodeGen/systemz-inline-asm.c
+++ b/clang/test/CodeGen/systemz-inline-asm.c
@@ -123,7 +123,7 @@ double test_f64(double f, double g) {
long double test_f128(long double f, long double g) {
asm("axbr %0, %2" : "=f" (f) : "0" (f), "f" (g));
return f;
-// CHECK: define void @test_f128(fp128* noalias nocapture sret [[DEST:%.*]], fp128* byval nocapture readonly, fp128* byval nocapture readonly)
+// CHECK: define void @test_f128(fp128* noalias nocapture sret [[DEST:%.*]], fp128* nocapture readonly, fp128* nocapture readonly)
// CHECK: %f = load fp128* %0
// CHECK: %g = load fp128* %1
// CHECK: [[RESULT:%.*]] = tail call fp128 asm "axbr $0, $2", "=f,0,f"(fp128 %f, fp128 %g)