[AArch64] Don't try to compress jump tables if there are any inline asm instructions.
authorAmara Emerson <amara@apple.com>
Tue, 8 Dec 2020 18:08:23 +0000 (10:08 -0800)
committerAmara Emerson <amara@apple.com>
Thu, 10 Dec 2020 20:20:02 +0000 (12:20 -0800)
commitc29af37c6c9d74ca330bd7f1d084f1f676ba2824
tree583cf3aebc7ec075908a6a13384222f29d69de74
parentb7901e4c1a2ef0de73f133d5ecc6abbc3f427bdc
[AArch64] Don't try to compress jump tables if there are any inline asm instructions.

Inline asm can contain constructs like .bytes which may have arbitrary size.
In some cases, this causes us to miscalculate the size of blocks and therefore
offsets, causing us to incorrectly compress a JT.

To be safe, just bail out of the whole thing if we find any inline asm.

Fixes PR48255

Differential Revision: https://reviews.llvm.org/D92865
llvm/lib/Target/AArch64/AArch64CompressJumpTables.cpp
llvm/test/CodeGen/AArch64/jump-table-compress.mir
llvm/test/CodeGen/AArch64/jump-table.ll