[InstCombine] recognizeBSwapOrBitReverseIdiom - use generic CreateIntegerCast

Try to appease buildbots breakages due to D88578
This commit is contained in:
Simon Pilgrim 2020-10-03 15:29:05 +01:00
parent 35a2a042dd
commit 347fd9955a
1 changed files with 2 additions and 2 deletions

View File

@ -3083,7 +3083,7 @@ bool llvm::recognizeBSwapOrBitReverseIdiom(
// We may need to truncate the provider.
if (DemandedTy != Provider->getType()) {
auto *Trunc =
CastInst::Create(Instruction::Trunc, Provider, DemandedTy, "trunc", I);
CastInst::CreateIntegerCast(Provider, DemandedTy, false, "trunc", I);
InsertedInsts.push_back(Trunc);
Provider = Trunc;
}
@ -3099,7 +3099,7 @@ bool llvm::recognizeBSwapOrBitReverseIdiom(
// We may need to zeroextend back to the result type.
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);
}