[llvm] 43b26b4 - Reapply [MergedLoadStoreMotion] Convert tests to opaque pointers (NFC)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 27 04:16:59 PST 2022
Author: Nikita Popov
Date: 2022-12-27T13:16:18+01:00
New Revision: 43b26b4aaef82ac6643fd57c1c2998309200704d
URL: https://github.com/llvm/llvm-project/commit/43b26b4aaef82ac6643fd57c1c2998309200704d
DIFF: https://github.com/llvm/llvm-project/commit/43b26b4aaef82ac6643fd57c1c2998309200704d.diff
LOG: Reapply [MergedLoadStoreMotion] Convert tests to opaque pointers (NFC)
Reapply after reapplying dependent revision.
Added:
Modified:
llvm/test/Transforms/MergedLoadStoreMotion/st_sink_check_debug.ll
llvm/test/Transforms/MergedLoadStoreMotion/st_sink_debuginvariant.ll
Removed:
################################################################################
diff --git a/llvm/test/Transforms/MergedLoadStoreMotion/st_sink_check_debug.ll b/llvm/test/Transforms/MergedLoadStoreMotion/st_sink_check_debug.ll
index b7cf96818a82..80696b6c4241 100644
--- a/llvm/test/Transforms/MergedLoadStoreMotion/st_sink_check_debug.ll
+++ b/llvm/test/Transforms/MergedLoadStoreMotion/st_sink_check_debug.ll
@@ -2,25 +2,23 @@
%struct.S = type { i32 }
-define dso_local void @foo(%struct.S* %this, i32 %bar) {
+define dso_local void @foo(ptr %this, i32 %bar) {
entry:
- %this.addr = alloca %struct.S*, align 8
+ %this.addr = alloca ptr, align 8
%bar.addr = alloca i32, align 4
- store %struct.S* %this, %struct.S** %this.addr, align 8
- store i32 %bar, i32* %bar.addr, align 4
- %this1 = load %struct.S*, %struct.S** %this.addr, align 8
- %0 = load i32, i32* %bar.addr, align 4
+ store ptr %this, ptr %this.addr, align 8
+ store i32 %bar, ptr %bar.addr, align 4
+ %this1 = load ptr, ptr %this.addr, align 8
+ %0 = load i32, ptr %bar.addr, align 4
%tobool = icmp ne i32 %0, 0
br i1 %tobool, label %if.then, label %if.else
if.then: ; preds = %entry
- %foo = getelementptr inbounds %struct.S, %struct.S* %this1, i32 0, i32 0
- store i32 1, i32* %foo, align 4
+ store i32 1, ptr %this1, align 4
br label %if.end
if.else: ; preds = %entry
- %foo2 = getelementptr inbounds %struct.S, %struct.S* %this1, i32 0, i32 0
- store i32 0, i32* %foo2, align 4
+ store i32 0, ptr %this1, align 4
br label %if.end
if.end: ; preds = %if.else, %if.then
diff --git a/llvm/test/Transforms/MergedLoadStoreMotion/st_sink_debuginvariant.ll b/llvm/test/Transforms/MergedLoadStoreMotion/st_sink_debuginvariant.ll
index 18c47fae73a3..a9373fab22ca 100644
--- a/llvm/test/Transforms/MergedLoadStoreMotion/st_sink_debuginvariant.ll
+++ b/llvm/test/Transforms/MergedLoadStoreMotion/st_sink_debuginvariant.ll
@@ -8,10 +8,9 @@
; CHECK-LABEL: return:
; CHECK-NEXT: %.sink = phi i16 [ 5, %if.end ], [ 6, %if.then ]
-; CHECK-NEXT: %0 = getelementptr inbounds %struct.S0, %struct.S0* %agg.result, i16 0, i32 0
-; CHECK-NEXT: store i16 %.sink, i16* %0
-; CHECK-NEXT: %1 = getelementptr inbounds %struct.S0, %struct.S0* %agg.result, i16 0, i32 1
-; CHECK-NEXT: store i16 0, i16* %1
+; CHECK-NEXT: store i16 %.sink, ptr %agg.result
+; CHECK-NEXT: %0 = getelementptr inbounds %struct.S0, ptr %agg.result, i16 0, i32 1
+; CHECK-NEXT: store i16 0, ptr %0
; CHECK-NEXT: ret void
%struct.S0 = type { i16, i16 }
@@ -19,7 +18,7 @@
@g_173 = dso_local local_unnamed_addr global i16 0, !dbg !0
; Function Attrs: noinline norecurse nounwind
-define dso_local void @func_34(%struct.S0* noalias sret(%struct.S0) %agg.result) local_unnamed_addr #0 !dbg !11 {
+define dso_local void @func_34(ptr noalias sret(%struct.S0) %agg.result) local_unnamed_addr #0 !dbg !11 {
entry:
br i1 undef, label %if.end, label %if.then, !dbg !18
@@ -96,18 +95,16 @@ if.then: ; preds = %entry
call void @llvm.dbg.value(metadata i16 5, metadata !19, metadata !DIExpression()), !dbg !22
call void @llvm.dbg.value(metadata i16 5, metadata !19, metadata !DIExpression()), !dbg !22
call void @llvm.dbg.value(metadata i16 5, metadata !19, metadata !DIExpression()), !dbg !22
- %l_303.sroa.0.0..sroa_idx = getelementptr inbounds %struct.S0, %struct.S0* %agg.result, i16 0, i32 0, !dbg !23
- store i16 6, i16* %l_303.sroa.0.0..sroa_idx, !dbg !23
- %l_303.sroa.2.0..sroa_idx1 = getelementptr inbounds %struct.S0, %struct.S0* %agg.result, i16 0, i32 1, !dbg !23
- store i16 0, i16* %l_303.sroa.2.0..sroa_idx1, !dbg !23
+ store i16 6, ptr %agg.result, !dbg !23
+ %l_303.sroa.2.0..sroa_idx1 = getelementptr inbounds %struct.S0, ptr %agg.result, i16 0, i32 1, !dbg !23
+ store i16 0, ptr %l_303.sroa.2.0..sroa_idx1, !dbg !23
br label %return, !dbg !24
if.end: ; preds = %entry
- %f037 = getelementptr inbounds %struct.S0, %struct.S0* %agg.result, i16 0, i32 0, !dbg !25
- store i16 5, i16* %f037, !dbg !25
- %f138 = getelementptr inbounds %struct.S0, %struct.S0* %agg.result, i16 0, i32 1, !dbg !25
- store i16 0, i16* %f138, !dbg !25
- store i16 0, i16* @g_173, !dbg !27
+ store i16 5, ptr %agg.result, !dbg !25
+ %f138 = getelementptr inbounds %struct.S0, ptr %agg.result, i16 0, i32 1, !dbg !25
+ store i16 0, ptr %f138, !dbg !25
+ store i16 0, ptr @g_173, !dbg !27
br label %return, !dbg !28
return: ; preds = %if.end, %if.then
More information about the llvm-commits
mailing list