summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/SystemZ/SystemZISelDAGToDAG.cpp')
-rw-r--r--lib/Target/SystemZ/SystemZISelDAGToDAG.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp b/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
index d95361eed1..aa4752c2ba 100644
--- a/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
+++ b/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp
@@ -769,15 +769,17 @@ bool SystemZDAGToDAGISel::expandRxSBG(RxSBGOperands &RxSBG) const {
RxSBG.Input = N.getOperand(0);
return true;
- case ISD::ZERO_EXTEND: {
- // Restrict the mask to the extended operand.
- unsigned InnerBitSize = N.getOperand(0).getValueType().getSizeInBits();
- if (!refineRxSBGMask(RxSBG, allOnes(InnerBitSize)))
- return false;
+ case ISD::ZERO_EXTEND:
+ if (RxSBG.Opcode != SystemZ::RNSBG) {
+ // Restrict the mask to the extended operand.
+ unsigned InnerBitSize = N.getOperand(0).getValueType().getSizeInBits();
+ if (!refineRxSBGMask(RxSBG, allOnes(InnerBitSize)))
+ return false;
- RxSBG.Input = N.getOperand(0);
- return true;
- }
+ RxSBG.Input = N.getOperand(0);
+ return true;
+ }
+ // Fall through.
case ISD::SIGN_EXTEND: {
// Check that the extension bits are don't-care (i.e. are masked out