[PATCH] D52912: [SelectionDAG] allow FP binops in SimplifyDemandedVectorElts

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 5 14:36:00 PDT 2018


spatel added inline comments.


================
Comment at: test/CodeGen/X86/avx512-hadd-hsub.ll:183
+; KNL-NEXT:    vunpckhpd {{.*#+}} ymm0 = ymm0[1],ymm1[1],ymm0[3],ymm1[3]
 ; KNL-NEXT:    vaddpd %zmm0, %zmm2, %zmm0
 ; KNL-NEXT:    # kill: def $ymm0 killed $ymm0 killed $zmm0
----------------
craig.topper wrote:
> Do you have a plan to narrow the add here too?
That's the goal, but I'm still not sure how many steps this is going to take. I'm imagining there are 5 groups of patches needed before we get there:
1. Allow undefs with splat matching.
2. Propagate more undefs with SimplifyDemandedVectorElts.
3. Call SimplifyDemandedVectorElts starting from more opcodes.
4. Add per-element demanded logic for more ops (example: add X, undef --> undef).
5. Add narrowing transforms.


https://reviews.llvm.org/D52912





More information about the llvm-commits mailing list