[PATCH] D53268: [X86] WIP: Stop promoting and/or/xor/andn to vXi64.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 18 21:38:16 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/Target/X86/X86InstrAVX512.td:11437
+ (i8 15)), sub_xmm)>;
+ def : Pat<(xor VR128X:$src, (bc_v2i64 (v4i32 immAllOnesV))),
(EXTRACT_SUBREG
----------------
nhaehnle wrote:
> This and many other cases of duplication in the .td files seem amenable to using foreach. Something like:
> ```
> foreach bc_ty = [bc_v16i8, bc_v8i16, bc_v4i32, bc_v2i64]<PatFrag> in
> def : Pat<(xor VR128X:$src, (bc_ty (v4i32 immAllOnesV))),
> (EXTRACT_SUBREG
> (VPTERNLOGQZrri
> (INSERT_SUBREG (v8i64 (IMPLICIT_DEF)), VR128X:$src, sub_xmm),
> (INSERT_SUBREG (v8i64 (IMPLICIT_DEF)), VR128X:$src, sub_xmm),
> (INSERT_SUBREG (v8i64 (IMPLICIT_DEF)), VR128X:$src, sub_xmm),
> (i8 15)), sub_xmm)>;
> ```
I agree we need to reduce the repetitiveness. My immediate focus is on fixing the test regressions. Then I want to see if should do anything to do custom selection in X86ISelDAGToDAG.cpp to avoid growing the static isel table.
https://reviews.llvm.org/D53268
More information about the llvm-commits
mailing list