From: Craig Topper Date: Wed, 22 Nov 2017 20:05:54 +0000 (+0000) Subject: [X86] Move the BITALG setOperationAction code into the hasBWI section to match what... X-Git-Tag: llvmorg-6.0.0-rc1~2807 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ad818656af9f9589cde108fae5d423b5343930d;p=platform%2Fupstream%2Fllvm.git [X86] Move the BITALG setOperationAction code into the hasBWI section to match what is done for VPOPCNTDQ in the AVX512F block. NFC llvm-svn: 318870 --- diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 80519e5..8e96588 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -1522,6 +1522,12 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM, for (auto ExtType : {ISD::ZEXTLOAD, ISD::SEXTLOAD}) { setLoadExtAction(ExtType, MVT::v32i16, MVT::v32i8, Legal); } + + if (Subtarget.hasBITALG()) { + for (auto VT : { MVT::v64i8, MVT::v32i16, MVT::v32i8, + MVT::v16i16, MVT::v16i8, MVT::v8i16 }) + setOperationAction(ISD::CTPOP, VT, Legal); + } } if (!Subtarget.useSoftFloat() && Subtarget.hasVLX()) { @@ -1556,11 +1562,6 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM, } } - if (Subtarget.hasBITALG()) - for (auto VT : { MVT::v64i8, MVT::v32i16, MVT::v32i8, - MVT::v16i16, MVT::v16i8, MVT::v8i16 }) - setOperationAction(ISD::CTPOP, VT, Legal); - // We want to custom lower some of our intrinsics. setOperationAction(ISD::INTRINSIC_WO_CHAIN, MVT::Other, Custom); setOperationAction(ISD::INTRINSIC_W_CHAIN, MVT::Other, Custom);