[PATCH] D150677: [GlobalIsel][X86] Legalize G_CTPOP and G_CTLZ

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 12:18:09 PDT 2023


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


================
Comment at: llvm/lib/Target/X86/X86LegalizerInfo.cpp:404-405
+    .legalFor({{s16, s16}, {s32, s32}, {s64, s64}})
+    .widenScalarToNextPow2(1, /*Min=*/16)
+    .clampScalar(1, s16, s64);
+
----------------
Should probably swap these lines but it doesn't make much difference. The API could also use work for the common clamp-to-power-of-2-in-range case 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150677



More information about the llvm-commits mailing list