[PATCH] D150790: [GlobalIsel][X86] fix legalization of G_CTLZ and G_CTPOP

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 22:03:48 PDT 2023


tschuett added inline comments.


================
Comment at: llvm/lib/Target/X86/X86LegalizerInfo.cpp:305
+      .clampScalar(1, s16, s64);
+  }
+
----------------
RKSimon wrote:
> RKSimon wrote:
> > We need to split this - with just s64 legality here  and s16/s32 in setLegalizerInfo32bit above
> > 
> > And just widen sub 32 cases to s32
> You should be able to just use legalIf() to support this properly
I will try this in a followup diff. This diff is only about correctness.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150790



More information about the llvm-commits mailing list