Skip to content

Commit a6fcdb2

Browse files
committed
[SystemZ] Fix build bot failures
My patch 9db13b5 seems to have caused some build bots to fail due to warnings that appear only when using -Wcovered-switch-default. This patch is an attempt to fix this by trying to avoid both the warning "default label in switch which covers all enumeration values" for the inner switch statements and at the same time the warning "this statement may fall through" for the outer switch statement in getVectorComparison (SystemZISelLowering.cpp).
1 parent 6dcb100 commit a6fcdb2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2647,8 +2647,8 @@ static unsigned getVectorComparison(ISD::CondCode CC, CmpMode Mode) {
26472647
case CmpMode::FP: return SystemZISD::VFCMPE;
26482648
case CmpMode::StrictFP: return SystemZISD::STRICT_VFCMPE;
26492649
case CmpMode::SignalingFP: return SystemZISD::STRICT_VFCMPES;
2650-
default: llvm_unreachable("Bad mode");
26512650
}
2651+
llvm_unreachable("Bad mode");
26522652

26532653
case ISD::SETOGE:
26542654
case ISD::SETGE:
@@ -2657,8 +2657,8 @@ static unsigned getVectorComparison(ISD::CondCode CC, CmpMode Mode) {
26572657
case CmpMode::FP: return SystemZISD::VFCMPHE;
26582658
case CmpMode::StrictFP: return SystemZISD::STRICT_VFCMPHE;
26592659
case CmpMode::SignalingFP: return SystemZISD::STRICT_VFCMPHES;
2660-
default: llvm_unreachable("Bad mode");
26612660
}
2661+
llvm_unreachable("Bad mode");
26622662

26632663
case ISD::SETOGT:
26642664
case ISD::SETGT:
@@ -2667,17 +2667,17 @@ static unsigned getVectorComparison(ISD::CondCode CC, CmpMode Mode) {
26672667
case CmpMode::FP: return SystemZISD::VFCMPH;
26682668
case CmpMode::StrictFP: return SystemZISD::STRICT_VFCMPH;
26692669
case CmpMode::SignalingFP: return SystemZISD::STRICT_VFCMPHS;
2670-
default: llvm_unreachable("Bad mode");
26712670
}
2671+
llvm_unreachable("Bad mode");
26722672

26732673
case ISD::SETUGT:
26742674
switch (Mode) {
26752675
case CmpMode::Int: return SystemZISD::VICMPHL;
26762676
case CmpMode::FP: return 0;
26772677
case CmpMode::StrictFP: return 0;
26782678
case CmpMode::SignalingFP: return 0;
2679-
default: llvm_unreachable("Bad mode");
26802679
}
2680+
llvm_unreachable("Bad mode");
26812681

26822682
default:
26832683
return 0;

0 commit comments

Comments
 (0)