Matt Arsenault via llvm-dev
2019-Jun-30 22:08 UTC
[llvm-dev] TableGen GlobalISelEmitter unable to handle trivial pattern
Hi, I’m looking at some patterns which failed to import, and when I reduced them I was surprised to find a variety of complicated patterns successfully import, but the most trivial patterns I can come up with fail. If I add this pattern to test/TableGen/GlobalISelEmitter.td: def : Pat < (mul i32:$y, i32:$x), (MUL $x, $y)>;test/TableGen/GlobalISelEmitter.td:1196:1: warning: Skipped pattern: Dst pattern child is an unsupported kind def : Pat < What am I missing? -Matt
Amara Emerson via llvm-dev
2019-Jul-01 17:56 UTC
[llvm-dev] TableGen GlobalISelEmitter unable to handle trivial pattern
+Daniel> On Jun 30, 2019, at 3:08 PM, Matt Arsenault via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi, > > I’m looking at some patterns which failed to import, and when I reduced them I was surprised to find a variety of complicated patterns successfully import, but the most trivial patterns I can come up with fail. If I add this pattern to test/TableGen/GlobalISelEmitter.td: > > def : Pat < > (mul i32:$y, i32:$x), > (MUL $x, $y) >> ; > > test/TableGen/GlobalISelEmitter.td:1196:1: warning: Skipped pattern: Dst pattern child is an unsupported kind > def : Pat < > > What am I missing? > > -Matt > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Tom Stellard via llvm-dev
2019-Jul-01 20:17 UTC
[llvm-dev] TableGen GlobalISelEmitter unable to handle trivial pattern
On 06/30/2019 03:08 PM, Matt Arsenault via llvm-dev wrote:> Hi, > > I’m looking at some patterns which failed to import, and when I reduced them I was surprised to find a variety of complicated patterns successfully import, but the most trivial patterns I can come up with fail. If I add this pattern to test/TableGen/GlobalISelEmitter.td: > > def : Pat < > (mul i32:$y, i32:$x), > (MUL $x, $y) >> ; > > test/TableGen/GlobalISelEmitter.td:1196:1: warning: Skipped pattern: Dst pattern child is an unsupported kind > def : Pat < > > What am I missing?I believe that the importer requires that you use register classes instead of types for the operands. -Tom> > -Matt > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >
Daniel Sanders via llvm-dev
2019-Jul-01 23:00 UTC
[llvm-dev] TableGen GlobalISelEmitter unable to handle trivial pattern
> On Jul 1, 2019, at 13:17, Tom Stellard via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On 06/30/2019 03:08 PM, Matt Arsenault via llvm-dev wrote: >> Hi, >> >> I’m looking at some patterns which failed to import, and when I reduced them I was surprised to find a variety of complicated patterns successfully import, but the most trivial patterns I can come up with fail. If I add this pattern to test/TableGen/GlobalISelEmitter.td: >> >> def : Pat < >> (mul i32:$y, i32:$x), >> (MUL $x, $y) >>> ; >> >> test/TableGen/GlobalISelEmitter.td:1196:1: warning: Skipped pattern: Dst pattern child is an unsupported kind >> def : Pat < >> >> What am I missing? > > I believe that the importer requires that you use register classes instead of types > for the operands. > > -TomThat's right. It needs to figure out which register bank to check for in the matcher and it can infer this from the register classes but there isn't enough information if it's only given the type.>> -Matt >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev