[llvm] 06f64e8 - [ExpandMemCmp] Use getAllOnesValue()
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 12 07:37:57 PDT 2024
Author: Nikita Popov
Date: 2024-08-12T16:37:42+02:00
New Revision: 06f64e84738a6d6a55283ff5eef60c7ea9a92dac
URL: https://github.com/llvm/llvm-project/commit/06f64e84738a6d6a55283ff5eef60c7ea9a92dac
DIFF: https://github.com/llvm/llvm-project/commit/06f64e84738a6d6a55283ff5eef60c7ea9a92dac.diff
LOG: [ExpandMemCmp] Use getAllOnesValue()
Split out from https://github.com/llvm/llvm-project/pull/80309.
Added:
Modified:
llvm/lib/CodeGen/ExpandMemCmp.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/ExpandMemCmp.cpp b/llvm/lib/CodeGen/ExpandMemCmp.cpp
index 2758f7be4d505..04222d5b4afd4 100644
--- a/llvm/lib/CodeGen/ExpandMemCmp.cpp
+++ b/llvm/lib/CodeGen/ExpandMemCmp.cpp
@@ -590,7 +590,7 @@ void MemCmpExpansion::emitMemCmpResultBlock() {
ResBlock.PhiSrc2);
Value *Res =
- Builder.CreateSelect(Cmp, ConstantInt::get(Builder.getInt32Ty(), -1),
+ Builder.CreateSelect(Cmp, Constant::getAllOnesValue(Builder.getInt32Ty()),
ConstantInt::get(Builder.getInt32Ty(), 1));
PhiRes->addIncoming(Res, ResBlock.BB);
More information about the llvm-commits
mailing list