[llvm] [X86] Adding lowerings for vector ISD::LRINT and ISD::LLRINT (PR #90065)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 26 07:23:32 PDT 2024
================
@@ -1731,6 +1735,16 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
for (auto VT : { MVT::v1i1, MVT::v2i1, MVT::v4i1, MVT::v8i1 })
setOperationAction(ISD::EXTRACT_SUBVECTOR, VT, Custom);
}
+ if (Subtarget.hasDQI() && Subtarget.hasVLX()) {
+ setOperationAction(ISD::LRINT, MVT::v4f32, Legal);
----------------
RKSimon wrote:
Maybe worth using the VT iteration pattern:
```
for (MVT VT : { MVT::v4f32, MVT::v8f32, MVT::v2f64, MVT::v4f64 }) {
setOperationAction(ISD::LRINT, VT, Legal);
setOperationAction(ISD::LLRINT, VT, Legal);
}
```
https://github.com/llvm/llvm-project/pull/90065
More information about the llvm-commits
mailing list