[PATCH] D83384: [GlobalISel][InlineAsm] Fix buildCopy for inputs

Jessica Clarke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 1 13:37:14 PDT 2020


jrtc27 added a comment.

Actually the code in the backtrace points at D82651 <https://reviews.llvm.org/D82651>, not this. I did however see buildAnyextOrCopy in a backtrace when playing around to get that minimal case, which is what brought me to this revision. Investigating further, it seems that this is because of D82651 <https://reviews.llvm.org/D82651> not fully implementing this case, and future revisions not fixing that. Prior to that revision, inline asm would hit `reportTranslationError` and then fall back to SelectionDAG due to isGlobalISelAbortEnabled (provided `-global-isel` wasn't passed to override that, as is done in my test, but not the original C), but now, since it claims to be implemented but not correctly, it instead asserts deep down and is unable to fall back to SelectionDAG.

Thus, please do one of:

1. Gate inline asm lowering behind an experimental flag so that the old behaviour of using SelectionDAG when inline asm is involved is restored

2. Ensure full support for all the inline asm constructs

3. Be very cautious in what inline asm is accepted, calling reportTranslationError eagerly if it looks like anything might go amiss

4. Revert the set of inline asm commits (seems a bit unnecessary given the other options)

or something else appropriate. But this regression is affecting the 11.x release and hit by real-world code (in this case, seL4 on AArch64 compiled at -O0).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83384/new/

https://reviews.llvm.org/D83384



More information about the llvm-commits mailing list