[llvm] [TargetLowering] Use Correct VT for Multi-out Asm (PR #116024)
Sam Elliott via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 13 12:09:46 PST 2024
================
@@ -5753,7 +5753,8 @@ TargetLowering::ParseConstraints(const DataLayout &DL,
assert(!Call.getType()->isVoidTy() && "Bad inline asm!");
if (auto *STy = dyn_cast<StructType>(Call.getType())) {
OpInfo.ConstraintVT =
- getSimpleValueType(DL, STy->getElementType(ResNo));
+ getAsmOperandValueType(DL, STy->getElementType(ResNo))
+ .getSimpleVT();
----------------
lenary wrote:
I don't believe the lowering from an inline assembly statement to a `call ... asm` will create a nested struct. It either returns the single type corresponding to the output (if there's one output), or a struct with a member per output (if there's multiple outputs). I think that inline asm inputs/outputs cannot themselves be structs, but I'm not 100% certain of that. This code would suggest not.
https://github.com/llvm/llvm-project/pull/116024
More information about the llvm-commits
mailing list