[llvm] 347fd99 - [InstCombine] recognizeBSwapOrBitReverseIdiom - use generic CreateIntegerCast
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Sat Oct 3 07:29:33 PDT 2020
Author: Simon Pilgrim
Date: 2020-10-03T15:29:22+01:00
New Revision: 347fd9955af3fff2622d8349a59974ecc2237ec1
URL: https://github.com/llvm/llvm-project/commit/347fd9955af3fff2622d8349a59974ecc2237ec1
DIFF: https://github.com/llvm/llvm-project/commit/347fd9955af3fff2622d8349a59974ecc2237ec1.diff
LOG: [InstCombine] recognizeBSwapOrBitReverseIdiom - use generic CreateIntegerCast
Try to appease buildbots breakages due to D88578
Added:
Modified:
llvm/lib/Transforms/Utils/Local.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/Local.cpp b/llvm/lib/Transforms/Utils/Local.cpp
index 1c4cbc778320..d17ce2fb47c8 100644
--- a/llvm/lib/Transforms/Utils/Local.cpp
+++ b/llvm/lib/Transforms/Utils/Local.cpp
@@ -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);
}
More information about the llvm-commits
mailing list