diff options
author | Bob Wilson <bob.wilson@apple.com> | 2012-08-03 23:29:17 +0000 |
---|---|---|
committer | Bob Wilson <bob.wilson@apple.com> | 2012-08-03 23:29:17 +0000 |
commit | 53624a2df557b4a24f2ee98cfce1a69bf83243af (patch) | |
tree | ce940e202cc56262d4a9c96df2ac551def98d380 /test/CodeGen/X86/stack-align.ll | |
parent | 6ac8066ae49a5e9910f24e08af0b168210270946 (diff) | |
download | external_llvm-53624a2df557b4a24f2ee98cfce1a69bf83243af.zip external_llvm-53624a2df557b4a24f2ee98cfce1a69bf83243af.tar.gz external_llvm-53624a2df557b4a24f2ee98cfce1a69bf83243af.tar.bz2 |
Refactor and check "onlyReadsMemory" before optimizing builtins.
This patch is mostly just refactoring a bunch of copy-and-pasted code, but
it also adds a check that the call instructions are readnone or readonly.
That check was already present for sin, cos, sqrt, log2, and exp2 calls, but
it was missing for the rest of the builtins being handled in this code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161282 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/stack-align.ll')
-rw-r--r-- | test/CodeGen/X86/stack-align.ll | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/CodeGen/X86/stack-align.ll b/test/CodeGen/X86/stack-align.ll index f6c13ec..0ddb237 100644 --- a/test/CodeGen/X86/stack-align.ll +++ b/test/CodeGen/X86/stack-align.ll @@ -10,11 +10,11 @@ target triple = "i686-apple-darwin8" define void @test({ double, double }* byval %z, double* %P) nounwind { entry: %tmp3 = load double* @G, align 16 ; <double> [#uses=1] - %tmp4 = tail call double @fabs( double %tmp3 ) ; <double> [#uses=1] + %tmp4 = tail call double @fabs( double %tmp3 ) readnone ; <double> [#uses=1] store volatile double %tmp4, double* %P %tmp = getelementptr { double, double }* %z, i32 0, i32 0 ; <double*> [#uses=1] %tmp1 = load volatile double* %tmp, align 8 ; <double> [#uses=1] - %tmp2 = tail call double @fabs( double %tmp1 ) ; <double> [#uses=1] + %tmp2 = tail call double @fabs( double %tmp1 ) readnone ; <double> [#uses=1] ; CHECK: andpd{{.*}}4(%esp), %xmm %tmp6 = fadd double %tmp4, %tmp2 ; <double> [#uses=1] store volatile double %tmp6, double* %P, align 8 |