[llvm] 82e3519 - [LSR] Re-generate check lines for test.

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 06:05:31 PDT 2020


Author: Florian Hahn
Date: 2020-07-23T13:53:53+01:00
New Revision: 82e35197e68311abf7561f9ed05fbfc09be0e601

URL: https://github.com/llvm/llvm-project/commit/82e35197e68311abf7561f9ed05fbfc09be0e601
DIFF: https://github.com/llvm/llvm-project/commit/82e35197e68311abf7561f9ed05fbfc09be0e601.diff

LOG: [LSR] Re-generate check lines for test.

The test is quite frafile, as the check lines match IR numbers and it is
not obvious why only a very small subset is checked.

Re-generate check lines, so further changes are more obvious.

Added: 
    

Modified: 
    llvm/test/Transforms/LoopStrengthReduce/pr27056.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/LoopStrengthReduce/pr27056.ll b/llvm/test/Transforms/LoopStrengthReduce/pr27056.ll
index 57dc8cd45fe7..a1e37443b3a7 100644
--- a/llvm/test/Transforms/LoopStrengthReduce/pr27056.ll
+++ b/llvm/test/Transforms/LoopStrengthReduce/pr27056.ll
@@ -1,3 +1,4 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
 ; RUN: opt < %s -loop-reduce -S | FileCheck %s
 target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-pc-windows-msvc18.0.0"
@@ -10,6 +11,41 @@ declare i32 @__CxxFrameHandler3(...)
 @GV2 = external global %struct.L
 
 define void @b_copy_ctor() personality i32 (...)* @__CxxFrameHandler3 {
+; CHECK-LABEL: @b_copy_ctor(
+; CHECK-NEXT:  entry:
+; CHECK-NEXT:    [[TMP0:%.*]] = load %struct.L*, %struct.L** @GV1, align 8
+; CHECK-NEXT:    [[TMP1:%.*]] = ptrtoint %struct.L* [[TMP0]] to i64
+; CHECK-NEXT:    br label [[FOR_COND:%.*]]
+; CHECK:       for.cond:
+; CHECK-NEXT:    [[LSR_IV:%.*]] = phi i64 [ [[LSR_IV_NEXT:%.*]], [[CALL_I_NOEXC:%.*]] ], [ 0, [[ENTRY:%.*]] ]
+; CHECK-NEXT:    [[TMP:%.*]] = inttoptr i64 [[LSR_IV]] to %struct.L*
+; CHECK-NEXT:    invoke void @a_copy_ctor()
+; CHECK-NEXT:    to label [[CALL_I_NOEXC]] unwind label [[CATCH_DISPATCH:%.*]]
+; CHECK:       call.i.noexc:
+; CHECK-NEXT:    [[LSR_IV_NEXT]] = add i64 [[LSR_IV]], 16
+; CHECK-NEXT:    br label [[FOR_COND]]
+; CHECK:       catch.dispatch:
+; CHECK-NEXT:    [[TMP2:%.*]] = catchswitch within none [label %catch] unwind to caller
+; CHECK:       catch:
+; CHECK-NEXT:    [[TMP3:%.*]] = catchpad within [[TMP2]] [i8* null, i32 64, i8* null]
+; CHECK-NEXT:    [[CMP16:%.*]] = icmp eq %struct.L* [[TMP]], null
+; CHECK-NEXT:    [[TMP4:%.*]] = sub i64 0, [[TMP1]]
+; CHECK-NEXT:    [[UGLYGEP:%.*]] = getelementptr i8, i8* getelementptr inbounds (%struct.L, %struct.L* @GV2, i32 0, i32 0), i64 [[TMP4]]
+; CHECK-NEXT:    [[UGLYGEP1:%.*]] = bitcast i8* [[UGLYGEP]] to %struct.L*
+; CHECK-NEXT:    br i1 [[CMP16]], label [[FOR_END:%.*]], label [[FOR_BODY_PREHEADER:%.*]]
+; CHECK:       for.body.preheader:
+; CHECK-NEXT:    br label [[FOR_BODY:%.*]]
+; CHECK:       for.body:
+; CHECK-NEXT:    [[TMP5:%.*]] = inttoptr i64 [[LSR_IV]] to %struct.L*
+; CHECK-NEXT:    [[CMP:%.*]] = icmp eq %struct.L* [[UGLYGEP1]], [[TMP]]
+; CHECK-NEXT:    br i1 [[CMP]], label [[FOR_END_LOOPEXIT:%.*]], label [[FOR_BODY]]
+; CHECK:       for.end.loopexit:
+; CHECK-NEXT:    br label [[FOR_END]]
+; CHECK:       for.end:
+; CHECK-NEXT:    catchret from [[TMP3]] to label [[TRY_CONT:%.*]]
+; CHECK:       try.cont:
+; CHECK-NEXT:    ret void
+;
 entry:
   %0 = load %struct.L*, %struct.L** @GV1, align 8
   br label %for.cond
@@ -17,7 +53,7 @@ entry:
 for.cond:                                         ; preds = %call.i.noexc, %entry
   %d.0 = phi %struct.L* [ %0, %entry ], [ %incdec.ptr, %call.i.noexc ]
   invoke void @a_copy_ctor()
-          to label %call.i.noexc unwind label %catch.dispatch
+  to label %call.i.noexc unwind label %catch.dispatch
 
 call.i.noexc:                                     ; preds = %for.cond
   %incdec.ptr = getelementptr inbounds %struct.L, %struct.L* %d.0, i64 1
@@ -42,10 +78,4 @@ try.cont:                                         ; preds = %for.end
   ret void
 }
 
-; CHECK-LABEL: define void @b_copy_ctor(
-; CHECK:       catchpad
-; CHECK-NEXT:  icmp eq %struct.L
-; CHECK-NEXT:  %4 = sub i64 0, %1
-; CHECK-NEXT:  getelementptr {{.*}} getelementptr inbounds (%struct.L, %struct.L* @GV2, i32 0, i32 0), i64 %4
-
 declare void @a_copy_ctor()


        


More information about the llvm-commits mailing list