Skip to content

Commit a32c428

Browse files
committed
Also update one target constant case
1 parent 45e3c8d commit a32c428

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,8 @@ void HexagonDAGToDAGISel::SelectSHL(SDNode *N) {
617617
if (ConstantSDNode *C2 = dyn_cast<ConstantSDNode>(Shl2_1)) {
618618
int32_t ValConst = 1 << (ShlConst + C2->getSExtValue());
619619
if (isInt<9>(-ValConst)) {
620-
SDValue Val = CurDAG->getTargetConstant(-ValConst, dl, MVT::i32);
620+
SDValue Val =
621+
CurDAG->getSignedTargetConstant(-ValConst, dl, MVT::i32);
621622
SDNode *Result = CurDAG->getMachineNode(Hexagon::M2_mpysmi, dl,
622623
MVT::i32, Shl2_0, Val);
623624
ReplaceNode(N, Result);

0 commit comments

Comments
 (0)