diff options
| author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-01-22 18:53:41 +0000 |
|---|---|---|
| committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2019-01-22 18:53:41 +0000 |
| commit | a7cd83bc88b0a8cbd07b3dbe078e11a0a4e9e442 (patch) | |
| tree | b20ce4c56cdefb23e1667c8ca7e0f161dee3da36 /llvm/test/Verifier | |
| parent | 4063cfc7451fb02b52b27e6298703743c7661cdd (diff) | |
| download | bcm5719-llvm-a7cd83bc88b0a8cbd07b3dbe078e11a0a4e9e442.tar.gz bcm5719-llvm-a7cd83bc88b0a8cbd07b3dbe078e11a0a4e9e442.zip | |
GlobalISel: Disallow vectors for G_CONSTANT/G_FCONSTANT
llvm-svn: 351853
Diffstat (limited to 'llvm/test/Verifier')
| -rw-r--r-- | llvm/test/Verifier/test_g_constant.mir | 18 | ||||
| -rw-r--r-- | llvm/test/Verifier/test_g_fconstant.mir | 15 |
2 files changed, 33 insertions, 0 deletions
diff --git a/llvm/test/Verifier/test_g_constant.mir b/llvm/test/Verifier/test_g_constant.mir new file mode 100644 index 00000000000..2fa8d03505c --- /dev/null +++ b/llvm/test/Verifier/test_g_constant.mir @@ -0,0 +1,18 @@ +#RUN: not llc -o - -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s +# REQUIRES: global-isel, aarch64-registered-target + +--- +name: test_constant +legalized: true +regBankSelected: false +selected: false +tracksRegLiveness: true +liveins: +body: | + bb.0: + ; CHECK: Bad machine code: Instruction cannot use a vector result type + %0:_(<2 x s32>) = G_CONSTANT i32 0 + + ; CHECK: Bad machine code: Too few operands + %1:_(s32) = G_CONSTANT +... diff --git a/llvm/test/Verifier/test_g_fconstant.mir b/llvm/test/Verifier/test_g_fconstant.mir new file mode 100644 index 00000000000..fecc47de5be --- /dev/null +++ b/llvm/test/Verifier/test_g_fconstant.mir @@ -0,0 +1,15 @@ +#RUN: not llc -o - -global-isel -run-pass=none -verify-machineinstrs %s 2>&1 | FileCheck %s +# REQUIRES: global-isel, aarch64-registered-target + +--- +name: test_fconstant_vector +legalized: true +regBankSelected: false +selected: false +tracksRegLiveness: true +liveins: +body: | + bb.0: + ; CHECK: Bad machine code: Instruction cannot use a vector result type + %0:_(<2 x s32>) = G_FCONSTANT float 0.0 +... |

