forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[RISCV][GISEL] Add support for lowerFormalArguments that contain scal…
…able vector types (llvm#70882) Scalable vector types from LLVM IR can be lowered to scalable vector types in MIR according to the RISCVAssignFn.
- Loading branch information
1 parent
ed8f2bc
commit c18fed5
Showing
9 changed files
with
984 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
llvm/test/CodeGen/RISCV/GlobalISel/irtranslator/vec-args-bf16-err.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
; RUN: not --crash llc -mtriple=riscv32 -mattr=+v -global-isel -stop-after=irtranslator \ | ||
; RUN: -verify-machineinstrs < %s 2>&1 | FileCheck %s | ||
; RUN: not --crash llc -mtriple=riscv64 -mattr=+v -global-isel -stop-after=irtranslator \ | ||
; RUN: -verify-machineinstrs < %s 2>&1 | FileCheck %s | ||
|
||
; The purpose of this test is to show that the compiler throws an error when | ||
; there is no support for bf16 vectors. If the compiler did not throw an error, | ||
; then it will try to scalarize the argument to an s32, which may drop elements. | ||
define void @test_args_nxv1bf16(<vscale x 1 x bfloat> %a) { | ||
entry: | ||
ret void | ||
} | ||
|
||
; CHECK: LLVM ERROR: unable to lower arguments: ptr (in function: test_args_nxv1bf16) | ||
|
||
|
16 changes: 16 additions & 0 deletions
16
llvm/test/CodeGen/RISCV/GlobalISel/irtranslator/vec-args-f16-err.ll
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
; RUN: not --crash llc -mtriple=riscv32 -mattr=+v -global-isel -stop-after=irtranslator \ | ||
; RUN: -verify-machineinstrs < %s 2>&1 | FileCheck %s | ||
; RUN: not --crash llc -mtriple=riscv64 -mattr=+v -global-isel -stop-after=irtranslator \ | ||
; RUN: -verify-machineinstrs < %s 2>&1 | FileCheck %s | ||
|
||
; The purpose of this test is to show that the compiler throws an error when | ||
; there is no support for f16 vectors. If the compiler did not throw an error, | ||
; then it will try to scalarize the argument to an s32, which may drop elements. | ||
define void @test_args_nxv1f16(<vscale x 1 x half> %a) { | ||
entry: | ||
ret void | ||
} | ||
|
||
; CHECK: LLVM ERROR: unable to lower arguments: ptr (in function: test_args_nxv1f16) | ||
|
||
|
Oops, something went wrong.