summaryrefslogtreecommitdiff
path: root/test/CodeGen/Hexagon
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-08-03 23:29:17 +0000
committerBob Wilson <bob.wilson@apple.com>2012-08-03 23:29:17 +0000
commit53624a2df557b4a24f2ee98cfce1a69bf83243af (patch)
treece940e202cc56262d4a9c96df2ac551def98d380 /test/CodeGen/Hexagon
parent6ac8066ae49a5e9910f24e08af0b168210270946 (diff)
downloadllvm-53624a2df557b4a24f2ee98cfce1a69bf83243af.tar.gz
llvm-53624a2df557b4a24f2ee98cfce1a69bf83243af.tar.bz2
llvm-53624a2df557b4a24f2ee98cfce1a69bf83243af.tar.xz
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/Hexagon')
-rw-r--r--test/CodeGen/Hexagon/opt-fabs.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/CodeGen/Hexagon/opt-fabs.ll b/test/CodeGen/Hexagon/opt-fabs.ll
index 1cf0dd0cd9..f1a66f4e65 100644
--- a/test/CodeGen/Hexagon/opt-fabs.ll
+++ b/test/CodeGen/Hexagon/opt-fabs.ll
@@ -8,7 +8,7 @@ entry:
%x.addr = alloca float, align 4
store float %x, float* %x.addr, align 4
%0 = load float* %x.addr, align 4
- %call = call float @fabsf(float %0)
+ %call = call float @fabsf(float %0) readnone
ret float %call
}