[PATCH] D60403: [CostModel][X86] Add bool anyof/allof reduction costs
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 16 14:34:00 PDT 2019
spatel added inline comments.
================
Comment at: lib/Target/X86/X86TargetTransformInfo.cpp:2493
+ static const CostTblEntry AVX2BoolReduction[] = {
+ { ISD::AND, MVT::v16i16, 2 },
+ { ISD::AND, MVT::v32i8, 2 },
----------------
Add a code comment here with the expected lowering?
vpmovmskb %xmm, %eax
cmpb $IMM, %al
================
Comment at: lib/Target/X86/X86TargetTransformInfo.cpp:2502
+ { ISD::AND, MVT::v8i32, 2 },
+ { ISD::AND, MVT::v16i16, 4 },
+ { ISD::AND, MVT::v32i8, 4 },
----------------
Similarly:
vextractf128 %ymm0, %xmm1, 1
vpand %xmm1, %xmm0, %xmm0
vpmovmskb %xmm0, %eax
cmpb $IMM, %al
================
Comment at: lib/Target/X86/X86TargetTransformInfo.cpp:2523
+ // Lowered to MOVMSK+CMP on pre-AVX512 targets.
+ if (ValTy->getScalarSizeInBits() == 1) {
+ if (ST->hasAVX2())
----------------
Better to make this 'isIntegerTy(1)'? We should not have a vector type here?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60403/new/
https://reviews.llvm.org/D60403
More information about the llvm-commits
mailing list