Skip to content
Commit 3c7cde46 authored by Bob Wilson's avatar Bob Wilson
Browse files

Fix pr6543: svn r88806 changed MachineJumpTableInfo::getJumpTableIndex() to

always create a new jump table.  The intention was to avoid merging jump
tables in SelectionDAGBuilder, and to wait for the branch folding pass to
merge tables.  Unfortunately, the same getJumpTableIndex() method is also
used to merge tables in branch folding, so as a result of this change
branch tables are never merged.  Worse, the branch folding code is expecting
getJumpTableIndex to always return the index of an existing table, but with
this change, it never does so.  In at least some cases, e.g., pr6543, this
creates references to non-existent tables.

I've fixed the problem by adding a new createJumpTableIndex function, which
will always create a new table, and I've changed getJumpTableIndex to only
look at existing tables.

llvm-svn: 98845
parent 48d09cab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment