[llvm] 7e6af44 - [X86] Name instructions in test (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 22 06:17:29 PDT 2022
Author: Nikita Popov
Date: 2022-06-22T15:17:21+02:00
New Revision: 7e6af44e3b7c900ac3f11534a6e5e2cf7706fe37
URL: https://github.com/llvm/llvm-project/commit/7e6af44e3b7c900ac3f11534a6e5e2cf7706fe37
DIFF: https://github.com/llvm/llvm-project/commit/7e6af44e3b7c900ac3f11534a6e5e2cf7706fe37.diff
LOG: [X86] Name instructions in test (NFC)
Run the test through -instnamer, which makes it simpler to modify
it.
Added:
Modified:
llvm/test/CodeGen/X86/2012-09-28-CGPBug.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/X86/2012-09-28-CGPBug.ll b/llvm/test/CodeGen/X86/2012-09-28-CGPBug.ll
index a8e0625e85c1..0e7f5933aae0 100644
--- a/llvm/test/CodeGen/X86/2012-09-28-CGPBug.ll
+++ b/llvm/test/CodeGen/X86/2012-09-28-CGPBug.ll
@@ -1,7 +1,7 @@
; RUN: llc -mtriple=i386-apple-macosx < %s | FileCheck %s
; rdar://12396696
- at JT = global [4 x i32] [i32 sub (i32 ptrtoint (i8* blockaddress(@h, %18) to i32), i32 ptrtoint (i8* blockaddress(@h, %11) to i32)), i32 sub (i32 ptrtoint (i8* blockaddress(@h, %17) to i32), i32 ptrtoint (i8* blockaddress(@h, %11) to i32)), i32 sub (i32 ptrtoint (i8* blockaddress(@h, %22) to i32), i32 ptrtoint (i8* blockaddress(@h, %18) to i32)), i32 sub (i32 ptrtoint (i8* blockaddress(@h, %22) to i32), i32 ptrtoint (i8* blockaddress(@h, %17) to i32))]
+ at JT = global [4 x i32] [i32 sub (i32 ptrtoint (i8* blockaddress(@h, %bb16) to i32), i32 ptrtoint (i8* blockaddress(@h, %bb9) to i32)), i32 sub (i32 ptrtoint (i8* blockaddress(@h, %bb15) to i32), i32 ptrtoint (i8* blockaddress(@h, %bb9) to i32)), i32 sub (i32 ptrtoint (i8* blockaddress(@h, %bb20) to i32), i32 ptrtoint (i8* blockaddress(@h, %bb16) to i32)), i32 sub (i32 ptrtoint (i8* blockaddress(@h, %bb20) to i32), i32 ptrtoint (i8* blockaddress(@h, %bb15) to i32))]
@gGlobalLock = external global i8*
@.str40 = external global [35 x i8]
@@ -13,38 +13,39 @@
; CHECK: .long Ltmp{{[0-9]+}}-Ltmp{{[0-9]+}}
; CHECK: .long Ltmp{{[0-9]+}}-Ltmp{{[0-9]+}}
-define void @h(i8*) nounwind ssp {
- %2 = alloca i8*
- store i8* %0, i8** %2
- %3 = load i8*, i8** %2
- %4 = bitcast i8* %3 to { i32, i32 }*
- %5 = getelementptr { i32, i32 }, { i32, i32 }* %4, i32 0, i32 0
- %6 = load i32, i32* %5
- %7 = srem i32 %6, 2
- %8 = icmp slt i32 %6, 2
- %9 = select i1 %8, i32 %6, i32 %7
- %10 = icmp eq i32 %9, 0
- br label %11
-
-; <label>:11 ; preds = %1
- %12 = zext i1 %10 to i32
- %13 = getelementptr [4 x i32], [4 x i32]* @JT, i32 0, i32 %12
- %14 = load i32, i32* %13
- %15 = add i32 %14, ptrtoint (i8* blockaddress(@h, %11) to i32)
- %16 = inttoptr i32 %15 to i8*
- indirectbr i8* %16, [label %17, label %18]
-
-; <label>:17 ; preds = %11
+define void @h(i8* %arg) nounwind ssp {
+bb:
+ %i = alloca i8*, align 8
+ store i8* %arg, i8** %i, align 8
+ %i1 = load i8*, i8** %i, align 8
+ %i2 = bitcast i8* %i1 to { i32, i32 }*
+ %i3 = getelementptr { i32, i32 }, { i32, i32 }* %i2, i32 0, i32 0
+ %i4 = load i32, i32* %i3, align 4
+ %i5 = srem i32 %i4, 2
+ %i6 = icmp slt i32 %i4, 2
+ %i7 = select i1 %i6, i32 %i4, i32 %i5
+ %i8 = icmp eq i32 %i7, 0
+ br label %bb9
+
+bb9: ; preds = %bb
+ %i10 = zext i1 %i8 to i32
+ %i11 = getelementptr [4 x i32], [4 x i32]* @JT, i32 0, i32 %i10
+ %i12 = load i32, i32* %i11, align 4
+ %i13 = add i32 %i12, ptrtoint (i8* blockaddress(@h, %bb9) to i32)
+ %i14 = inttoptr i32 %i13 to i8*
+ indirectbr i8* %i14, [label %bb15, label %bb16]
+
+bb15: ; preds = %bb9
tail call void (i8*, ...) @g(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str40, i32 0, i32 0))
- br label %22
+ br label %bb20
-; <label>:18 ; preds = %11
- %19 = call i32 @f(i32 -1037694186) nounwind
- %20 = inttoptr i32 %19 to i32 (i8**)*
- %21 = tail call i32 %20(i8** @gGlobalLock)
- br label %22
+bb16: ; preds = %bb9
+ %i17 = call i32 @f(i32 -1037694186) #1
+ %i18 = inttoptr i32 %i17 to i32 (i8**)*
+ %i19 = tail call i32 %i18(i8** @gGlobalLock)
+ br label %bb20
-; <label>:22 ; preds = %18, %17
+bb20: ; preds = %bb16, %bb15
ret void
}
More information about the llvm-commits
mailing list