[PATCH] D45733: [DAGCombiner] Unfold scalar masked merge if profitable

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 17 15:20:41 PDT 2018


lebedev.ri added inline comments.


================
Comment at: test/CodeGen/X86/unfold-masked-merge-scalar.ll:376-398
 define i64 @in64_constmask(i64 %x, i64 %y) {
 ; CHECK-NOBMI-LABEL: in64_constmask:
 ; CHECK-NOBMI:       # %bb.0:
-; CHECK-NOBMI-NEXT:    xorq %rsi, %rdi
+; CHECK-NOBMI-NEXT:    movabsq $-281474976645121, %rcx # imm = 0xFFFF00000000FFFF
+; CHECK-NOBMI-NEXT:    andq %rsi, %rcx
 ; CHECK-NOBMI-NEXT:    movabsq $281474976645120, %rax # imm = 0xFFFFFFFF0000
 ; CHECK-NOBMI-NEXT:    andq %rdi, %rax
----------------
Hm, this didn't lower into `andn`, unlike the non-constant-mask variant above.
I'm guessing `movabsq` is interfering?


Repository:
  rL LLVM

https://reviews.llvm.org/D45733





More information about the llvm-commits mailing list