[PATCH] D149572: [LegalizeVectorOps][AArch64][RISCV][X86] Use OpVT for ISD::SETCC in LegalizeVectorOps.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 11:26:28 PDT 2023


craig.topper added a comment.

In D149572#4309831 <https://reviews.llvm.org/D149572#4309831>, @barannikov88 wrote:

> I think both the result and the operands should be legalized.
> I'd suggest to set Action to the action for an operand only if action for the result
> is Legal, analogous to first checking for condcode legality above.

In most cases, the legalization is less about the exact types and just that all floating point or all integer comparisons need to be legalized.

For targets without legal i1 vector result types, the result type for a vector FP compare is the integer type with elements the same size as the FP elements type. For vector integer compares the source and dest would be the same type. So if we check both types, I think that would force FP compares to be custom handled even if only the integer compares need custom handling.

I would prefer to make FP compares be identified by FP types, and integer compares identified by integer types.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149572



More information about the llvm-commits mailing list