Since there is no mask instruction for vXi1 with avx512f in X86 target.
Folding select for vXi1 doesn't help to reduce instructions.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/CodeGen/X86/fold-select.ll | ||
---|---|---|
4 | I think passing vXi1 from arguments is not a common scenario. vXi1 will be promoted vXi16 during lowering arguments. You should add new test cases that generating vXi1 in the IR, e.g.: %a = icmp eq <8 x i16> %0, %1 ... |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
34856 | Should be better to use isTypeLegal(VT)? |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
34856 | If the problematic case is vXi1, then can we just check for the element type? |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
34856 | I guess it is used to prevent crash in line 34861. Check element type should be fine since we have checked isVector. |
Should be better to use isTypeLegal(VT)?