diff options
| author | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2017-08-08 12:41:56 +0000 |
|---|---|---|
| committer | Nemanja Ivanovic <nemanja.i.ibm@gmail.com> | 2017-08-08 12:41:56 +0000 |
| commit | bed7136eeee6a72a22eb05149948f1c3376e62b4 (patch) | |
| tree | b86644e8bf6654134fce072d45642197a0e220f5 | |
| parent | 9aca1cb519bff015fd7193e4a692de1e8b16defa (diff) | |
| download | bcm5719-llvm-bed7136eeee6a72a22eb05149948f1c3376e62b4.tar.gz bcm5719-llvm-bed7136eeee6a72a22eb05149948f1c3376e62b4.zip | |
Appease compilers that have the -Wcovered-switch-default switch.
llvm-svn: 310356
| -rw-r--r-- | llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 16325e76098..168df47c19e 100644 --- a/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -2814,7 +2814,6 @@ SDValue PPCDAGToDAGISel::getCompoundZeroComparisonInGPR(SDValue LHS, SDLoc dl, // Produce the value that needs to be either zero or sign extended. switch (CmpTy) { - default: llvm_unreachable("Unknown Zero-comparison type."); case ZeroCompare::GEZExt: case ZeroCompare::GESExt: ToExtend = SDValue(CurDAG->getMachineNode(Is32Bit ? PPC::NOR : PPC::NOR8, @@ -2850,7 +2849,6 @@ SDValue PPCDAGToDAGISel::getCompoundZeroComparisonInGPR(SDValue LHS, SDLoc dl, assert(Is32Bit && "Should have handled the 32-bit sequences above."); // For 32-bit sequences, the extensions differ between GE/LE cases. switch (CmpTy) { - default: llvm_unreachable("Unknown Zero-comparison type."); case ZeroCompare::GEZExt: { SDValue ShiftOps[] = { ToExtend, getI32Imm(1, dl), getI32Imm(31, dl), getI32Imm(31, dl) }; @@ -2867,6 +2865,11 @@ SDValue PPCDAGToDAGISel::getCompoundZeroComparisonInGPR(SDValue LHS, SDLoc dl, return SDValue(CurDAG->getMachineNode(PPC::ADDI, dl, MVT::i32, ToExtend, getI32Imm(-1, dl)), 0); } + + // Some compilers warn if there's a default label in the switch above, others + // warn if there isn't a return statement here or in a default label. Appease + // both (even though this is unreachable). + return SDValue(); } /// Produces a zero-extended result of comparing two 32-bit values according to |

