llvm-project
534d221b - (reland) [GlobalISel] Diagnose inline assembly constraint lowering errors (#139049)

Commit
1 year ago
(reland) [GlobalISel] Diagnose inline assembly constraint lowering errors (#139049) The initial patch (#135782 caused issues because it emits an error, and llc is sensitive to it. It also caused compiler-rt/lib/scudo/standalone/tests/wrappers_cpp_test.cpp to fail. Use warnings instead + reject lowering. That way, the fallback path is used without llc/clang returning a failure code. If fallback isn't enabled then the warnings provide context as to why lowering failed. Original commit description for #135782: Instead of printing something to dbgs (which is not visible to all users), emit a diagnostic like the DAG does. We still crash later because we fail to select the inline assembly, but at least now users will know why it's crashing. In a future patch we could also recover from the error like the DAG does, so the lowering can keep going until it either crashes or gives a different error later.
Author
Parents
Loading