[PATCH] D113834: [X86] Fix crash with inline asm using wrong register name

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 14 05:42:04 PST 2021


pengfei added a comment.

I'm not sure if this is the right fix. The input somehow looks undefined behavior, which means we don't necessarily follow what's GCC doing. Besides, GCC doesn't handle it well in other case https://godbolt.org/z/6TTEvKvT6
Can we check for this case and simply report error/warning in the front end?



================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:54134
+
+    Res.first = adjustRegForClass(Res.first, Res.second);
   } else if (isVKClass(*Class)) {
----------------
Should be better to pass `Res` directly?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113834



More information about the llvm-commits mailing list