OLD | NEW |
---|---|
1 ; Tests insertelement and extractelement vector instructions report | 1 ; Tests insertelement and extractelement vector instructions report |
2 ; errors when malformed. Note: We can only test literal indexing since | 2 ; errors when malformed. Note: We can only test literal indexing since |
3 ; llvm-as will not allow other bad forms of these instructions. | 3 ; llvm-as will not allow other bad forms of these instructions. |
4 | 4 |
5 ; REQUIRES: allow_dump | |
6 ; RUN: llvm-as < %s | pnacl-freeze \ | 5 ; RUN: llvm-as < %s | pnacl-freeze \ |
7 ; RUN: | not %llvm2ice -notranslate -build-on-read \ | 6 ; RUN: | not %llvm2ice -notranslate -build-on-read \ |
8 ; RUN: -allow-pnacl-reader-error-recovery | FileCheck %s | 7 ; RUN: -allow-pnacl-reader-error-recovery | FileCheck %s |
9 | 8 |
10 define void @ExtractV4xi1(<4 x i1> %v, i32 %i) { | 9 define void @ExtractV4xi1(<4 x i1> %v, i32 %i) { |
11 %e0 = extractelement <4 x i1> %v, i32 %i | 10 %e0 = extractelement <4 x i1> %v, i32 %i |
12 ; CHECK: Error: {{.*}} not {{.*}} constant | 11 ; CHECK: Error: {{.*}} not {{.*}} constant |
jvoung (off chromium)
2014/11/17 22:16:10
I didn't think about this when making the suggesti
Jim Stichnoth
2014/11/18 16:04:58
Good point. What about retaining most or all of t
Karl
2014/11/19 18:34:09
Built a test directory "parse-errs" for parsing er
| |
13 %e1 = extractelement <4 x i1> %v, i32 4 | 12 %e1 = extractelement <4 x i1> %v, i32 4 |
14 ; CHECK: Error: {{.*}} not in range | 13 ; CHECK: Error: {{.*}} not in range |
15 %e2 = extractelement <4 x i1> %v, i32 9 | 14 %e2 = extractelement <4 x i1> %v, i32 9 |
16 ; CHECK: Error: {{.*}} not in range | 15 ; CHECK: Error: {{.*}} not in range |
17 ret void | 16 ret void |
18 } | 17 } |
19 | 18 |
20 define void @ExtractV8xi1(<8 x i1> %v, i32 %i) { | 19 define void @ExtractV8xi1(<8 x i1> %v, i32 %i) { |
21 %e0 = extractelement <8 x i1> %v, i32 %i | 20 %e0 = extractelement <8 x i1> %v, i32 %i |
22 ; CHECK: Error: {{.*}} not {{.*}} constant | 21 ; CHECK: Error: {{.*}} not {{.*}} constant |
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
140 | 139 |
141 define <4 x float> @InsertV4xfloat(<4 x float> %v, i32 %i) { | 140 define <4 x float> @InsertV4xfloat(<4 x float> %v, i32 %i) { |
142 %r0 = insertelement <4 x float> %v, float 3.0, i32 %i | 141 %r0 = insertelement <4 x float> %v, float 3.0, i32 %i |
143 ; CHECK: Error: {{.*}} not {{.*}} constant | 142 ; CHECK: Error: {{.*}} not {{.*}} constant |
144 %r1 = insertelement <4 x float> %v, float 3.0, i32 4 | 143 %r1 = insertelement <4 x float> %v, float 3.0, i32 4 |
145 ; CHECK: Error: {{.*}} not in range | 144 ; CHECK: Error: {{.*}} not in range |
146 %r2 = insertelement <4 x float> %v, float 3.0, i32 44 | 145 %r2 = insertelement <4 x float> %v, float 3.0, i32 44 |
147 ; CHECK: Error: {{.*}} not in range | 146 ; CHECK: Error: {{.*}} not in range |
148 ret <4 x float> %r2 | 147 ret <4 x float> %r2 |
149 } | 148 } |
OLD | NEW |