[PATCH] D150195: GlobalISel: Move fconstant matching into tablegen

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 06:00:47 PDT 2023


arsenm created this revision.
arsenm added reviewers: dsanders, paquette, aemerson, Pierre-vh.
Herald added a subscriber: hiraditya.
Herald added a project: All.
arsenm requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

I don't really understand what the point of wip_match_opcode is.
It doesn't seem to have any purpose other than to list opcodes
to have all the logic in pure C++. You can't seem to  use it to
select multiple opcodes in the same way you use match.

      

Something is wrong with it, since the match emitter prints
"errors" if an opcode is covered by wip_match_opcode and
then appears in another pattern. For exmaple with this patch,
you see this several times in the build:

    
  error: Leaf constant_fold_fabs is unreachable
  note: Leaf idempotent_prop will have already matched
    

The combines are actually produced and the tests for them
do pass, so this seems to just be a broken warning.


https://reviews.llvm.org/D150195

Files:
  llvm/include/llvm/CodeGen/GlobalISel/CombinerHelper.h
  llvm/include/llvm/Target/GlobalISel/Combine.td
  llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150195.520667.patch
Type: text/x-patch
Size: 4521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230509/85a8639c/attachment.bin>


More information about the llvm-commits mailing list