Partially inlining a libcall that has the musttail attribute leads to broken LLVM IR, triggering an assertion in the IR verifier. Compiling this file with -O2 -c should trigger the assertion. The proposed changes fix the issue, although I'm not 100% certain simply forgoing the optimization for musttail calls is the proper approach.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Compiling the attached file with the mentioned flags triggers the assertion without the patch, and compiles correctly with the patch. Or does it need to come in a specific form? It's my first time suggesting a patch.
Comment Actions
Some simple llc test for X86 (llvm/test/CodeGen/X86/) could work fine here:
https://godbolt.org/z/czTzMvx1r
; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
llvm/test/Transforms/PartiallyInlineLibCalls/musttail.ll | ||
---|---|---|
1 | Please put the file into X86/ dir, and use the utils/update_test_checks.py script to autogenerate check lines. |
Comment Actions
That would be "Bert Abrath <bert.abrath@UGent.be>". Unless I actually have to add that somewhere? Thanks for all the help :-)
Please put the file into X86/ dir, and use the utils/update_test_checks.py script to autogenerate check lines.