forked from OSchip/llvm-project
[x86] add debug option for and-immediate shrinking
The commit that added this functionality: rL322957 may be causing/exposing a miscompile in PR38648: https://bugs.llvm.org/show_bug.cgi?id=38648 so allow enabling/disabling to make debugging easier. llvm-svn: 340540
This commit is contained in:
parent
0d2e6251ce
commit
40aa86751a
|
@ -41,6 +41,10 @@ using namespace llvm;
|
|||
|
||||
STATISTIC(NumLoadMoved, "Number of loads moved below TokenFactor");
|
||||
|
||||
static cl::opt<bool> AndImmShrink("x86-and-imm-shrink", cl::init(true),
|
||||
cl::desc("Enable setting constant bits to reduce size of mask immediates"),
|
||||
cl::Hidden);
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Pattern Matcher Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
@ -2927,7 +2931,7 @@ void X86DAGToDAGISel::Select(SDNode *Node) {
|
|||
case ISD::AND:
|
||||
if (matchBEXTRFromAnd(Node))
|
||||
return;
|
||||
if (shrinkAndImmediate(Node))
|
||||
if (AndImmShrink && shrinkAndImmediate(Node))
|
||||
return;
|
||||
|
||||
LLVM_FALLTHROUGH;
|
||||
|
|
Loading…
Reference in New Issue