[llvm-commits] [llvm] r55858 - /llvm/trunk/test/FrontendC/2008-01-25-ByValReadNone.c
Duncan Sands
baldrick at free.fr
Fri Sep 5 14:34:33 PDT 2008
Author: baldrick
Date: Fri Sep 5 16:34:32 2008
New Revision: 55858
URL: http://llvm.org/viewvc/llvm-project?rev=55858&view=rev
Log:
Prevent our own passes from promoting this to
readonly.
Modified:
llvm/trunk/test/FrontendC/2008-01-25-ByValReadNone.c
Modified: llvm/trunk/test/FrontendC/2008-01-25-ByValReadNone.c
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2008-01-25-ByValReadNone.c?rev=55858&r1=55857&r2=55858&view=diff
==============================================================================
--- llvm/trunk/test/FrontendC/2008-01-25-ByValReadNone.c (original)
+++ llvm/trunk/test/FrontendC/2008-01-25-ByValReadNone.c Fri Sep 5 16:34:32 2008
@@ -10,6 +10,6 @@
// temporary when inlining such a function, which is costly for
// the common case in which the byval argument is not written.
struct S { int A[1000]; };
-int __attribute__ ((const)) f(struct S x) { return x.A[0]; }
+int __attribute__ ((const)) f(struct S x) { x.A[1] = 0; return x.A[0]; }
int g(struct S x) __attribute__ ((pure));
int h(struct S x) { return g(x); }
More information about the llvm-commits
mailing list