File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
llvm/tools/llvm-reduce/deltas Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -134,14 +134,16 @@ void llvm::reduceOperandsZeroDeltaPass(TestRunner &Test) {
134134 if (auto *IntTy = dyn_cast<IntegerType>(Op->getType ()))
135135 if (switchCaseExists (Op, ConstantInt::get (IntTy, 0 )))
136136 return nullptr ;
137- // Don't replace existing zeroes.
138137
139138 if (auto *TET = dyn_cast<TargetExtType>(Op->getType ())) {
139+ if (isa<ConstantTargetNone, PoisonValue>(Op))
140+ return nullptr ;
140141 if (TET->hasProperty (TargetExtType::HasZeroInit))
141142 return ConstantTargetNone::get (TET);
142143 return PoisonValue::get (TET);
143144 }
144145
146+ // Don't replace existing zeroes.
145147 return isZero (Op) ? nullptr : Constant::getNullValue (Op->getType ());
146148 };
147149 runDeltaPass (
You can’t perform that action at this time.
0 commit comments