[PATCH] D53268: [X86] WIP: Stop promoting and/or/xor/andn to vXi64.
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 17 03:32:38 PDT 2018
nhaehnle 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
----------------
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)>;
```
https://reviews.llvm.org/D53268
More information about the llvm-commits
mailing list