summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/PowerPC/fabs.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/PowerPC/fabs.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/PowerPC/fabs.ll')
-rw-r--r--llvm/test/CodeGen/PowerPC/fabs.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/PowerPC/fabs.ll b/llvm/test/CodeGen/PowerPC/fabs.ll
index 156e00b4e57..ddcce745084 100644
--- a/llvm/test/CodeGen/PowerPC/fabs.ll
+++ b/llvm/test/CodeGen/PowerPC/fabs.ll
@@ -2,6 +2,6 @@
define double @fabs(double %f) {
entry:
- %tmp2 = tail call double @fabs( double %f ) ; <double> [#uses=1]
+ %tmp2 = tail call double @fabs( double %f ) readnone ; <double> [#uses=1]
ret double %tmp2
}
OpenPOWER on IntegriCloud