[PATCH] D36990: [GISel]: Translate phi into generic G_PHI instruction
Aditya Nandakumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 22 17:26:09 PDT 2017
aditya_nandakumar added inline comments.
================
Comment at: lib/Target/AArch64/AArch64RegisterBankInfo.cpp:423
// or already have some operands assigned to banks.
- if (!isPreISelGenericOpcode(Opc)) {
+ if (!isPreISelGenericOpcode(Opc) || Opc == TargetOpcode::G_PHI) {
const RegisterBankInfo::InstructionMapping &Mapping =
----------------
qcolombet wrote:
> We should need to do that.
> Could you describe what happen if you don't?
When it returns the best mapping, it creates for NumOperands (say with 2 PHI values - it's 5). Then it fails the verification of the best mapping.
assert(NumOperands == (isCopyLike(MI) ? 1 : MI.getNumOperands()) && "NumOperands must match, see constructor");
I made the change so G_PHI would have been treated as it were a PHI.
Repository:
rL LLVM
https://reviews.llvm.org/D36990
More information about the llvm-commits
mailing list