[PATCH] D120596: [clang][CGStmt] fix crash on invalid asm statement
Tong Zhang via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 2 11:08:12 PST 2022
ztong0001 added inline comments.
================
Comment at: clang/lib/CodeGen/CGStmt.cpp:2517
+ else if (OutputTy->isFloatingPointTy())
Arg = Builder.CreateFPExt(Arg, OutputTy);
}
----------------
MaskRay wrote:
> Shall we keep the assert (in a new `else` branch) just in case there are other cases which cannot be handled?
IMO adding assert() in else branch still has the same issue with the inline asm in description.
This portion of the code is to extend argument to a longer type, if it cannot do so the patch will simply skip and let it fall back to old behavior and print out
`impossible constraint in asm: can't store value into a register`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120596/new/
https://reviews.llvm.org/D120596
More information about the cfe-commits
mailing list