[PATCH] D145220: [X86][InstCombine] Simplify some `pternlog` intrinsics

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 02:28:25 PDT 2023


pengfei accepted this revision.
pengfei added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/test/Transforms/InstCombine/X86/x86-ternlog.ll:2312
 ; CHECK-LABEL: @vpternlog_d_constv512_imm0(
-; CHECK-NEXT:    [[R:%.*]] = tail call <16 x i32> @llvm.x86.avx512.pternlog.d.512(<16 x i32> <i32 0, i32 6, i32 1, i32 8, i32 1, i32 8, i32 7, i32 9, i32 1, i32 0, i32 8, i32 8, i32 4, i32 7, i32 0, i32 3>, <16 x i32> <i32 2, i32 7, i32 1, i32 6, i32 8, i32 5, i32 0, i32 2, i32 3, i32 5, i32 6, i32 4, i32 9, i32 4, i32 4, i32 5>, <16 x i32> <i32 2, i32 2, i32 0, i32 9, i32 3, i32 1, i32 2, i32 0, i32 8, i32 0, i32 8, i32 5, i32 5, i32 1, i32 4, i32 9>, i32 0)
-; CHECK-NEXT:    ret <16 x i32> [[R]]
+; CHECK-NEXT:    ret <16 x i32> zeroinitializer
 ;
----------------
goldstein.w.n wrote:
> pengfei wrote:
> > The following constant tests are too tedium and hard to review. Can we use a unittest instead?
> Done, see new file TernlogTest.cpp
Thanks! Do we still need these constant tests?


================
Comment at: llvm/unittests/Transforms/InstCombine/X86/TernlogTest.cpp:187
+  TernTester TT;
+  for (unsigned NTests = 0; NTests < 1; ++NTests) {
+    for (unsigned NElem = 2; NElem < 16; NElem += NElem) {
----------------
What is loop used for?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145220



More information about the llvm-commits mailing list