[PATCH] D77475: GlobalISel: Combine G_UNMERGE_VALUES with G_TRUNC

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 14 09:38:55 PDT 2020


arsenm marked an inline comment as done.
arsenm added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h:401
+
+        //  %1:_(<4 x s8>) = G_TRUNC %0(<4 x s32>)
+        //  %2:_(s8), %3:_(s8), %4:_(s8), %5:_(s8) = G_UNMERGE_VALUES %1
----------------
aemerson wrote:
> How do we make the decision that this the resulting output is "better" than the input? Can we check for input legality or something?
I don't think anywhere in the artifact combiner is deciding what's really "better". I think what makes most sense is checking if the vector truncate is legal, but that doesn't really work due to the special constraints on G_TRUNC legality. Checking if the unmerge skips cases where it's still beneficial to do the combine, so I'm not sure what else I would do here


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

https://reviews.llvm.org/D77475





More information about the llvm-commits mailing list