[PATCH] D48434: Fix crash on inline asm with 64bit matching input in 32bit GPR
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 27 15:11:54 PDT 2018
thopre added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7476
+ : ConstraintOperands[i];
if (OpInfo.ConstraintType == TargetLowering::C_Register)
+ GetRegistersForValue(DAG, TLI, getCurSDLoc(), OpInfo, RefOpInfo);
----------------
efriedma wrote:
> thopre wrote:
> > efriedma wrote:
> > > Why is this "OpInfo.ConstraintType == TargetLowering::C_Register" here, but "RefOpInfo.ConstraintType == TargetLowering::C_RegisterClass" later?
> > I didn't write these two checks but from the comment above the goal seems to distinguish between constraints for specific register (C_Register) from general register constraint (C_RegisterClass). Allocating registers for the former before the latter avoids allocating register X to a general register constraint and later dealing with a constraint asking for X specifically when there was a register Y which the general constraint would have been happy with.
> Sorry, I wasn't clear; why is the first check checking OpInfo, and the second checking RefOpInfo?
Good catch! I've fixed this and added testcases for this cases and confirmed that they failed when using OpInfo.
Repository:
rL LLVM
https://reviews.llvm.org/D48434
More information about the llvm-commits
mailing list