[llvm] 79c1cf1 - [X86] Name instructions in test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 05:08:43 PDT 2023
Author: Nikita Popov
Date: 2023-04-05T14:08:30+02:00
New Revision: 79c1cf11cba9b8a1b3a4eea593286708468ada9f
URL: https://github.com/llvm/llvm-project/commit/79c1cf11cba9b8a1b3a4eea593286708468ada9f
DIFF: https://github.com/llvm/llvm-project/commit/79c1cf11cba9b8a1b3a4eea593286708468ada9f.diff
LOG: [X86] Name instructions in test (NFC)
Added:
Modified:
llvm/test/CodeGen/X86/fold-call-3.ll
llvm/test/CodeGen/X86/pr38217.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/fold-call-3.ll b/llvm/test/CodeGen/X86/fold-call-3.ll
index fbebaf33171d..c70b8c8f7198 100644
--- a/llvm/test/CodeGen/X86/fold-call-3.ll
+++ b/llvm/test/CodeGen/X86/fold-call-3.ll
@@ -69,37 +69,37 @@ define void @_Z25RawPointerPerformanceTestPvRN5clang6ActionE(i8* %Val, %"struct.
; pre-RA-NEXT: popq %rbp
; pre-RA-NEXT: retq
entry:
- %0 = alloca %"struct.clang::ActionBase::ActionResult<0u>", align 8 ; <%"struct.clang::ActionBase::ActionResult<0u>"*> [#uses=3]
- %1 = load i32, i32* @NumTrials, align 4 ; <i32> [#uses=1]
- %2 = icmp eq i32 %1, 0 ; <i1> [#uses=1]
- br i1 %2, label %return, label %bb.nph
+ %i = alloca %"struct.clang::ActionBase::ActionResult<0u>", align 8
+ %i1 = load i32, i32* @NumTrials, align 4
+ %i2 = icmp eq i32 %i1, 0
+ br i1 %i2, label %return, label %bb.nph
-bb.nph: ; preds = %entry
- %3 = getelementptr %"struct.clang::Action", %"struct.clang::Action"* %Actions, i64 0, i32 0, i32 0 ; <i32 (...)***> [#uses=1]
- %mrv_gep = bitcast %"struct.clang::ActionBase::ActionResult<0u>"* %0 to i64* ; <i64*> [#uses=1]
- %mrv_gep1 = getelementptr %"struct.clang::ActionBase::ActionResult<0u>", %"struct.clang::ActionBase::ActionResult<0u>"* %0, i64 0, i32 1 ; <i8*> [#uses=1]
- %4 = bitcast i8* %mrv_gep1 to i64* ; <i64*> [#uses=1]
- %5 = getelementptr %"struct.clang::ActionBase::ActionResult<0u>", %"struct.clang::ActionBase::ActionResult<0u>"* %0, i64 0, i32 0 ; <i8**> [#uses=1]
- br label %bb
+bb.nph: ; preds = %entry
+ %i3 = getelementptr %"struct.clang::Action", %"struct.clang::Action"* %Actions, i64 0, i32 0, i32 0
+ %mrv_gep = bitcast %"struct.clang::ActionBase::ActionResult<0u>"* %i to i64*
+ %mrv_gep1 = getelementptr %"struct.clang::ActionBase::ActionResult<0u>", %"struct.clang::ActionBase::ActionResult<0u>"* %i, i64 0, i32 1
+ %i4 = bitcast i8* %mrv_gep1 to i64*
+ %i5 = getelementptr %"struct.clang::ActionBase::ActionResult<0u>", %"struct.clang::ActionBase::ActionResult<0u>"* %i, i64 0, i32 0
+ br label %bb
-bb: ; preds = %bb, %bb.nph
- %Trial.01 = phi i32 [ 0, %bb.nph ], [ %12, %bb ] ; <i32> [#uses=1]
- %Val_addr.02 = phi i8* [ %Val, %bb.nph ], [ %11, %bb ] ; <i8*> [#uses=1]
- %6 = load i32 (...)**, i32 (...)*** %3, align 8 ; <i32 (...)**> [#uses=1]
- %7 = getelementptr i32 (...)*, i32 (...)** %6, i64 70 ; <i32 (...)**> [#uses=1]
- %8 = load i32 (...)*, i32 (...)** %7, align 8 ; <i32 (...)*> [#uses=1]
- %9 = bitcast i32 (...)* %8 to { i64, i64 } (%"struct.clang::Action"*, i8*)* ; <{ i64, i64 } (%"struct.clang::Action"*, i8*)*> [#uses=1]
- %10 = call { i64, i64 } %9(%"struct.clang::Action"* %Actions, i8* %Val_addr.02) nounwind ; <{ i64, i64 }> [#uses=2]
- %mrv_gr = extractvalue { i64, i64 } %10, 0 ; <i64> [#uses=1]
- store i64 %mrv_gr, i64* %mrv_gep
- %mrv_gr2 = extractvalue { i64, i64 } %10, 1 ; <i64> [#uses=1]
- store i64 %mrv_gr2, i64* %4
- %11 = load i8*, i8** %5, align 8 ; <i8*> [#uses=1]
- %12 = add i32 %Trial.01, 1 ; <i32> [#uses=2]
- %13 = load i32, i32* @NumTrials, align 4 ; <i32> [#uses=1]
- %14 = icmp ult i32 %12, %13 ; <i1> [#uses=1]
- br i1 %14, label %bb, label %return
+bb: ; preds = %bb, %bb.nph
+ %Trial.01 = phi i32 [ 0, %bb.nph ], [ %i12, %bb ]
+ %Val_addr.02 = phi i8* [ %Val, %bb.nph ], [ %i11, %bb ]
+ %i6 = load i32 (...)**, i32 (...)*** %i3, align 8
+ %i7 = getelementptr i32 (...)*, i32 (...)** %i6, i64 70
+ %i8 = load i32 (...)*, i32 (...)** %i7, align 8
+ %i9 = bitcast i32 (...)* %i8 to { i64, i64 } (%"struct.clang::Action"*, i8*)*
+ %i10 = call { i64, i64 } %i9(%"struct.clang::Action"* %Actions, i8* %Val_addr.02) #0
+ %mrv_gr = extractvalue { i64, i64 } %i10, 0
+ store i64 %mrv_gr, i64* %mrv_gep, align 4
+ %mrv_gr2 = extractvalue { i64, i64 } %i10, 1
+ store i64 %mrv_gr2, i64* %i4, align 4
+ %i11 = load i8*, i8** %i5, align 8
+ %i12 = add i32 %Trial.01, 1
+ %i13 = load i32, i32* @NumTrials, align 4
+ %i14 = icmp ult i32 %i12, %i13
+ br i1 %i14, label %bb, label %return
-return: ; preds = %bb, %entry
- ret void
+return: ; preds = %bb, %entry
+ ret void
}
diff --git a/llvm/test/CodeGen/X86/pr38217.ll b/llvm/test/CodeGen/X86/pr38217.ll
index b24ef197e535..604a123ba5ca 100644
--- a/llvm/test/CodeGen/X86/pr38217.ll
+++ b/llvm/test/CodeGen/X86/pr38217.ll
@@ -3,16 +3,17 @@
@_ZL11DIGIT_TABLE = dso_local constant [201 x i8] c"00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899\00", align 16
-define dso_local void @_Z12d2s_bufferedmPc(i64, i8* nocapture) {
+define dso_local void @_Z12d2s_bufferedmPc(i64 %arg, i8* nocapture %arg1) {
; CHECK-LABEL: _Z12d2s_bufferedmPc:
-; CHECK: # %bb.0:
+; CHECK: # %bb.0: # %bb
; CHECK-NEXT: cmpq $10000, %rdi # imm = 0x2710
; CHECK-NEXT: jb .LBB0_3
-; CHECK-NEXT: # %bb.1: # %.preheader
+; CHECK-NEXT: # %bb.1: # %bb2.preheader
; CHECK-NEXT: xorl %ecx, %ecx
; CHECK-NEXT: movabsq $3777893186295716171, %r8 # imm = 0x346DC5D63886594B
; CHECK-NEXT: .p2align 4, 0x90
-; CHECK-NEXT: .LBB0_2: # =>This Inner Loop Header: Depth=1
+; CHECK-NEXT: .LBB0_2: # %bb2
+; CHECK-NEXT: # =>This Inner Loop Header: Depth=1
; CHECK-NEXT: movq %rdi, %rax
; CHECK-NEXT: mulq %r8
; CHECK-NEXT: shrq $11, %rdx
@@ -34,42 +35,43 @@ define dso_local void @_Z12d2s_bufferedmPc(i64, i8* nocapture) {
; CHECK-NEXT: cmpq $99999999, %rdi # imm = 0x5F5E0FF
; CHECK-NEXT: movq %rdx, %rdi
; CHECK-NEXT: ja .LBB0_2
-; CHECK-NEXT: .LBB0_3:
+; CHECK-NEXT: .LBB0_3: # %bb29
; CHECK-NEXT: retq
- %3 = icmp ugt i64 %0, 9999
- br i1 %3, label %4, label %31
+bb:
+ %i = icmp ugt i64 %arg, 9999
+ br i1 %i, label %bb2, label %bb29
-; <label>:4: ; preds = %2, %4
- %5 = phi i64 [ %9, %4 ], [ %0, %2 ]
- %6 = phi i32 [ %29, %4 ], [ 0, %2 ]
- %7 = urem i64 %5, 10000
- %8 = trunc i64 %7 to i32
- %9 = udiv i64 %5, 10000
- %10 = urem i32 %8, 100
- %11 = shl nuw nsw i32 %10, 1
- %12 = udiv i32 %8, 100
- %13 = shl nuw nsw i32 %12, 1
- %14 = zext i32 %6 to i64
- %15 = sub nsw i64 0, %14
- %16 = getelementptr inbounds i8, i8* %1, i64 %15
- %17 = getelementptr inbounds i8, i8* %16, i64 -1
- %18 = zext i32 %11 to i64
- %19 = getelementptr inbounds [201 x i8], [201 x i8]* @_ZL11DIGIT_TABLE, i64 0, i64 %18
- %20 = bitcast i8* %19 to i16*
- %21 = bitcast i8* %17 to i16*
- %22 = load i16, i16* %20, align 2
- store i16 %22, i16* %21, align 1
- %23 = getelementptr inbounds i8, i8* %16, i64 -3
- %24 = zext i32 %13 to i64
- %25 = getelementptr inbounds [201 x i8], [201 x i8]* @_ZL11DIGIT_TABLE, i64 0, i64 %24
- %26 = bitcast i8* %25 to i16*
- %27 = bitcast i8* %23 to i16*
- %28 = load i16, i16* %26, align 2
- store i16 %28, i16* %27, align 1
- %29 = add i32 %6, 4
- %30 = icmp ugt i64 %5, 99999999
- br i1 %30, label %4, label %31
+bb2: ; preds = %bb2, %bb
+ %i3 = phi i64 [ %i7, %bb2 ], [ %arg, %bb ]
+ %i4 = phi i32 [ %i27, %bb2 ], [ 0, %bb ]
+ %i5 = urem i64 %i3, 10000
+ %i6 = trunc i64 %i5 to i32
+ %i7 = udiv i64 %i3, 10000
+ %i8 = urem i32 %i6, 100
+ %i9 = shl nuw nsw i32 %i8, 1
+ %i10 = udiv i32 %i6, 100
+ %i11 = shl nuw nsw i32 %i10, 1
+ %i12 = zext i32 %i4 to i64
+ %i13 = sub nsw i64 0, %i12
+ %i14 = getelementptr inbounds i8, i8* %arg1, i64 %i13
+ %i15 = getelementptr inbounds i8, i8* %i14, i64 -1
+ %i16 = zext i32 %i9 to i64
+ %i17 = getelementptr inbounds [201 x i8], [201 x i8]* @_ZL11DIGIT_TABLE, i64 0, i64 %i16
+ %i18 = bitcast i8* %i17 to i16*
+ %i19 = bitcast i8* %i15 to i16*
+ %i20 = load i16, i16* %i18, align 2
+ store i16 %i20, i16* %i19, align 1
+ %i21 = getelementptr inbounds i8, i8* %i14, i64 -3
+ %i22 = zext i32 %i11 to i64
+ %i23 = getelementptr inbounds [201 x i8], [201 x i8]* @_ZL11DIGIT_TABLE, i64 0, i64 %i22
+ %i24 = bitcast i8* %i23 to i16*
+ %i25 = bitcast i8* %i21 to i16*
+ %i26 = load i16, i16* %i24, align 2
+ store i16 %i26, i16* %i25, align 1
+ %i27 = add i32 %i4, 4
+ %i28 = icmp ugt i64 %i3, 99999999
+ br i1 %i28, label %bb2, label %bb29
-; <label>:31: ; preds = %4, %2
+bb29: ; preds = %bb2, %bb
ret void
}
More information about the llvm-commits
mailing list