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

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 17 13:38:55 PDT 2023


RKSimon added inline comments.


================
Comment at: llvm/lib/Target/X86/X86LegalizerInfo.cpp:305
+      .clampScalar(1, s16, s64);
+  }
+
----------------
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


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