[PATCH] D152772: [LoopSink] Allow sinking to PHI-use
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 21 10:56:12 PDT 2023
aeubanks added a comment.
$ cat /tmp/a.ll
target datalayout = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
target triple = "aarch64-grtev4-linux-gnu"
%struct.blam = type { %struct.blam.0, [32 x i8] }
%struct.blam.0 = type { ptr, i64 }
define internal void @wibble() !prof !0 {
bb:
%getelementptr = getelementptr %struct.blam, ptr null, i64 0, i32 1
br label %bb1
bb1: ; preds = %bb7, %bb3, %bb
br i1 false, label %bb2, label %bb3
bb2: ; preds = %bb1
ret void
bb3: ; preds = %bb4, %bb1
switch i32 0, label %bb5 [
i32 1, label %bb4
i32 0, label %bb1
], !prof !1
bb4: ; preds = %bb3
br i1 false, label %bb3, label %bb6
bb5: ; preds = %bb3
br i1 false, label %bb6, label %bb7
bb6: ; preds = %bb5, %bb4
br label %bb7
bb7: ; preds = %bb6, %bb5
%phi = phi ptr [ null, %bb6 ], [ %getelementptr, %bb5 ]
store ptr %getelementptr, ptr null, align 8
br label %bb1
}
!0 = !{!"function_entry_count", i64 1}
!1 = !{!"branch_weights", i32 1, i32 188894, i32 287400}
$ opt -p loop-sink /tmp/a.ll
Instruction does not dominate all uses!
%getelementptr1 = getelementptr %struct.blam, ptr null, i64 0, i32 1
%phi = phi ptr [ null, %bb6 ], [ %getelementptr1, %bb5 ]
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152772/new/
https://reviews.llvm.org/D152772
More information about the llvm-commits
mailing list