Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 ; Test that we handle icmp and fcmp on vectors | |
|
Jim Stichnoth
2016/02/10 19:08:12
End sentence with period. :)
Eric Holk
2016/02/10 21:07:20
Done.
| |
| 2 | |
| 3 ; TODO(eholk): This test will need to be updated once comparison is no | |
| 4 ; longer scalarized. | |
| 5 | |
| 6 ; REQUIRES: allow_dump | |
| 7 | |
| 8 ; Compile using standalone assembler. | |
| 9 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --args -Om1 \ | |
| 10 ; RUN: | FileCheck %s --check-prefix=ASM | |
| 11 | |
| 12 ; Show bytes in assembled standalone code. | |
| 13 ; RUN: %p2i --filetype=asm -i %s --target=arm32 --assemble --disassemble \ | |
| 14 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS | |
| 15 | |
| 16 ; Show bytes in assembled integrated code. | |
| 17 ; RUN: %p2i --filetype=iasm -i %s --target=arm32 --assemble --disassemble \ | |
| 18 ; RUN: --args -Om1 | FileCheck %s --check-prefix=DIS | |
| 19 | |
| 20 define internal <4 x i32> @cmpEq4I32(<4 x i32> %a, <4 x i32> %b) { | |
| 21 ; ASM-LABEL:cmpEq4I32: | |
| 22 ; DIS-LABEL:00000000 <cmpEq4I32>: | |
| 23 | |
| 24 entry: | |
| 25 %cmp = icmp eq <4 x i32> %a, %b | |
| 26 | |
| 27 ; ASM: cmp r1, r2 | |
| 28 ; ASM: cmp r1, r2 | |
| 29 ; ASM: cmp r1, r2 | |
| 30 ; ASM: cmp r1, r2 | |
| 31 ; DIS: 40: e1510002 | |
| 32 | |
| 33 %cmp.ret_ext = zext <4 x i1> %cmp to <4 x i32> | |
| 34 ret <4 x i32> %cmp.ret_ext | |
| 35 } | |
| 36 | |
| 37 define internal <4 x i32> @cmpEq4f32(<4 x float> %a, <4 x float> %b) { | |
| 38 ; ASM-LABEL:cmpEq4f32: | |
| 39 ; DIS-LABEL:00000240 <cmpEq4f32>: | |
| 40 | |
| 41 entry: | |
| 42 %cmp = fcmp oeq <4 x float> %a, %b | |
| 43 | |
| 44 ; ASM: vcmp.f32 s0, s1 | |
| 45 ; ASM: vcmp.f32 s0, s1 | |
| 46 ; ASM: vcmp.f32 s0, s1 | |
| 47 ; ASM: vcmp.f32 s0, s1 | |
| 48 ; DIS: 27c: eeb40a60 | |
| 49 | |
| 50 %cmp.ret_ext = zext <4 x i1> %cmp to <4 x i32> | |
| 51 ret <4 x i32> %cmp.ret_ext | |
| 52 } | |
| OLD | NEW |