Jon Chesterfield via llvm-dev
2017-May-07 16:44 UTC
[llvm-dev] How does one match undef in tablegen?
I would like to specialise build_vector for the case when one of the operands is undefined. How do I describe this? This is looking for an analog of specialisations like: def : Pat <v2i32 (build_vector i32:$x, (i32 0)),...>; but for an undefined, rather than zero, value. I can work around my ignorance in performDAGCombine but would prefer to add to the existing pattern matching. Thanks, Jon -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170507/1fcc13ea/attachment.html>
Craig Topper via llvm-dev
2017-May-07 16:59 UTC
[llvm-dev] How does one match undef in tablegen?
I believe def : Pat <v2i32 (build_vector i32:$x, (i32 undef)),...>; Should work. ~Craig On Sun, May 7, 2017 at 9:44 AM, Jon Chesterfield via llvm-dev < llvm-dev at lists.llvm.org> wrote:> I would like to specialise build_vector for the case when one of the > operands is undefined. How do I describe this? > > This is looking for an analog of specialisations like: > def : Pat <v2i32 (build_vector i32:$x, (i32 0)),...>; > but for an undefined, rather than zero, value. > > I can work around my ignorance in performDAGCombine but would prefer to > add to the existing pattern matching. > > Thanks, > > Jon > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170507/d4e46bc5/attachment.html>
Jon Chesterfield via llvm-dev
2017-May-07 17:12 UTC
[llvm-dev] How does one match undef in tablegen?
It does indeed. Somewhat embarrassed that I didn't try that before asking. Thanks! On Sun, May 7, 2017 at 5:59 PM, Craig Topper <craig.topper at gmail.com> wrote:> I believe > > def : Pat <v2i32 (build_vector i32:$x, (i32 undef)),...>; > > Should work. > > ~Craig > > On Sun, May 7, 2017 at 9:44 AM, Jon Chesterfield via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> I would like to specialise build_vector for the case when one of the >> operands is undefined. How do I describe this? >> >> This is looking for an analog of specialisations like: >> def : Pat <v2i32 (build_vector i32:$x, (i32 0)),...>; >> but for an undefined, rather than zero, value. >> >> I can work around my ignorance in performDAGCombine but would prefer to >> add to the existing pattern matching. >> >> Thanks, >> >> Jon >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >> >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170507/09083770/attachment.html>
Reasonably Related Threads
- Question about 'DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT'
- Question about 'DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT'
- Question about 'DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT'
- Disabling DAGCombine's specific optimization
- Question about 'DAGTypeLegalizer::SplitVecOp_EXTRACT_VECTOR_ELT'