[clang] [clang] Fix complex rvalue inputs to inline assembly (PR #239874)

Adityajyoti Kar via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 7 03:07:46 PST 2026


GiTaDi-CrEaTe wrote:

Thanks for working on this..!!

A few suggestions to strengthen the patch and test coverage:

* In `clang/test/CodeGen/asm-complex.c`, the check only matches the trailing `call void asm`:
  ```c
  // CHECK: call void asm se "", "r,~{dirflag},~{fpsr},~{flags}"(i64 %{{.*}})
  ```
* It would be good to also verify that the arithmetic is actually performed and stored (e.g., checking `fadd float` for both real and imaginary components). Without checking the computation, the check could pass even if the expression evaluation were dropped.

---

The git commit message body for `3c08628` is currently empty. Please remember to include the summary and `Fixes #239139` in the commit message body so the context is preserved in the git history.



https://github.com/llvm/llvm-project/pull/239874


More information about the cfe-commits mailing list