[llvm] [SelectionDAG] Make `(a & x) | (~a & y) -> (a & (x ^ y)) ^ y` available for all targets (PR #137641)
Iris Shi via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 29 01:09:55 PDT 2025
================
@@ -9,7 +9,9 @@ define i128 @f1(i128 %val1, i128 %val2) {
; CHECK: # %bb.0:
; CHECK-NEXT: vl %v0, 0(%r3), 3
; CHECK-NEXT: vl %v1, 0(%r4), 3
-; CHECK-NEXT: vmxq %v0, %v1, %v0
+; CHECK-NEXT: vchq %v2, %v1, %v0
+; CHECK-NEXT: vx %v1, %v1, %v0
+; CHECK-NEXT: veval %v0, %v0, %v1, %v2, 30
----------------
el-ev wrote:
I didn’t find NotAdd in the SystemZ ISA manual. There is a vector select instruction, but it seems that the transformation is only beneficial for i128 or larger types.
https://github.com/llvm/llvm-project/pull/137641
More information about the llvm-commits
mailing list