[llvm] [indvars] Allow widenWithVariantUse to succeed without extend users (PR #71557)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 07:43:41 PST 2023


================
@@ -34,11 +34,13 @@ define i16 @foo() {
 ; CHECK-NEXT:    [[J_011:%.*]] = phi i16 [ 0, [[FOR_COND1_PREHEADER]] ], [ [[INC:%.*]], [[FOR_BODY4]] ]
 ; CHECK-NEXT:    [[SUM_110:%.*]] = phi i16 [ [[SUM_012]], [[FOR_COND1_PREHEADER]] ], [ [[ADD5]], [[FOR_BODY4]] ]
 ; CHECK-NEXT:    [[TMP2:%.*]] = add nuw nsw i32 [[INDVAR]], [[TMP0]]
+; CHECK-NEXT:    [[TMP3:%.*]] = sext i16 [[J_011]] to i32
+; CHECK-NEXT:    [[TMP4:%.*]] = add nuw nsw i32 [[TMP3]], [[TMP0]]
----------------
preames wrote:

LoopFlatten.  It doesn't call up after calling the widening routines.  I added adce to at least one of the LoopFlatten test previously, can do so for this one as well.  (They're already invoking multiple passes.)

https://github.com/llvm/llvm-project/pull/71557


More information about the llvm-commits mailing list