]> granicus.if.org Git - llvm/commit
[X86] Convert tbm_bextri_u32/tbm_bextri_u64 intrinsics TargetConstant argument to...
authorCraig Topper <craig.topper@intel.com>
Fri, 20 Sep 2019 07:00:22 +0000 (07:00 +0000)
committerCraig Topper <craig.topper@intel.com>
Fri, 20 Sep 2019 07:00:22 +0000 (07:00 +0000)
commit8958b8beb5cc83ee21a20bc93870538879473d85
treebf1627a57896a9271a402c7e0fecaf2ea191f2e2
parentbb41d69931a144337172c3546c19f9bf9342bab3
[X86] Convert tbm_bextri_u32/tbm_bextri_u64 intrinsics TargetConstant argument to a regular Constant during lowering.

We reuse an ISD opcode here that can be reached from BMI that
doesn't require it to be an immediate. Our isel patterns to match
the TBM immediate form require a Constant and not a TargetConstant.

We were accidentally getting the Constant due to a quirk of
combineBEXTR calling SimplifyDemandedBits. The call to
SimplifyDemandedBits ended up constant folding the TargetConstant
to a regular Constant. But we should probably instead be asserting
if SimplifyDemandedBits on a TargetConstant so we shouldn't rely
on this behavior.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372373 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86IntrinsicsInfo.h