[PATCH] D111524: [GlobalISel] Add support for constant vector folding of binops in CSEMIRBuilder.

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 09:35:43 PDT 2021


aemerson added a comment.

In D111524#3054451 <https://reviews.llvm.org/D111524#3054451>, @foad wrote:

> No objections from me, but I do wonder if there's a way to apply this more consistently to all the constant folds, not just the binops.

I did plan to extend this to unary ops too, should be fairly simple to do.



================
Comment at: llvm/test/CodeGen/AMDGPU/GlobalISel/combine-urem-pow-2.mir:13
     ; GCN: liveins: $vgpr0
-    ; GCN: %var:_(s32) = COPY $vgpr0
-    ; GCN: %const:_(s32) = G_CONSTANT i32 0
-    ; GCN: %rem:_(s32) = G_UREM %var, %const
-    ; GCN: $vgpr0 = COPY %rem(s32)
+    ; GCN-NEXT: {{  $}}
+    ; GCN-NEXT: %var:_(s32) = COPY $vgpr0
----------------
foad wrote:
> Urgh, it's hard to see the real diff with all this "-NEXT" churn :(
Yeah sorry about that. I’ll update these tests and then update the patch before I commit, so the review will show the real changes.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111524



More information about the llvm-commits mailing list