summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2018-11-01 18:14:45 +0000
committerReid Kleckner <rnk@google.com>2018-11-01 18:14:45 +0000
commitba982b5f8f21b671463db0456f5bffdabdaef966 (patch)
tree9ca50c4fb7a44d870d2264a79be245e895345a4a /llvm/lib
parentb10bacf1225475a1fef6e1c5a9646920bace8578 (diff)
downloadbcm5719-llvm-ba982b5f8f21b671463db0456f5bffdabdaef966.tar.gz
bcm5719-llvm-ba982b5f8f21b671463db0456f5bffdabdaef966.zip
[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
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp b/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp
index d096445f144..424be5e4476 100644
--- a/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp
+++ b/llvm/lib/Target/Hexagon/HexagonConstExtenders.cpp
@@ -788,6 +788,7 @@ HCE::ExtValue::operator MachineOperand() const {
return MachineOperand::CreateCPI(V.ImmVal, Offset, TF);
case MachineOperand::MO_JumpTableIndex:
assert(Offset == 0);
+ return MachineOperand::CreateJTI(V.ImmVal, TF);
default:
llvm_unreachable("Unhandled kind");
}
OpenPOWER on IntegriCloud