[all-commits] [llvm/llvm-project] 534d22: (reland) [GlobalISel] Diagnose inline assembly con...

Pierre van Houtryve via All-commits all-commits at lists.llvm.org
Thu May 8 04:23:18 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 534d221b63bb52f64e1f3ad3c40cfb87323d28ec
      https://github.com/llvm/llvm-project/commit/534d221b63bb52f64e1f3ad3c40cfb87323d28ec
  Author: Pierre van Houtryve <pierre.vanhoutryve at amd.com>
  Date:   2025-05-08 (Thu, 08 May 2025)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/InlineAsmLowering.cpp
    A llvm/test/CodeGen/AMDGPU/GlobalISel/inline-asm-lowering-diags.ll

  Log Message:
  -----------
  (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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list