[PATCH] D141782: [X86] Don't fold select for vXi1 on X86 target.

Phoebe Wang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 05:56:35 PST 2023


pengfei added inline comments.


================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:34856
     return false;
+  if (!VT.isSimple())
+    return false;
----------------
lebedev.ri wrote:
> pengfei wrote:
> > Should be better to use `isTypeLegal(VT)`?
> If the problematic case is `vXi1`, then can we just check for the element type?
> Why is this here?
I guess it is used to prevent crash in line 34861. Check element type should be fine since we have checked `isVector`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141782



More information about the llvm-commits mailing list