[PATCH] D102740: Convert TableGen assert to error
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 1 13:07:22 PDT 2021
craig.topper added a comment.
In D102740#2791964 <https://reviews.llvm.org/D102740#2791964>, @stephenneuendorffer wrote:
> In D102740#2791585 <https://reviews.llvm.org/D102740#2791585>, @craig.topper wrote:
>
>> Seems fine, but is there a way to write this in tablegen that would trigger the assert?
>
> Yes, I hit it with an out of tree backend, but I don't have an easy way to recreate it. Are you concerned about a test?
I'm not all that concerned about a test just trying to get my head around this. I just realized this is counting the number of results from the thing that is being cast which makes a lot more sense. I thought it was trying to count the number of results for the ValueType itself and I couldn't figure out how to write that.
================
Comment at: llvm/utils/TableGen/CodeGenDAGPatterns.cpp:2857
+ if (New->getNumTypes() != 1)
+ error("Type case can only have one type!");
const CodeGenHwModes &CGH = getDAGPatterns().getTargetInfo().getHwModes();
----------------
case -> cast ?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D102740/new/
https://reviews.llvm.org/D102740
More information about the llvm-commits
mailing list