[llvm] f499a3f - [VE] Use SelectionDAG::getSignedConstant/getAllOnesConstant.
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 17 19:57:06 PDT 2024
Author: Craig Topper
Date: 2024-08-17T19:56:19-07:00
New Revision: f499a3fe5fb6fd816d35b541e67a3761093cfded
URL: https://github.com/llvm/llvm-project/commit/f499a3fe5fb6fd816d35b541e67a3761093cfded
DIFF: https://github.com/llvm/llvm-project/commit/f499a3fe5fb6fd816d35b541e67a3761093cfded.diff
LOG: [VE] Use SelectionDAG::getSignedConstant/getAllOnesConstant.
Added:
Modified:
llvm/lib/Target/VE/VECustomDAG.cpp
llvm/lib/Target/VE/VEInstrInfo.td
Removed:
################################################################################
diff --git a/llvm/lib/Target/VE/VECustomDAG.cpp b/llvm/lib/Target/VE/VECustomDAG.cpp
index 873ffea498de83..2855a65f654c96 100644
--- a/llvm/lib/Target/VE/VECustomDAG.cpp
+++ b/llvm/lib/Target/VE/VECustomDAG.cpp
@@ -410,7 +410,7 @@ SDValue VECustomDAG::getConstantMask(Packing Packing, bool AllTrue) const {
auto MaskVT = getLegalVectorType(Packing, MVT::i1);
// VEISelDAGtoDAG will replace this pattern with the constant-true VM.
- auto TrueVal = DAG.getConstant(-1, DL, MVT::i32);
+ auto TrueVal = DAG.getAllOnesConstant(DL, MVT::i32);
auto AVL = getConstant(MaskVT.getVectorNumElements(), MVT::i32);
auto Res = getNode(VEISD::VEC_BROADCAST, MaskVT, {TrueVal, AVL});
if (AllTrue)
diff --git a/llvm/lib/Target/VE/VEInstrInfo.td b/llvm/lib/Target/VE/VEInstrInfo.td
index 75ef3b7336dbd5..eb6a8529800793 100644
--- a/llvm/lib/Target/VE/VEInstrInfo.td
+++ b/llvm/lib/Target/VE/VEInstrInfo.td
@@ -44,8 +44,8 @@ def ULO7 : SDNodeXForm<imm, [{
SDLoc(N), MVT::i32);
}]>;
def LO7 : SDNodeXForm<imm, [{
- return CurDAG->getTargetConstant(SignExtend32(N->getSExtValue(), 7),
- SDLoc(N), MVT::i32);
+ return CurDAG->getSignedConstant(SignExtend64(N->getSExtValue(), 7),
+ SDLoc(N), MVT::i32, /*isTarget=*/true);
}]>;
def MIMM : SDNodeXForm<imm, [{
return CurDAG->getTargetConstant(val2MImm(getImmVal(N)),
More information about the llvm-commits
mailing list