forked from OSchip/llvm-project
[InstCombine] recognizeBSwapOrBitReverseIdiom - use generic CreateIntegerCast
Try to appease buildbots breakages due to D88578
This commit is contained in:
parent
35a2a042dd
commit
347fd9955a
|
@ -3083,7 +3083,7 @@ bool llvm::recognizeBSwapOrBitReverseIdiom(
|
||||||
// We may need to truncate the provider.
|
// We may need to truncate the provider.
|
||||||
if (DemandedTy != Provider->getType()) {
|
if (DemandedTy != Provider->getType()) {
|
||||||
auto *Trunc =
|
auto *Trunc =
|
||||||
CastInst::Create(Instruction::Trunc, Provider, DemandedTy, "trunc", I);
|
CastInst::CreateIntegerCast(Provider, DemandedTy, false, "trunc", I);
|
||||||
InsertedInsts.push_back(Trunc);
|
InsertedInsts.push_back(Trunc);
|
||||||
Provider = Trunc;
|
Provider = Trunc;
|
||||||
}
|
}
|
||||||
|
@ -3099,7 +3099,7 @@ bool llvm::recognizeBSwapOrBitReverseIdiom(
|
||||||
|
|
||||||
// We may need to zeroextend back to the result type.
|
// We may need to zeroextend back to the result type.
|
||||||
if (ITy != Result->getType()) {
|
if (ITy != Result->getType()) {
|
||||||
auto *ExtInst = CastInst::Create(Instruction::ZExt, Result, ITy, "zext", I);
|
auto *ExtInst = CastInst::CreateIntegerCast(Result, ITy, false, "zext", I);
|
||||||
InsertedInsts.push_back(ExtInst);
|
InsertedInsts.push_back(ExtInst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue