[llvm] [CodeGen] [EarlyIfConversion] Prioritize conversion of hard to predict branches (PR #174457)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 12 02:55:26 PST 2026
================
@@ -0,0 +1,274 @@
+# RUN: llc -mtriple=aarch64 -mcpu=apple-m1 -run-pass=early-ifcvt -o - %s | FileCheck %s
+
+--- |
+ define i32 @arg_to_cond_branch(i32 %val, i32 %x, i32 %y) {
+ ret i32 0
+ }
+ define i32 @load_from_constant_pool_to_cond_branch(ptr %p, i32 %x, i32 %y) {
+ ret i32 0
+ }
+ define i32 @load_to_cond_branch(ptr %p, i32 %x, i32 %y) {
+ ret i32 0
+ }
+ define i32 @cbz_arg_to_cond_branch(i32 %val, i32 %x, i32 %y) {
+ ret i32 0
+ }
+ define i32 @cbz_load_to_cond_branch(ptr %p, i32 %x, i32 %y) {
+ ret i32 0
+ }
+ define i32 @tbz_arg_to_cond_branch(i32 %val, i32 %x, i32 %y) {
+ ret i32 0
+ }
+ define i32 @tbz_load_to_cond_branch(ptr %p, i32 %x, i32 %y) {
+ ret i32 0
+ }
+...
+---
+name: arg_to_cond_branch
+alignment: 4
+tracksRegLiveness: true
+body: |
+ ; CHECK-LABEL: name: arg_to_cond_branch
+ ; CHECK: bb.0:
----------------
fhahn wrote:
can you check the full MIR so it is clearer to see what's going on? Ideally add tests in a commit first, then update the checks in the second commit, so it is easier to see the impact of the change
https://github.com/llvm/llvm-project/pull/174457
More information about the llvm-commits
mailing list