[PATCH] D144897: [SPIRV] fix several issues in builds with expensive checks
Aleksandr Bezzubikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 1 04:17:24 PST 2023
zuban32 added inline comments.
================
Comment at: llvm/lib/Target/SPIRV/SPIRVCallLowering.cpp:392
assert(Arg.Regs.size() == 1 && "Call arg has multiple VRegs");
+ if (!MRI->getRegClassOrNull(Arg.Regs[0]))
+ MRI->setRegClass(Arg.Regs[0], &SPIRV::IDRegClass);
----------------
iliya-diyachkov wrote:
> arsenm wrote:
> > I'd expect the class to never be set at this point (if not, I'd expect it to be always set)
> 18 LIT tests will fail if I remove this setRegClass(). On other hand, I found calls with register classes already set here in 27 LIT tests.
> So I suppose it makes sense to leave this check and setting.
@arsenm could you pls elaborate? Is it supposed to be set later (if so, where)? I thought CallLowering being a part of IRTranslator is a perfect place to set reg classes as vregs have just been created
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144897/new/
https://reviews.llvm.org/D144897
More information about the llvm-commits
mailing list