| Issue |
63345
|
| Summary |
[NVPTX][bfloat] vector load support:`Cannot select: t27: bf16 = extract_vector_elt t18, Constant:i64<1>`
|
| Labels |
bug,
backend:NVPTX
|
| Assignees |
|
| Reporter |
qcolombet
|
The NVPTX backend is lacking `bfloat` support for even basic stuff.
For instance, given the following IR:
```llvm
target datalayout = "e-i64:64-i128:128-v16:16-v32:32-n16:32:64"
target triple = "nvptx64-nvidia-cuda"
; Function Attrs: mustprogress nofree nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite)
define void @foo(ptr noalias readonly align 16 %arg, ptr noalias align 16 %arg1) local_unnamed_addr #0 {
bb:
%i = addrspacecast ptr %arg1 to ptr addrspace(1)
%i2 = addrspacecast ptr %arg to ptr addrspace(1)
%i11 = load <4 x bfloat>, ptr addrspace(1) %i2, align 4
store <4 x bfloat> %i11, ptr addrspace(1) %i, align 8
ret void
}
attributes #0 = { mustprogress nofree nosync nounwind willreturn memory(argmem: readwrite, inaccessiblemem: readwrite) }
attributes #1 = { nocallback nofree nosync nounwind speculatable willreturn memory(none) }
!nvvm.annotations = !{!0, !1, !2, !3}
!0 = !{ptr @foo, !"kernel", i32 1}
!1 = !{ptr @foo, !"maxntidx", i32 64}
!2 = !{ptr @foo, !"maxntidy", i32 1}
!3 = !{ptr @foo, !"maxntidz", i32 1}
```
Compiled with:
```
llc -o - <in>.ll -mcpu=sm_80
```
The backend will crash with:
```
LLVM ERROR: Cannot select: t27: bf16 = extract_vector_elt t18, Constant:i64<1>
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs