Index: tests_lit/llvm2ice_tests/vector-bitcast.ll |
diff --git a/tests_lit/llvm2ice_tests/vector-bitcast.ll b/tests_lit/llvm2ice_tests/vector-bitcast.ll |
index 3da21a27ad6758767f1424ae3de7be4ab900a3a0..793f93d7dce8ecff2abf14e59c1600ba71f5851c 100644 |
--- a/tests_lit/llvm2ice_tests/vector-bitcast.ll |
+++ b/tests_lit/llvm2ice_tests/vector-bitcast.ll |
@@ -1,12 +1,22 @@ |
; This file tests bitcasts of vector type. For most operations, these |
; should be lowered to a no-op on -O2. |
-; RUN: %llvm2ice -O2 --verbose none %s | FileCheck %s |
-; RUN: %llvm2ice -Om1 --verbose none %s | FileCheck %s --check-prefix=OPTM1 |
+; TODO(jvoung): remove -ffunction-sections and the "Disassembly of section..." |
+; Sadly... diassembling some "ret" within a section are broken in |
+; llvm-objdump for LLVM 3.4, and 3.5. It was only fixed in 3.6. |
+; TODO(jvoung): fix extra "CALLTARGETS" run. The llvm-objdump symbolizer |
+; doesn't know how to symbolize non-section-local functions. |
+; The newer LLVM 3.6 one does work, but watch out for other bugs. |
+ |
; RUN: %llvm2ice -O2 --verbose none %s \ |
-; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj |
-; RUN: %llvm2ice -Om1 --verbose none %s \ |
-; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj |
+; RUN: | FileCheck --check-prefix=CALLTARGETS %s |
+; RUN: %llvm2ice -O2 --verbose none -ffunction-sections %s \ |
+; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
+; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - | FileCheck %s |
+; RUN: %llvm2ice -Om1 --verbose none -ffunction-sections %s \ |
+; RUN: | llvm-mc -triple=i686-none-nacl -x86-asm-syntax=intel -filetype=obj \ |
+; RUN: | llvm-objdump -d -symbolize -x86-asm-syntax=intel - \ |
+; RUN: | FileCheck --check-prefix=OPTM1 %s |
; RUN: %llvm2ice --verbose none %s | FileCheck --check-prefix=ERRORS %s |
; RUN: %llvm2iceinsts %s | %szdiff %s | FileCheck --check-prefix=DUMP %s |
; RUN: %llvm2iceinsts --pnacl %s | %szdiff %s \ |
@@ -17,8 +27,8 @@ entry: |
%res = bitcast <16 x i8> %arg to <16 x i8> |
ret <16 x i8> %res |
-; CHECK-LABEL: test_bitcast_v16i8_to_v16i8: |
-; CHECK: .L{{.*}}entry: |
+; CHECK-LABEL: Disassembly of section .text.test |
+; CHECK-LABEL: test_bitcast_v16i8_to_v16i8 |
; CHECK-NEXT: ret |
} |
@@ -27,8 +37,8 @@ entry: |
%res = bitcast <16 x i8> %arg to <8 x i16> |
ret <8 x i16> %res |
-; CHECK-LABEL: test_bitcast_v16i8_to_v8i16: |
-; CHECK: .L{{.*}}entry: |
+; CHECK-LABEL: Disassembly of section .text.test |
+; CHECK-LABEL: test_bitcast_v16i8_to_v8i16 |
; CHECK-NEXT: ret |
} |
@@ -37,8 +47,8 @@ entry: |
%res = bitcast <16 x i8> %arg to <4 x i32> |
ret <4 x i32> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v16i8_to_v4i32: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -47,8 +57,8 @@ entry: |
%res = bitcast <16 x i8> %arg to <4 x float> |
ret <4 x float> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v16i8_to_v4f32: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -57,8 +67,8 @@ entry: |
%res = bitcast <8 x i16> %arg to <16 x i8> |
ret <16 x i8> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v8i16_to_v16i8: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -67,8 +77,8 @@ entry: |
%res = bitcast <8 x i16> %arg to <8 x i16> |
ret <8 x i16> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v8i16_to_v8i16: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -77,8 +87,8 @@ entry: |
%res = bitcast <8 x i16> %arg to <4 x i32> |
ret <4 x i32> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v8i16_to_v4i32: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -87,8 +97,8 @@ entry: |
%res = bitcast <8 x i16> %arg to <4 x float> |
ret <4 x float> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v8i16_to_v4f32: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -97,8 +107,8 @@ entry: |
%res = bitcast <4 x i32> %arg to <16 x i8> |
ret <16 x i8> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v4i32_to_v16i8: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -107,8 +117,8 @@ entry: |
%res = bitcast <4 x i32> %arg to <8 x i16> |
ret <8 x i16> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v4i32_to_v8i16: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -117,8 +127,8 @@ entry: |
%res = bitcast <4 x i32> %arg to <4 x i32> |
ret <4 x i32> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v4i32_to_v4i32: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -127,8 +137,8 @@ entry: |
%res = bitcast <4 x i32> %arg to <4 x float> |
ret <4 x float> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v4i32_to_v4f32: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -137,8 +147,8 @@ entry: |
%res = bitcast <4 x float> %arg to <16 x i8> |
ret <16 x i8> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v4f32_to_v16i8: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -147,8 +157,8 @@ entry: |
%res = bitcast <4 x float> %arg to <8 x i16> |
ret <8 x i16> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v4f32_to_v8i16: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -157,8 +167,8 @@ entry: |
%res = bitcast <4 x float> %arg to <4 x i32> |
ret <4 x i32> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v4f32_to_v4i32: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -167,8 +177,8 @@ entry: |
%res = bitcast <4 x float> %arg to <4 x float> |
ret <4 x float> %res |
+; CHECK-LABEL: Disassembly of section .text.test |
; CHECK-LABEL: test_bitcast_v4f32_to_v4f32: |
-; CHECK: .L{{.*}}entry: |
; CHECK-NEXT: ret |
} |
@@ -178,10 +188,12 @@ entry: |
ret i8 %res |
; CHECK-LABEL: test_bitcast_v8i1_to_i8: |
-; CHECK: call Sz_bitcast_v8i1_to_i8 |
+; CHECK: call -4 |
+; CALLTARGETS-LABEL: test_bitcast_v8i1_to_i8: |
+; CALLTARGETS: call Sz_bitcast_v8i1_to_i8 |
; OPTM1-LABEL: test_bitcast_v8i1_to_i8: |
-; OPMT1: call Sz_bitcast_v8i1_to_i8 |
+; OPMT1: call -4 |
} |
define i16 @test_bitcast_v16i1_to_i16(<16 x i1> %arg) { |
@@ -190,10 +202,12 @@ entry: |
ret i16 %res |
; CHECK-LABEL: test_bitcast_v16i1_to_i16: |
-; CHECK: call Sz_bitcast_v16i1_to_i16 |
+; CHECK: call -4 |
+; CALLTARGETS-LABEL: test_bitcast_v16i1_to_i16: |
+; CALLTARGETS: call Sz_bitcast_v16i1_to_i16 |
; OPTM1-LABEL: test_bitcast_v16i1_to_i16: |
-; OPMT1: call Sz_bitcast_v16i1_to_i16 |
+; OPMT1: call -4 |
} |
define <8 x i1> @test_bitcast_i8_to_v8i1(i32 %arg) { |
@@ -203,10 +217,12 @@ entry: |
ret <8 x i1> %res |
; CHECK-LABEL: test_bitcast_i8_to_v8i1: |
-; CHECK: call Sz_bitcast_i8_to_v8i1 |
+; CHECK: call -4 |
+; CALLTARGETS-LABEL: test_bitcast_i8_to_v8i1 |
+; CALLTARGETS: call Sz_bitcast_i8_to_v8i1 |
; OPTM1-LABEL: test_bitcast_i8_to_v8i1: |
-; OPTM1: call Sz_bitcast_i8_to_v8i1 |
+; OPTM1: call -4 |
} |
define <16 x i1> @test_bitcast_i16_to_v16i1(i32 %arg) { |
@@ -216,10 +232,12 @@ entry: |
ret <16 x i1> %res |
; CHECK-LABEL: test_bitcast_i16_to_v16i1: |
-; CHECK: call Sz_bitcast_i16_to_v16i1 |
+; CHECK: call -4 |
+; CALLTARGETS-LABEL: test_bitcast_i16_to_v16i1 |
+; CALLTARGETS: call Sz_bitcast_i16_to_v16i1 |
; OPTM1-LABEL: test_bitcast_i16_to_v16i1: |
-; OPTM1: call Sz_bitcast_i16_to_v16i1 |
+; OPTM1: call -4 |
} |
; ERRORS-NOT: ICE translation error |