[PATCH] D119654: [SDAG] enable binop identity constant folds for add/sub

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 13 02:53:16 PST 2022


RKSimon added inline comments.


================
Comment at: llvm/test/CodeGen/X86/srem-seteq-vec-splat.ll:695
+; CHECK-AVX512VL-NEXT:    vpcmpeqd %xmm1, %xmm0, %xmm0
+; CHECK-AVX512VL-NEXT:    vpsrld $31, %xmm0, %xmm0
 ; CHECK-AVX512VL-NEXT:    retq
----------------
RKSimon wrote:
> Any chance you can track down the missing combine please?
> 
> The ISD::SUB should definitely fold away, not sure if the ISD::XOR is a zeroinitializer or not - but X86ISD::PCMPEQ will fold to all ones if the inputs are equal. And we should have constant folding for X86ISD::VSRLI
Sorry - missed your reply above!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119654/new/

https://reviews.llvm.org/D119654



More information about the llvm-commits mailing list