[llvm] 7d1a681 - [SystemZ] Use APInt::getAllOnes()
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 5 06:25:23 PDT 2024
Author: Nikita Popov
Date: 2024-09-05T15:25:05+02:00
New Revision: 7d1a68178ef4332c9bf19a5c959a3ec4cef0285d
URL: https://github.com/llvm/llvm-project/commit/7d1a68178ef4332c9bf19a5c959a3ec4cef0285d
DIFF: https://github.com/llvm/llvm-project/commit/7d1a68178ef4332c9bf19a5c959a3ec4cef0285d.diff
LOG: [SystemZ] Use APInt::getAllOnes()
This was using -1 without setting the signed flag.
Split off from https://github.com/llvm/llvm-project/pull/80309.
Added:
Modified:
llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
index 6f84bd6c6e4ff4..582a8c139b2937 100644
--- a/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
+++ b/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
@@ -7981,7 +7981,7 @@ static APInt getDemandedSrcElements(SDValue Op, const APInt &DemandedElts,
break;
}
case Intrinsic::s390_vperm:
- SrcDemE = APInt(NumElts, -1);
+ SrcDemE = APInt::getAllOnes(NumElts);
break;
default:
llvm_unreachable("Unhandled intrinsic.");
More information about the llvm-commits
mailing list