Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(151)

Unified Diff: tests_lit/llvm2ice_tests/vector-bitcast.ll

Issue 1755333002: Subzero. ARM32. Fixes bugs uncovered by the llvm test suite. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests_lit/llvm2ice_tests/64bit.pnacl.ll ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cadd2b68f8b87523d038e8244a016614998b9d72..e7ac594bcb540fa385cffd09e61220dce48a5655 100644
--- a/tests_lit/llvm2ice_tests/vector-bitcast.ll
+++ b/tests_lit/llvm2ice_tests/vector-bitcast.ll
@@ -1,18 +1,31 @@
; This file tests bitcasts of vector type. For most operations, these
; should be lowered to a no-op on -O2.
-; RUN: %p2i -i %s --filetype=obj --disassemble --args -O2 \
-; RUN: | FileCheck %s
-; RUN: %p2i -i %s --filetype=obj --disassemble --args -Om1 \
-; RUN: | FileCheck --check-prefix=OPTM1 %s
+; RUN: %p2i -i %s --filetype=obj --disassemble --target=x8632 --args -O2 \
+; RUN: | FileCheck --check-prefix=X86-O2 --check-prefix=X86 %s
+; RUN: %p2i -i %s --filetype=obj --disassemble --target=x8632 --args -Om1 \
+; RUN: | FileCheck --check-prefix=X86 %s
+
+; RUN: %p2i -i %s --filetype=obj --disassemble --target=x8664 --args -O2 \
+; RUN: | FileCheck --check-prefix=X86-O2 --check-prefix=X86 %s
+; RUN: %p2i -i %s --filetype=obj --disassemble --target=x8664 --args -Om1 \
+; RUN: | FileCheck --check-prefix=X86 %s
+
+; RUN: %p2i -i %s --filetype=obj --disassemble --target=arm32 --args -O2 \
+; RUN: | FileCheck --check-prefix=ARM32-O2-O2 --check-prefix=ARM32 %s
+; RUN: %p2i -i %s --filetype=obj --disassemble --target=arm32 --args -Om1 \
+; RUN: | FileCheck --check-prefix=ARM32 %s
define internal <16 x i8> @test_bitcast_v16i8_to_v16i8(<16 x i8> %arg) {
entry:
%res = bitcast <16 x i8> %arg to <16 x i8>
ret <16 x i8> %res
-; CHECK-LABEL: test_bitcast_v16i8_to_v16i8
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v16i8_to_v16i8
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v16i8_to_v16i8
+; ARM32-O2-NEXT: bx
}
define internal <8 x i16> @test_bitcast_v16i8_to_v8i16(<16 x i8> %arg) {
@@ -20,8 +33,11 @@ entry:
%res = bitcast <16 x i8> %arg to <8 x i16>
ret <8 x i16> %res
-; CHECK-LABEL: test_bitcast_v16i8_to_v8i16
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v16i8_to_v8i16
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v16i8_to_v8i16
+; ARM32-O2-NEXT: bx
}
define internal <4 x i32> @test_bitcast_v16i8_to_v4i32(<16 x i8> %arg) {
@@ -29,8 +45,11 @@ entry:
%res = bitcast <16 x i8> %arg to <4 x i32>
ret <4 x i32> %res
-; CHECK-LABEL: test_bitcast_v16i8_to_v4i32
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v16i8_to_v4i32
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v16i8_to_v4i32
+; ARM32-O2-NEXT: bx
}
define internal <4 x float> @test_bitcast_v16i8_to_v4f32(<16 x i8> %arg) {
@@ -38,8 +57,11 @@ entry:
%res = bitcast <16 x i8> %arg to <4 x float>
ret <4 x float> %res
-; CHECK-LABEL: test_bitcast_v16i8_to_v4f32
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v16i8_to_v4f32
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v16i8_to_v4f32
+; ARM32-O2-NEXT: bx
}
define internal <16 x i8> @test_bitcast_v8i16_to_v16i8(<8 x i16> %arg) {
@@ -47,8 +69,11 @@ entry:
%res = bitcast <8 x i16> %arg to <16 x i8>
ret <16 x i8> %res
-; CHECK-LABEL: test_bitcast_v8i16_to_v16i8
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v8i16_to_v16i8
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v8i16_to_v16i8
+; ARM32-O2-NEXT: bx
}
define internal <8 x i16> @test_bitcast_v8i16_to_v8i16(<8 x i16> %arg) {
@@ -56,8 +81,11 @@ entry:
%res = bitcast <8 x i16> %arg to <8 x i16>
ret <8 x i16> %res
-; CHECK-LABEL: test_bitcast_v8i16_to_v8i16
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v8i16_to_v8i16
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v8i16_to_v8i16
+; ARM32-O2-NEXT: bx
}
define internal <4 x i32> @test_bitcast_v8i16_to_v4i32(<8 x i16> %arg) {
@@ -65,8 +93,11 @@ entry:
%res = bitcast <8 x i16> %arg to <4 x i32>
ret <4 x i32> %res
-; CHECK-LABEL: test_bitcast_v8i16_to_v4i32
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v8i16_to_v4i32
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v8i16_to_v4i32
+; ARM32-O2-NEXT: bx
}
define internal <4 x float> @test_bitcast_v8i16_to_v4f32(<8 x i16> %arg) {
@@ -74,8 +105,11 @@ entry:
%res = bitcast <8 x i16> %arg to <4 x float>
ret <4 x float> %res
-; CHECK-LABEL: test_bitcast_v8i16_to_v4f32
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v8i16_to_v4f32
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v8i16_to_v4f32
+; ARM32-O2-NEXT: bx
}
define internal <16 x i8> @test_bitcast_v4i32_to_v16i8(<4 x i32> %arg) {
@@ -83,8 +117,11 @@ entry:
%res = bitcast <4 x i32> %arg to <16 x i8>
ret <16 x i8> %res
-; CHECK-LABEL: test_bitcast_v4i32_to_v16i8
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v4i32_to_v16i8
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v4i32_to_v16i8
+; ARM32-O2-NEXT: bx
}
define internal <8 x i16> @test_bitcast_v4i32_to_v8i16(<4 x i32> %arg) {
@@ -92,8 +129,11 @@ entry:
%res = bitcast <4 x i32> %arg to <8 x i16>
ret <8 x i16> %res
-; CHECK-LABEL: test_bitcast_v4i32_to_v8i16
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v4i32_to_v8i16
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v4i32_to_v8i16
+; ARM32-O2-NEXT: bx
}
define internal <4 x i32> @test_bitcast_v4i32_to_v4i32(<4 x i32> %arg) {
@@ -101,8 +141,11 @@ entry:
%res = bitcast <4 x i32> %arg to <4 x i32>
ret <4 x i32> %res
-; CHECK-LABEL: test_bitcast_v4i32_to_v4i32
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v4i32_to_v4i32
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v4i32_to_v4i32
+; ARM32-O2-NEXT: bx
}
define internal <4 x float> @test_bitcast_v4i32_to_v4f32(<4 x i32> %arg) {
@@ -110,8 +153,11 @@ entry:
%res = bitcast <4 x i32> %arg to <4 x float>
ret <4 x float> %res
-; CHECK-LABEL: test_bitcast_v4i32_to_v4f32
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v4i32_to_v4f32
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v4i32_to_v4f32
+; ARM32-O2-NEXT: bx
}
define internal <16 x i8> @test_bitcast_v4f32_to_v16i8(<4 x float> %arg) {
@@ -119,8 +165,11 @@ entry:
%res = bitcast <4 x float> %arg to <16 x i8>
ret <16 x i8> %res
-; CHECK-LABEL: test_bitcast_v4f32_to_v16i8
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v4f32_to_v16i8
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v4f32_to_v16i8
+; ARM32-O2-NEXT: bx
}
define internal <8 x i16> @test_bitcast_v4f32_to_v8i16(<4 x float> %arg) {
@@ -128,8 +177,11 @@ entry:
%res = bitcast <4 x float> %arg to <8 x i16>
ret <8 x i16> %res
-; CHECK-LABEL: test_bitcast_v4f32_to_v8i16
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v4f32_to_v8i16
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v4f32_to_v8i16
+; ARM32-O2-NEXT: bx
}
define internal <4 x i32> @test_bitcast_v4f32_to_v4i32(<4 x float> %arg) {
@@ -137,8 +189,11 @@ entry:
%res = bitcast <4 x float> %arg to <4 x i32>
ret <4 x i32> %res
-; CHECK-LABEL: test_bitcast_v4f32_to_v4i32
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v4f32_to_v4i32
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v4f32_to_v4i32
+; ARM32-O2-NEXT: bx
}
define internal <4 x float> @test_bitcast_v4f32_to_v4f32(<4 x float> %arg) {
@@ -146,8 +201,11 @@ entry:
%res = bitcast <4 x float> %arg to <4 x float>
ret <4 x float> %res
-; CHECK-LABEL: test_bitcast_v4f32_to_v4f32
-; CHECK-NEXT: ret
+; X86-O2-LABEL: test_bitcast_v4f32_to_v4f32
+; X86-O2-NEXT: ret
+
+; ARM32-O2-LABEL: test_bitcast_v4f32_to_v4f32
+; ARM32-O2-NEXT: bx
}
define internal i32 @test_bitcast_v8i1_to_i8(<8 x i1> %arg) {
@@ -156,11 +214,11 @@ entry:
%res.i32 = zext i8 %res to i32
ret i32 %res.i32
-; CHECK-LABEL: test_bitcast_v8i1_to_i8
-; CHECK: call {{.*}} R_{{.*}} __Sz_bitcast_8xi1_i8
+; X86-LABEL: test_bitcast_v8i1_to_i8
+; X86: call {{.*}} R_{{.*}} __Sz_bitcast_8xi1_i8
-; OPTM1-LABEL: test_bitcast_v8i1_to_i8
-; OPMT1: call -4
+; ARM32-LABEL: test_bitcast_v8i1_to_i8
+; ARM32: bl {{.*}} __Sz_bitcast_8xi1_i8
}
define internal i32 @test_bitcast_v16i1_to_i16(<16 x i1> %arg) {
@@ -169,11 +227,11 @@ entry:
%res.i32 = zext i16 %res to i32
ret i32 %res.i32
-; CHECK-LABEL: test_bitcast_v16i1_to_i16
-; CHECK: call {{.*}} R_{{.*}} __Sz_bitcast_16xi1_i16
+; X86-LABEL: test_bitcast_v16i1_to_i16
+; X86: call {{.*}} __Sz_bitcast_16xi1_i16
-; OPTM1-LABEL: test_bitcast_v16i1_to_i16
-; OPMT1: call -4
+; ARM32-LABEL: test_bitcast_v16i1_to_i16
+; ARM32: bl {{.*}} __Sz_bitcast_16xi1_i16
}
define internal <8 x i1> @test_bitcast_i8_to_v8i1(i32 %arg) {
@@ -182,11 +240,11 @@ entry:
%res = bitcast i8 %arg.trunc to <8 x i1>
ret <8 x i1> %res
-; CHECK-LABEL: test_bitcast_i8_to_v8i1
-; CHECK: call {{.*}} R_{{.*}} __Sz_bitcast_i8_8xi1
+; X86-LABEL: test_bitcast_i8_to_v8i1
+; X86: call {{.*}} R_{{.*}} __Sz_bitcast_i8_8xi1
-; OPTM1-LABEL: test_bitcast_i8_to_v8i1
-; OPTM1: call {{.*}} R_{{.*}} __Sz_bitcast_i8_8xi1
+; ARM32-LABEL: test_bitcast_i8_to_v8i1
+; ARM32: bl {{.*}} __Sz_bitcast_i8_8xi1
}
define internal <16 x i1> @test_bitcast_i16_to_v16i1(i32 %arg) {
@@ -195,9 +253,9 @@ entry:
%res = bitcast i16 %arg.trunc to <16 x i1>
ret <16 x i1> %res
-; CHECK-LABEL: test_bitcast_i16_to_v16i1
-; CHECK: call {{.*}} R_{{.*}} __Sz_bitcast_i16_16xi1
+; X86-LABEL: test_bitcast_i16_to_v16i1
+; X86: call {{.*}} R_{{.*}} __Sz_bitcast_i16_16xi1
-; OPTM1-LABEL: test_bitcast_i16_to_v16i1
-; OPTM1: call {{.*}} R_{{.*}} __Sz_bitcast_i16_16xi1
+; ARM32-LABEL: test_bitcast_i16_to_v16i1
+; ARM32: bl {{.*}} __Sz_bitcast_i16_16xi1
}
« no previous file with comments | « tests_lit/llvm2ice_tests/64bit.pnacl.ll ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698