When avx512 is available the lhs operand of select instruction can be
folded with mask instruction, while the rhs operand can't. This patch is
to commute the lhs and rhs of the select instruction to create the
opportunity of folding.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
20028 | Do we actually need canCombineAsMaskOperation to take 2 input operands? Its other use in lowerVECTOR_SHUFFLE looks like it could be split to call it twice. |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
20028 | Taking 1 input operand looks better. |
Comment Actions
LGTM - please commit the canCombineAsMaskOperation/lowerVECTOR_SHUFFLE refactor first as a pre-commit and then the commuteSelect patch afterward.
Do we actually need canCombineAsMaskOperation to take 2 input operands? Its other use in lowerVECTOR_SHUFFLE looks like it could be split to call it twice.