[llvm] [EarlyIfConversion] Fix the logic to determine predictable branch. (PR #92405)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 03:09:33 PDT 2024


================
@@ -33,35 +33,27 @@ body:             |
   ; CHECK-NEXT:   [[COPY3:%[0-9]+]]:gpr64common = COPY $x0
   ; CHECK-NEXT: {{  $}}
   ; CHECK-NEXT: bb.1:
-  ; CHECK-NEXT:   successors: %bb.3(0x30000000), %bb.2(0x50000000)
+  ; CHECK-NEXT:   successors: %bb.1(0x80000000)
   ; CHECK-NEXT: {{  $}}
-  ; CHECK-NEXT:   [[LDRBBui:%[0-9]+]]:gpr32 = LDRBBui [[COPY3]], 0 :: (load (s8))
----------------
fhahn wrote:

This is a load from an invariant address, which is exactly what the logic should detect. I agree that the `all_of` should be used, but then the predicate probably needs adjusting too

https://github.com/llvm/llvm-project/pull/92405


More information about the llvm-commits mailing list