mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
[InstCombine] Remove ExpensiveCombines option
D75801 removed the last and only user of this option, so we can drop it now. The original idea behind this was to only run expensive transforms under -O3, but apart from the one known bits transform, this has never really taken off. I believe nowadays the recommendation is to put expensive transforms in AggressiveInstCombine instead, though that isn't terribly popular either :) Differential Revision: https://reviews.llvm.org/D76540
This commit is contained in:
parent
c1bc330e49
commit
0ba06da958
@ -217,7 +217,6 @@ private:
|
||||
void addLateLTOOptimizationPasses(legacy::PassManagerBase &PM);
|
||||
void addPGOInstrPasses(legacy::PassManagerBase &MPM, bool IsCS);
|
||||
void addFunctionSimplificationPasses(legacy::PassManagerBase &MPM);
|
||||
void addInstructionCombiningPass(legacy::PassManagerBase &MPM) const;
|
||||
|
||||
public:
|
||||
/// populateFunctionPassManager - This fills in the function pass manager,
|
||||
|
@ -24,14 +24,13 @@ namespace llvm {
|
||||
|
||||
class InstCombinePass : public PassInfoMixin<InstCombinePass> {
|
||||
InstCombineWorklist Worklist;
|
||||
const bool ExpensiveCombines;
|
||||
const unsigned MaxIterations;
|
||||
|
||||
public:
|
||||
static StringRef name() { return "InstCombinePass"; }
|
||||
|
||||
explicit InstCombinePass(bool ExpensiveCombines = true);
|
||||
explicit InstCombinePass(bool ExpensiveCombines, unsigned MaxIterations);
|
||||
explicit InstCombinePass();
|
||||
explicit InstCombinePass(unsigned MaxIterations);
|
||||
|
||||
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
|
||||
};
|
||||
@ -42,15 +41,13 @@ public:
|
||||
/// will try to combine all instructions in the function.
|
||||
class InstructionCombiningPass : public FunctionPass {
|
||||
InstCombineWorklist Worklist;
|
||||
const bool ExpensiveCombines;
|
||||
const unsigned MaxIterations;
|
||||
|
||||
public:
|
||||
static char ID; // Pass identification, replacement for typeid
|
||||
|
||||
explicit InstructionCombiningPass(bool ExpensiveCombines = true);
|
||||
explicit InstructionCombiningPass(bool ExpensiveCombines,
|
||||
unsigned MaxIterations);
|
||||
explicit InstructionCombiningPass();
|
||||
explicit InstructionCombiningPass(unsigned MaxIterations);
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const override;
|
||||
bool runOnFunction(Function &F) override;
|
||||
@ -68,9 +65,8 @@ public:
|
||||
// into:
|
||||
// %Z = add int 2, %X
|
||||
//
|
||||
FunctionPass *createInstructionCombiningPass(bool ExpensiveCombines = true);
|
||||
FunctionPass *createInstructionCombiningPass(bool ExpensiveCombines,
|
||||
unsigned MaxIterations);
|
||||
FunctionPass *createInstructionCombiningPass();
|
||||
FunctionPass *createInstructionCombiningPass(unsigned MaxIterations);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -270,12 +270,6 @@ void PassManagerBuilder::addInitialAliasAnalysisPasses(
|
||||
PM.add(createScopedNoAliasAAWrapperPass());
|
||||
}
|
||||
|
||||
void PassManagerBuilder::addInstructionCombiningPass(
|
||||
legacy::PassManagerBase &PM) const {
|
||||
bool ExpensiveCombines = OptLevel > 2;
|
||||
PM.add(createInstructionCombiningPass(ExpensiveCombines));
|
||||
}
|
||||
|
||||
void PassManagerBuilder::populateFunctionPassManager(
|
||||
legacy::FunctionPassManager &FPM) {
|
||||
addExtensionsToPM(EP_EarlyAsPossible, FPM);
|
||||
@ -374,7 +368,7 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
|
||||
// Combine silly seq's
|
||||
if (OptLevel > 2)
|
||||
MPM.add(createAggressiveInstCombinerPass());
|
||||
addInstructionCombiningPass(MPM);
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
if (SizeLevel == 0 && !DisableLibCallsShrinkWrap)
|
||||
MPM.add(createLibCallsShrinkWrapPass());
|
||||
addExtensionsToPM(EP_Peephole, MPM);
|
||||
@ -409,7 +403,7 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
|
||||
// simplify-cfg. Eventually loop-simplifycfg should be enhanced to replace the
|
||||
// need for this.
|
||||
MPM.add(createCFGSimplificationPass());
|
||||
addInstructionCombiningPass(MPM);
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
// We resume loop passes creating a second loop pipeline here.
|
||||
MPM.add(createIndVarSimplifyPass()); // Canonicalize indvars
|
||||
MPM.add(createLoopIdiomPass()); // Recognize idioms like memset.
|
||||
@ -440,7 +434,7 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
|
||||
|
||||
// Run instcombine after redundancy elimination to exploit opportunities
|
||||
// opened up by them.
|
||||
addInstructionCombiningPass(MPM);
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
addExtensionsToPM(EP_Peephole, MPM);
|
||||
if (OptLevel > 1) {
|
||||
MPM.add(createJumpThreadingPass()); // Thread jumps
|
||||
@ -458,7 +452,7 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
|
||||
MPM.add(createAggressiveDCEPass()); // Delete dead instructions
|
||||
MPM.add(createCFGSimplificationPass()); // Merge & remove BBs
|
||||
// Clean up after everything.
|
||||
addInstructionCombiningPass(MPM);
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
addExtensionsToPM(EP_Peephole, MPM);
|
||||
|
||||
if (EnableCHR && OptLevel >= 3 &&
|
||||
@ -569,7 +563,7 @@ void PassManagerBuilder::populateModulePassManager(
|
||||
|
||||
MPM.add(createDeadArgEliminationPass()); // Dead argument elimination
|
||||
|
||||
addInstructionCombiningPass(MPM); // Clean up after IPCP & DAE
|
||||
MPM.add(createInstructionCombiningPass()); // Clean up after IPCP & DAE
|
||||
addExtensionsToPM(EP_Peephole, MPM);
|
||||
MPM.add(createCFGSimplificationPass()); // Clean up after IPCP & DAE
|
||||
|
||||
@ -741,7 +735,7 @@ void PassManagerBuilder::populateModulePassManager(
|
||||
// on -O1 and no #pragma is found). Would be good to have these two passes
|
||||
// as function calls, so that we can only pass them when the vectorizer
|
||||
// changed the code.
|
||||
addInstructionCombiningPass(MPM);
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
if (OptLevel > 1 && ExtraVectorizerPasses) {
|
||||
// At higher optimization levels, try to clean up any runtime overlap and
|
||||
// alignment checks inserted by the vectorizer. We want to track correllated
|
||||
@ -750,11 +744,11 @@ void PassManagerBuilder::populateModulePassManager(
|
||||
// and unswitch the runtime checks if possible. Once hoisted, we may have
|
||||
// dead (or speculatable) control flows or more combining opportunities.
|
||||
MPM.add(createCorrelatedValuePropagationPass());
|
||||
addInstructionCombiningPass(MPM);
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
MPM.add(createLICMPass(LicmMssaOptCap, LicmMssaNoAccForPromotionCap));
|
||||
MPM.add(createLoopUnswitchPass(SizeLevel || OptLevel < 3, DivergentTarget));
|
||||
MPM.add(createCFGSimplificationPass());
|
||||
addInstructionCombiningPass(MPM);
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
}
|
||||
|
||||
// Cleanup after loop vectorization, etc. Simplification passes like CVP and
|
||||
@ -772,7 +766,7 @@ void PassManagerBuilder::populateModulePassManager(
|
||||
}
|
||||
|
||||
addExtensionsToPM(EP_Peephole, MPM);
|
||||
addInstructionCombiningPass(MPM);
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
|
||||
if (EnableUnrollAndJam && !DisableUnrollLoops) {
|
||||
// Unroll and Jam. We do this before unroll but need to be in a separate
|
||||
@ -787,7 +781,7 @@ void PassManagerBuilder::populateModulePassManager(
|
||||
|
||||
if (!DisableUnrollLoops) {
|
||||
// LoopUnroll may generate some redundency to cleanup.
|
||||
addInstructionCombiningPass(MPM);
|
||||
MPM.add(createInstructionCombiningPass());
|
||||
|
||||
// Runtime unrolling will introduce runtime check in loop prologue. If the
|
||||
// unrolled loop is a inner loop, then the prologue will be inside the
|
||||
@ -925,7 +919,7 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
|
||||
// calls, etc, so let instcombine do this.
|
||||
if (OptLevel > 2)
|
||||
PM.add(createAggressiveInstCombinerPass());
|
||||
addInstructionCombiningPass(PM);
|
||||
PM.add(createInstructionCombiningPass());
|
||||
addExtensionsToPM(EP_Peephole, PM);
|
||||
|
||||
// Inline small functions
|
||||
@ -958,7 +952,7 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
|
||||
PM.add(createArgumentPromotionPass());
|
||||
|
||||
// The IPO passes may leave cruft around. Clean up after them.
|
||||
addInstructionCombiningPass(PM);
|
||||
PM.add(createInstructionCombiningPass());
|
||||
addExtensionsToPM(EP_Peephole, PM);
|
||||
PM.add(createJumpThreadingPass());
|
||||
|
||||
@ -1004,10 +998,10 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
|
||||
// we may have exposed more scalar opportunities. Run parts of the scalar
|
||||
// optimizer again at this point.
|
||||
PM.add(createVectorCombinePass());
|
||||
addInstructionCombiningPass(PM); // Initial cleanup
|
||||
PM.add(createInstructionCombiningPass()); // Initial cleanup
|
||||
PM.add(createCFGSimplificationPass()); // if-convert
|
||||
PM.add(createSCCPPass()); // Propagate exposed constants
|
||||
addInstructionCombiningPass(PM); // Clean up again
|
||||
PM.add(createInstructionCombiningPass()); // Clean up again
|
||||
PM.add(createBitTrackingDCEPass());
|
||||
|
||||
// More scalar chains could be vectorized due to more alias information
|
||||
@ -1021,7 +1015,7 @@ void PassManagerBuilder::addLTOOptimizationPasses(legacy::PassManagerBase &PM) {
|
||||
PM.add(createAlignmentFromAssumptionsPass());
|
||||
|
||||
// Cleanup and simplify the code after the scalar optimizations.
|
||||
addInstructionCombiningPass(PM);
|
||||
PM.add(createInstructionCombiningPass());
|
||||
addExtensionsToPM(EP_Peephole, PM);
|
||||
|
||||
PM.add(createJumpThreadingPass());
|
||||
|
@ -313,9 +313,6 @@ private:
|
||||
// Mode in which we are running the combiner.
|
||||
const bool MinimizeSize;
|
||||
|
||||
/// Enable combines that trigger rarely but are costly in compiletime.
|
||||
const bool ExpensiveCombines;
|
||||
|
||||
AliasAnalysis *AA;
|
||||
|
||||
// Required analyses.
|
||||
@ -336,12 +333,12 @@ private:
|
||||
|
||||
public:
|
||||
InstCombiner(InstCombineWorklist &Worklist, BuilderTy &Builder,
|
||||
bool MinimizeSize, bool ExpensiveCombines, AliasAnalysis *AA,
|
||||
bool MinimizeSize, AliasAnalysis *AA,
|
||||
AssumptionCache &AC, TargetLibraryInfo &TLI, DominatorTree &DT,
|
||||
OptimizationRemarkEmitter &ORE, BlockFrequencyInfo *BFI,
|
||||
ProfileSummaryInfo *PSI, const DataLayout &DL, LoopInfo *LI)
|
||||
: Worklist(Worklist), Builder(Builder), MinimizeSize(MinimizeSize),
|
||||
ExpensiveCombines(ExpensiveCombines), AA(AA), AC(AC), TLI(TLI), DT(DT),
|
||||
AA(AA), AC(AC), TLI(TLI), DT(DT),
|
||||
DL(DL), SQ(DL, &TLI, &DT, &AC), ORE(ORE), BFI(BFI), PSI(PSI), LI(LI) {}
|
||||
|
||||
/// Run the combiner over the entire worklist until it is empty.
|
||||
|
@ -130,11 +130,6 @@ static cl::opt<bool>
|
||||
EnableCodeSinking("instcombine-code-sinking", cl::desc("Enable code sinking"),
|
||||
cl::init(true));
|
||||
|
||||
// FIXME: This option is no longer used for anything and may be removed.
|
||||
static cl::opt<bool>
|
||||
EnableExpensiveCombines("expensive-combines",
|
||||
cl::desc("Enable expensive instruction combines"));
|
||||
|
||||
static cl::opt<unsigned> LimitMaxIterations(
|
||||
"instcombine-max-iterations",
|
||||
cl::desc("Limit the maximum number of instruction combining iterations"),
|
||||
@ -3743,11 +3738,8 @@ static bool combineInstructionsOverFunction(
|
||||
Function &F, InstCombineWorklist &Worklist, AliasAnalysis *AA,
|
||||
AssumptionCache &AC, TargetLibraryInfo &TLI, DominatorTree &DT,
|
||||
OptimizationRemarkEmitter &ORE, BlockFrequencyInfo *BFI,
|
||||
ProfileSummaryInfo *PSI, bool ExpensiveCombines, unsigned MaxIterations,
|
||||
LoopInfo *LI) {
|
||||
ProfileSummaryInfo *PSI, unsigned MaxIterations, LoopInfo *LI) {
|
||||
auto &DL = F.getParent()->getDataLayout();
|
||||
if (EnableExpensiveCombines.getNumOccurrences())
|
||||
ExpensiveCombines = EnableExpensiveCombines;
|
||||
MaxIterations = std::min(MaxIterations, LimitMaxIterations.getValue());
|
||||
|
||||
/// Builder - This is an IRBuilder that automatically inserts new
|
||||
@ -3789,7 +3781,7 @@ static bool combineInstructionsOverFunction(
|
||||
|
||||
MadeIRChange |= prepareICWorklistFromFunction(F, DL, &TLI, Worklist);
|
||||
|
||||
InstCombiner IC(Worklist, Builder, F.hasMinSize(), ExpensiveCombines, AA,
|
||||
InstCombiner IC(Worklist, Builder, F.hasMinSize(), AA,
|
||||
AC, TLI, DT, ORE, BFI, PSI, DL, LI);
|
||||
IC.MaxArraySizeForCombine = MaxArraySize;
|
||||
|
||||
@ -3802,11 +3794,10 @@ static bool combineInstructionsOverFunction(
|
||||
return MadeIRChange;
|
||||
}
|
||||
|
||||
InstCombinePass::InstCombinePass(bool ExpensiveCombines)
|
||||
: ExpensiveCombines(ExpensiveCombines), MaxIterations(LimitMaxIterations) {}
|
||||
InstCombinePass::InstCombinePass() : MaxIterations(LimitMaxIterations) {}
|
||||
|
||||
InstCombinePass::InstCombinePass(bool ExpensiveCombines, unsigned MaxIterations)
|
||||
: ExpensiveCombines(ExpensiveCombines), MaxIterations(MaxIterations) {}
|
||||
InstCombinePass::InstCombinePass(unsigned MaxIterations)
|
||||
: MaxIterations(MaxIterations) {}
|
||||
|
||||
PreservedAnalyses InstCombinePass::run(Function &F,
|
||||
FunctionAnalysisManager &AM) {
|
||||
@ -3826,8 +3817,7 @@ PreservedAnalyses InstCombinePass::run(Function &F,
|
||||
&AM.getResult<BlockFrequencyAnalysis>(F) : nullptr;
|
||||
|
||||
if (!combineInstructionsOverFunction(F, Worklist, AA, AC, TLI, DT, ORE, BFI,
|
||||
PSI, ExpensiveCombines, MaxIterations,
|
||||
LI))
|
||||
PSI, MaxIterations, LI))
|
||||
// No changes, all analyses are preserved.
|
||||
return PreservedAnalyses::all();
|
||||
|
||||
@ -3877,22 +3867,18 @@ bool InstructionCombiningPass::runOnFunction(Function &F) {
|
||||
nullptr;
|
||||
|
||||
return combineInstructionsOverFunction(F, Worklist, AA, AC, TLI, DT, ORE, BFI,
|
||||
PSI, ExpensiveCombines, MaxIterations,
|
||||
LI);
|
||||
PSI, MaxIterations, LI);
|
||||
}
|
||||
|
||||
char InstructionCombiningPass::ID = 0;
|
||||
|
||||
InstructionCombiningPass::InstructionCombiningPass(bool ExpensiveCombines)
|
||||
: FunctionPass(ID), ExpensiveCombines(ExpensiveCombines),
|
||||
MaxIterations(InstCombineDefaultMaxIterations) {
|
||||
InstructionCombiningPass::InstructionCombiningPass()
|
||||
: FunctionPass(ID), MaxIterations(InstCombineDefaultMaxIterations) {
|
||||
initializeInstructionCombiningPassPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
InstructionCombiningPass::InstructionCombiningPass(bool ExpensiveCombines,
|
||||
unsigned MaxIterations)
|
||||
: FunctionPass(ID), ExpensiveCombines(ExpensiveCombines),
|
||||
MaxIterations(MaxIterations) {
|
||||
InstructionCombiningPass::InstructionCombiningPass(unsigned MaxIterations)
|
||||
: FunctionPass(ID), MaxIterations(MaxIterations) {
|
||||
initializeInstructionCombiningPassPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
|
||||
@ -3918,13 +3904,12 @@ void LLVMInitializeInstCombine(LLVMPassRegistryRef R) {
|
||||
initializeInstructionCombiningPassPass(*unwrap(R));
|
||||
}
|
||||
|
||||
FunctionPass *llvm::createInstructionCombiningPass(bool ExpensiveCombines) {
|
||||
return new InstructionCombiningPass(ExpensiveCombines);
|
||||
FunctionPass *llvm::createInstructionCombiningPass() {
|
||||
return new InstructionCombiningPass();
|
||||
}
|
||||
|
||||
FunctionPass *llvm::createInstructionCombiningPass(bool ExpensiveCombines,
|
||||
unsigned MaxIterations) {
|
||||
return new InstructionCombiningPass(ExpensiveCombines, MaxIterations);
|
||||
FunctionPass *llvm::createInstructionCombiningPass(unsigned MaxIterations) {
|
||||
return new InstructionCombiningPass(MaxIterations);
|
||||
}
|
||||
|
||||
void LLVMAddInstructionCombiningPass(LLVMPassManagerRef PM) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt -S -instcombine -expensive-combines=0 < %s | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-OFF
|
||||
; RUN: opt -S -instcombine -expensive-combines=1 < %s | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-ON
|
||||
; RUN: opt -S -instcombine < %s | FileCheck %s
|
||||
target datalayout = "E-m:e-i64:64-n32:64"
|
||||
target triple = "powerpc64-unknown-linux-gnu"
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt < %s -instcombine -S | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-ON
|
||||
; RUN: opt < %s -instcombine -expensive-combines=0 -S | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-OFF
|
||||
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt -S -instcombine -expensive-combines=0 < %s | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-OFF
|
||||
; RUN: opt -S -instcombine -expensive-combines=1 < %s | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-ON
|
||||
; RUN: opt -S -instcombine < %s | FileCheck %s
|
||||
|
||||
declare i32 @passthru_i32(i32 returned)
|
||||
declare i8* @passthru_p8(i8* returned)
|
||||
|
@ -1,28 +0,0 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt -S -instcombine < %s | FileCheck %s --check-prefix=DEFAULT
|
||||
; RUN: opt -S -instcombine -expensive-combines=1 < %s | FileCheck %s --check-prefix=EXPENSIVE-ON
|
||||
; RUN: opt -S -instcombine -expensive-combines=0 < %s | FileCheck %s --check-prefix=EXPENSIVE-OFF
|
||||
|
||||
define void @test() {
|
||||
; DEFAULT-LABEL: @test(
|
||||
; DEFAULT-NEXT: [[CALL:%.*]] = call i32 @passthru(i32 0)
|
||||
; DEFAULT-NEXT: call void @sink(i32 0)
|
||||
; DEFAULT-NEXT: ret void
|
||||
;
|
||||
; EXPENSIVE-ON-LABEL: @test(
|
||||
; EXPENSIVE-ON-NEXT: [[CALL:%.*]] = call i32 @passthru(i32 0)
|
||||
; EXPENSIVE-ON-NEXT: call void @sink(i32 0)
|
||||
; EXPENSIVE-ON-NEXT: ret void
|
||||
;
|
||||
; EXPENSIVE-OFF-LABEL: @test(
|
||||
; EXPENSIVE-OFF-NEXT: [[CALL:%.*]] = call i32 @passthru(i32 0)
|
||||
; EXPENSIVE-OFF-NEXT: call void @sink(i32 0)
|
||||
; EXPENSIVE-OFF-NEXT: ret void
|
||||
;
|
||||
%call = call i32 @passthru(i32 0)
|
||||
call void @sink(i32 %call)
|
||||
ret void
|
||||
}
|
||||
|
||||
declare i32 @passthru(i32 returned)
|
||||
declare void @sink(i32)
|
@ -1,6 +1,5 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt -S -instcombine -expensive-combines=0 < %s | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-OFF
|
||||
; RUN: opt -S -instcombine -expensive-combines=1 < %s | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-ON
|
||||
; RUN: opt -S -instcombine < %s | FileCheck %s
|
||||
|
||||
define void @test_shl(i1 %x) {
|
||||
; CHECK-LABEL: @test_shl(
|
||||
|
@ -1,6 +1,5 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt < %s -instcombine -expensive-combines=0 -S | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-OFF
|
||||
; RUN: opt < %s -instcombine -expensive-combines=1 -S | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-ON
|
||||
; RUN: opt < %s -instcombine -S | FileCheck %s
|
||||
|
||||
; Result of left shifting a non-negative integer
|
||||
; with nsw flag should also be non-negative
|
||||
|
@ -1,6 +1,5 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt -S -instcombine -expensive-combines=0 < %s | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-OFF
|
||||
; RUN: opt -S -instcombine -expensive-combines=1 < %s | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-ON
|
||||
; RUN: opt -S -instcombine < %s | FileCheck %s
|
||||
; Check that we don't crash on unreasonable constant indexes
|
||||
|
||||
define i32 @test_out_of_bounds(i32 %a, i1 %x, i1 %y) {
|
||||
|
@ -1,6 +1,5 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt -S -instcombine -expensive-combines=0 < %s | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-OFF
|
||||
; RUN: opt -S -instcombine -expensive-combines=1 < %s | FileCheck %s --check-prefixes=CHECK,EXPENSIVE-ON
|
||||
; RUN: opt -S -instcombine < %s | FileCheck %s
|
||||
|
||||
; OSS Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=15217
|
||||
define i64 @fuzz15217(i1 %cond, i8* %Ptr, i64 %Val) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
|
||||
; RUN: opt -S -instcombine -expensive-combines=0 -instcombine-infinite-loop-threshold=2 < %s | FileCheck %s
|
||||
; RUN: opt -S -instcombine -instcombine-infinite-loop-threshold=2 < %s | FileCheck %s
|
||||
|
||||
; This test used to cause an infinite combine loop.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user