[llvm] [ScalarEvolutionExpander] Use IRBuilder::CreateBinOp in SCEVExpander::InsertBinop. (PR #146443)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 1 03:29:04 PDT 2025
================
@@ -19,8 +19,7 @@ define i8 @drop_nuw() {
; CHECK-NEXT: [[CMP:%.*]] = icmp eq i8 [[IV_NEXT]], 0
; CHECK-NEXT: br i1 [[CMP]], label [[EXIT:%.*]], label [[LOOP]]
; CHECK: exit:
-; CHECK-NEXT: [[TMP0:%.*]] = add i8 [[IV_NEXT]], -1
-; CHECK-NEXT: ret i8 [[TMP0]]
+; CHECK-NEXT: ret i8 [[IV]]
----------------
nikic wrote:
Without looking into it too deeply, changes like this might be problematic for LSR? Now the live-out is going to be the pre-inc IV rather than the post-inc one. (LSR should probably be wrapping things into Unknown in cases where it cares.)
https://github.com/llvm/llvm-project/pull/146443
More information about the llvm-commits
mailing list