[llvm] [ARM] Stop gluing ALU nodes to branches / selects (PR #116970)
Sergei Barannikov via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 20 11:00:53 PST 2024
================
@@ -204,10 +204,11 @@ define i32 @f12(i32 %x, i32 %y) {
define i32 @f13(i32 %x, i32 %y) {
; CHECK-LABEL: f13:
; CHECK: @ %bb.0:
-; CHECK-NEXT: and r2, r0, #4
-; CHECK-NEXT: bic r0, r1, #255
-; CHECK-NEXT: cmp r2, #42
-; CHECK-NEXT: orrne r0, r0, #16
+; CHECK-NEXT: and r0, r0, #4
+; CHECK-NEXT: bic r1, r1, #255
----------------
s-barannikov wrote:
Ah, I actually did look into this.
Here is the diff after finalize-isel:
![image](https://github.com/user-attachments/assets/f239a74e-80f2-4c74-ac4f-df2625a39888)
As can be seen, the new code is identical to the old one, modulo instruction order.
I think the issue is with register allocation and subsequent copy elimination as described in #98087 (see also follow-up #105562).
https://github.com/llvm/llvm-project/pull/116970
More information about the llvm-commits
mailing list