[Hexagon] Fix MO_JumpTable const extender conversion

Previously this case fell through to unreachable, so it is clearly not
covered by any test case in LLVM. It may be dynamically unreachable, in
fact. However, if it were to run, this is what it would logically do.
The assert suggests that the intended behavior was not to allow folding
offsets from jump table indices, which makes sense.

llvm-svn: 345868
This commit is contained in:
Reid Kleckner 2018-11-01 18:14:45 +00:00
parent b10bacf122
commit ba982b5f8f
1 changed files with 1 additions and 0 deletions

View File

@ -788,6 +788,7 @@ HCE::ExtValue::operator MachineOperand() const {
return MachineOperand::CreateCPI(V.ImmVal, Offset, TF); return MachineOperand::CreateCPI(V.ImmVal, Offset, TF);
case MachineOperand::MO_JumpTableIndex: case MachineOperand::MO_JumpTableIndex:
assert(Offset == 0); assert(Offset == 0);
return MachineOperand::CreateJTI(V.ImmVal, TF);
default: default:
llvm_unreachable("Unhandled kind"); llvm_unreachable("Unhandled kind");
} }