diff options
| author | Eli Friedman <eli.friedman@gmail.com> | 2010-09-15 20:08:03 +0000 |
|---|---|---|
| committer | Eli Friedman <eli.friedman@gmail.com> | 2010-09-15 20:08:03 +0000 |
| commit | ab3a128582aea9d6e73cbdca82f6ae2590af8fd2 (patch) | |
| tree | c6a45e4d59f22bd9a716d32d940db24131ed95b0 /llvm/test/Analysis/BasicAA | |
| parent | 50e2658f6315ac001d7747d2c6e7ce4aef322ba1 (diff) | |
| download | bcm5719-llvm-ab3a128582aea9d6e73cbdca82f6ae2590af8fd2.tar.gz bcm5719-llvm-ab3a128582aea9d6e73cbdca82f6ae2590af8fd2.zip | |
PR7959: Handle negative scales in GEPs correctly in BasicAA for non-64-bit
targets.
llvm-svn: 114015
Diffstat (limited to 'llvm/test/Analysis/BasicAA')
| -rw-r--r-- | llvm/test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll b/llvm/test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll new file mode 100644 index 00000000000..2b0cd78fece --- /dev/null +++ b/llvm/test/Analysis/BasicAA/2010-09-15-GEP-SignedArithmetic.ll @@ -0,0 +1,15 @@ +; RUN: opt < %s -basicaa -aa-eval -print-all-alias-modref-info -disable-output |& grep {1 may alias} +; PR7959 + +target datalayout = "e-p:32:32:32" + +define i32 @test(i32* %tab, i32 %indvar) nounwind { + %tmp31 = mul i32 %indvar, -2 + %tmp32 = add i32 %tmp31, 30 + %t.5 = getelementptr i32* %tab, i32 %tmp32 + %loada = load i32* %tab + store i32 0, i32* %t.5 + %loadb = load i32* %tab + %rval = add i32 %loada, %loadb + ret i32 %rval +} |

