[llvm] [NVPTX] Make i16x2 a native type and add supported vec instructions (PR #65432)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 6 14:16:47 PDT 2023
================
@@ -207,8 +209,13 @@ static void ComputePTXValueVTs(const TargetLowering &TLI, const DataLayout &DL,
// Vectors with an even number of f16 elements will be passed to
// us as an array of v2f16/v2bf16 elements. We must match this so we
// stay in sync with Ins/Outs.
- if ((Isf16Orbf16Type(EltVT.getSimpleVT())) && NumElts % 2 == 0) {
- EltVT = EltVT == MVT::f16 ? MVT::v2f16 : MVT::v2bf16;
+ if ((Is16bitsType(EltVT.getSimpleVT())) && NumElts % 2 == 0) {
+ if (EltVT == MVT::f16)
----------------
ThomasRaoux wrote:
EltVT is not an enum so using it in a switch doesn't work out of the box. So I left it like that, let me know if you see a better way.
https://github.com/llvm/llvm-project/pull/65432
More information about the llvm-commits
mailing list