[PATCH] D140878: [PowerPC][GISel]fcmp support

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 3 07:02:06 PST 2023


arsenm accepted this revision.
arsenm added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:3314
 def : Pat<(i64 (anyext i1:$in)),
-          (SELECT_I8 $in, (LI8 1), (LI8 0))>;
+          (SELECT_I8 i1:$in, (LI8 1), (LI8 0))>;
 
----------------
shchenz wrote:
> Some workarounds for GlobalISelEmitter to handle this anyext pattern. This looks like an issue in `GlobalISelEmitter`, otherwise there will be many same manual modifications.
I think output patterns should really specify the class, not the type. The 1:1 mapping of type to class is one of the conceptual issues with the DAG and its patterns


================
Comment at: llvm/lib/Target/PowerPC/PPCInstrInfo.td:3720
   defm : CRNotPat<(i1 (SetCC Ty:$s1, Ty:$s2, SETUGE)),
-                  (EXTRACT_SUBREG (FCmp $s1, $s2), sub_lt)>;
+                  (EXTRACT_SUBREG (FCmp Ty:$s1, Ty:$s2), sub_lt)>;
   defm : CRNotPat<(i1 (SetCC Ty:$s1, Ty:$s2, SETGE)),
----------------
shchenz wrote:
> Some workarounds for GlobalISelEmitter to handle this `setcc` pattern
As above, I think output patterns should use classes


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D140878/new/

https://reviews.llvm.org/D140878



More information about the llvm-commits mailing list