summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-11-23 19:30:27 +0000
committerDuncan Sands <baldrick@free.fr>2007-11-23 19:30:27 +0000
commit8a3e9d2bee4a76732da1afe64026b9a9c7890cd0 (patch)
treeb1066b4d0db3ff71c45d57a0ee0e552e77ad1bfc /llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll
parentb23192f48354af0d069c343e4725ab24a2671ec0 (diff)
downloadbcm5719-llvm-8a3e9d2bee4a76732da1afe64026b9a9c7890cd0.tar.gz
bcm5719-llvm-8a3e9d2bee4a76732da1afe64026b9a9c7890cd0.zip
Ding dong, the DoesntAccessMemoryFns and
OnlyReadsMemoryFns tables are dead! We get more, and more accurate, information from gcc via the readnone and readonly function attributes. llvm-svn: 44288
Diffstat (limited to 'llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll')
-rw-r--r--llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll24
1 files changed, 12 insertions, 12 deletions
diff --git a/llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll b/llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll
index 49244563c0c..e521cc1350f 100644
--- a/llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll
+++ b/llvm/test/Analysis/GlobalsModRef/chaining-analysis.ll
@@ -1,20 +1,20 @@
-; RUN: llvm-upgrade < %s | llvm-as | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
+; RUN: llvm-as < %s | opt -globalsmodref-aa -load-vn -gcse | llvm-dis | not grep load
-; This test requires the use of previous analyses to determine that
+; This test requires the use of previous analyses to determine that
; doesnotmodX does not modify X (because 'sin' doesn't).
-%X = internal global int 4
+@X = internal global i32 4 ; <i32*> [#uses=2]
-declare double %sin(double)
+declare double @sin(double) readnone
-int %test(int *%P) {
- store int 12, int* %X
- call double %doesnotmodX(double 1.0)
- %V = load int* %X
- ret int %V
+define i32 @test(i32* %P) {
+ store i32 12, i32* @X
+ call double @doesnotmodX( double 1.000000e+00 ) ; <double>:1 [#uses=0]
+ %V = load i32* @X ; <i32> [#uses=1]
+ ret i32 %V
}
-double %doesnotmodX(double %V) {
- %V2 = call double %sin(double %V)
- ret double %V2
+define double @doesnotmodX(double %V) {
+ %V2 = call double @sin( double %V ) readnone ; <double> [#uses=1]
+ ret double %V2
}
OpenPOWER on IntegriCloud