Skip to content

Commit f499a3f

Browse files
committed
[VE] Use SelectionDAG::getSignedConstant/getAllOnesConstant.
1 parent addeb22 commit f499a3f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

llvm/lib/Target/VE/VECustomDAG.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ SDValue VECustomDAG::getConstantMask(Packing Packing, bool AllTrue) const {
410410
auto MaskVT = getLegalVectorType(Packing, MVT::i1);
411411

412412
// VEISelDAGtoDAG will replace this pattern with the constant-true VM.
413-
auto TrueVal = DAG.getConstant(-1, DL, MVT::i32);
413+
auto TrueVal = DAG.getAllOnesConstant(DL, MVT::i32);
414414
auto AVL = getConstant(MaskVT.getVectorNumElements(), MVT::i32);
415415
auto Res = getNode(VEISD::VEC_BROADCAST, MaskVT, {TrueVal, AVL});
416416
if (AllTrue)

llvm/lib/Target/VE/VEInstrInfo.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def ULO7 : SDNodeXForm<imm, [{
4444
SDLoc(N), MVT::i32);
4545
}]>;
4646
def LO7 : SDNodeXForm<imm, [{
47-
return CurDAG->getTargetConstant(SignExtend32(N->getSExtValue(), 7),
48-
SDLoc(N), MVT::i32);
47+
return CurDAG->getSignedConstant(SignExtend64(N->getSExtValue(), 7),
48+
SDLoc(N), MVT::i32, /*isTarget=*/true);
4949
}]>;
5050
def MIMM : SDNodeXForm<imm, [{
5151
return CurDAG->getTargetConstant(val2MImm(getImmVal(N)),

0 commit comments

Comments
 (0)