diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2016-12-11 20:07:02 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2016-12-11 20:07:02 +0000 |
| commit | 81ed3499cdf61dcf3cfb426de24f4f406bd04b0f (patch) | |
| tree | 8db3592c665f7d0a1f0a8083a09a00398031f442 /llvm/test/Transforms/InstSimplify | |
| parent | 7c98a79f7beedbfe09b2ede8e44fdcf1fcf2536d (diff) | |
| download | bcm5719-llvm-81ed3499cdf61dcf3cfb426de24f4f406bd04b0f.tar.gz bcm5719-llvm-81ed3499cdf61dcf3cfb426de24f4f406bd04b0f.zip | |
[Constants] don't die processing non-ConstantInt GEP indices in isGEPWithNoNotionalOverIndexing() (PR31262)
This should fix:
https://llvm.org/bugs/show_bug.cgi?id=31262
llvm-svn: 289401
Diffstat (limited to 'llvm/test/Transforms/InstSimplify')
| -rw-r--r-- | llvm/test/Transforms/InstSimplify/compare.ll | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/compare.ll b/llvm/test/Transforms/InstSimplify/compare.ll index e5aea26b5aa..cd2fa880294 100644 --- a/llvm/test/Transforms/InstSimplify/compare.ll +++ b/llvm/test/Transforms/InstSimplify/compare.ll @@ -65,6 +65,17 @@ define i1 @gep4() { ; CHECK-NEXT: ret i1 false } +@a = common global [1 x i32] zeroinitializer, align 4 + +define i1 @PR31262() { +; CHECK-LABEL: @PR31262( +; CHECK-NEXT: ret i1 icmp uge (i32* getelementptr ([1 x i32], [1 x i32]* @a, i64 0, i64 undef), i32* getelementptr inbounds ([1 x i32], [1 x i32]* @a, i32 0, i32 0)) +; + %idx = getelementptr inbounds [1 x i32], [1 x i32]* @a, i64 0, i64 undef + %cmp = icmp uge i32* %idx, getelementptr inbounds ([1 x i32], [1 x i32]* @a, i32 0, i32 0) + ret i1 %cmp +} + define i1 @gep5() { ; CHECK-LABEL: @gep5( %x = alloca %gept, align 8 |

