[PATCH] D111507: [X86] Enable promotion of i16 popcnt (PR52056)
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 10 09:31:02 PDT 2021
craig.topper added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:2665
SDValue Result;
- if (TLI.isOperationLegal(ISD::CTPOP, VT)) {
+ if (TLI.isOperationLegalOrCustom(ISD::CTPOP, VT)) {
Result = DAG.getNode(ISD::CTPOP, dl, VT, Op);
----------------
This should be isLegalOrPromoted
================
Comment at: llvm/test/CodeGen/X86/parity-vec.ll:21
; CHECK-NEXT: pmovmskb %xmm0, %eax
-; CHECK-NEXT: popcntw %ax, %ax
+; CHECK-NEXT: movl %eax, %ecx
+; CHECK-NEXT: shrl $8, %ecx
----------------
This is a pretty big regression. My other comment will fix it. But I don’t understand why you would submit a patch without mentioning these regressions in the description.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D111507/new/
https://reviews.llvm.org/D111507
More information about the llvm-commits
mailing list