summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/ARM/fparith.ll
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
commit874886cd66261b7e5039a975769503f53cdd42db (patch)
tree76d59bee74b823a48cec2a54c9228e3144cfca9d /llvm/test/CodeGen/ARM/fparith.ll
parent1162a1548b5ea42b255cd81ad66f4878a0b235c3 (diff)
downloadbcm5719-llvm-874886cd66261b7e5039a975769503f53cdd42db.tar.gz
bcm5719-llvm-874886cd66261b7e5039a975769503f53cdd42db.zip
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. llvm-svn: 161282
Diffstat (limited to 'llvm/test/CodeGen/ARM/fparith.ll')
-rw-r--r--llvm/test/CodeGen/ARM/fparith.ll4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/ARM/fparith.ll b/llvm/test/CodeGen/ARM/fparith.ll
index ce6d6b29e9d..a8bae3b9519 100644
--- a/llvm/test/CodeGen/ARM/fparith.ll
+++ b/llvm/test/CodeGen/ARM/fparith.ll
@@ -84,7 +84,7 @@ define float @f11(float %a) {
;CHECK: f11:
;CHECK: bic
entry:
- %tmp1 = call float @fabsf( float %a ) ; <float> [#uses=1]
+ %tmp1 = call float @fabsf( float %a ) readnone ; <float> [#uses=1]
ret float %tmp1
}
@@ -94,7 +94,7 @@ define double @f12(double %a) {
;CHECK: f12:
;CHECK: vabs.f64
entry:
- %tmp1 = call double @fabs( double %a ) ; <double> [#uses=1]
+ %tmp1 = call double @fabs( double %a ) readnone ; <double> [#uses=1]
ret double %tmp1
}
OpenPOWER on IntegriCloud