[PATCH] D73051: [GlobalISel][AMDGPU] Legalize saturating add/subtract

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 06:06:54 PDT 2020


arsenm closed this revision.
arsenm marked 2 inline comments as done.
arsenm added a comment.

b35833b84e95c42ca7166232e193b2b8e221b56a <https://reviews.llvm.org/rGb35833b84e95c42ca7166232e193b2b8e221b56a>



================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-saddsat.mir:491-492
+    ; GFX9: [[BUILD_VECTOR_TRUNC1:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR_TRUNC [[C1]](s32), [[C1]](s32)
+    ; GFX9: [[C2:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
+    ; GFX9: [[BUILD_VECTOR_TRUNC2:%[0-9]+]]:_(<2 x s16>) = G_BUILD_VECTOR_TRUNC [[C2]](s32), [[C2]](s32)
+    ; GFX9: [[SMAX:%[0-9]+]]:_(<2 x s16>) = G_SMAX [[COPY]], [[BUILD_VECTOR_TRUNC2]]
----------------
foad wrote:
> Just curious: can't G_CONSTANT represent vector constants directly?
No


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

https://reviews.llvm.org/D73051





More information about the llvm-commits mailing list