[all-commits] [llvm/llvm-project] 3eabcd: [GlobalISel] Ensure that translateInvoke adds all ...

Jessica Paquette via All-commits all-commits at lists.llvm.org
Tue Nov 9 16:21:11 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3eabcda81453854677faa70ae20f41e1a483cfe2
      https://github.com/llvm/llvm-project/commit/3eabcda81453854677faa70ae20f41e1a483cfe2
  Author: Jessica Paquette <jpaquette at apple.com>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/irtranslator-unwind-inline-asm.ll

  Log Message:
  -----------
  [GlobalISel] Ensure that translateInvoke adds all successors for inlineasm

The existing code didn't add all necessary successors, which resulted in
disjoint basic blocks. These would end up not being legalized which, in the
best case, caused a fallback only in assert builds.

Here's an example:

https://godbolt.org/z/ndx15Enfj

We also end up getting weird codegen here as well.

Refactoring the code here allows us to correctly attach all successors. With
this patch, the above example gives correct codegen at -O0 with and without
asserts.

Also autogen the testcase to show that we add all the successors now.

Differential Revision: https://reviews.llvm.org/D113437




More information about the All-commits mailing list