diff options
| author | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-09-04 10:29:48 +0000 |
|---|---|---|
| committer | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-09-04 10:29:48 +0000 |
| commit | 9588ad9611368d65a6f619ae5e79fff70854a1fc (patch) | |
| tree | f51068c83cdebf1b82bf5bdfd2512383917f2fb0 /llvm/test/Analysis/ValueTracking | |
| parent | ef16ea7f7ade8dbe3647e7c829a13d1dbeee0f0e (diff) | |
| download | bcm5719-llvm-9588ad9611368d65a6f619ae5e79fff70854a1fc.tar.gz bcm5719-llvm-9588ad9611368d65a6f619ae5e79fff70854a1fc.zip | |
[InstCombine] Fold icmp ugt/ult (add nuw X, C2), C --> icmp ugt/ult X, (C - C2)
Support for sgt/slt was added in rL294898, this adds the same cases also for unsigned compares.
This is the Alive proof: https://rise4fun.com/Alive/nyY
Differential Revision: https://reviews.llvm.org/D50972
llvm-svn: 341353
Diffstat (limited to 'llvm/test/Analysis/ValueTracking')
| -rwxr-xr-x | llvm/test/Analysis/ValueTracking/non-negative-phi-bits.ll | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Analysis/ValueTracking/non-negative-phi-bits.ll b/llvm/test/Analysis/ValueTracking/non-negative-phi-bits.ll index 059bbaa3c4e..3b1c43df5a7 100755 --- a/llvm/test/Analysis/ValueTracking/non-negative-phi-bits.ll +++ b/llvm/test/Analysis/ValueTracking/non-negative-phi-bits.ll @@ -8,7 +8,7 @@ define void @test() #0 { ; CHECK: for.body: ; CHECK-NEXT: [[INDVARS_IV:%.*]] = phi i64 [ 0, [[ENTRY:%.*]] ], [ [[INDVARS_IV_NEXT:%.*]], [[FOR_BODY]] ] ; CHECK-NEXT: [[INDVARS_IV_NEXT]] = add nuw nsw i64 [[INDVARS_IV]], 1 -; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ult i64 [[INDVARS_IV_NEXT]], 40 +; CHECK-NEXT: [[EXITCOND:%.*]] = icmp ult i64 [[INDVARS_IV]], 39 ; CHECK-NEXT: br i1 [[EXITCOND]], label [[FOR_END:%.*]], label [[FOR_BODY]] ; CHECK: for.end: ; CHECK-NEXT: ret void |

