| Index: tests_lit/reader_tests/nacl-other-intrinsics.ll
|
| diff --git a/tests_lit/reader_tests/nacl-other-intrinsics.ll b/tests_lit/reader_tests/nacl-other-intrinsics.ll
|
| index fda89321792bec8d600d9ba381b6330c3257a001..38cd72d7ebe2b67a13d28b022009dc9b97b08794 100644
|
| --- a/tests_lit/reader_tests/nacl-other-intrinsics.ll
|
| +++ b/tests_lit/reader_tests/nacl-other-intrinsics.ll
|
| @@ -1,8 +1,10 @@
|
| ; This tests parsing NaCl intrinsics not related to atomic operations.
|
|
|
| -; RUN: %p2i -i %s --insts | FileCheck %s
|
| +; RUN: %p2i -i %s --insts --args -allow-externally-defined-symbols \
|
| +; RUN: | FileCheck %s
|
| ; RUN: %if --need=allow_disable_ir_gen --command \
|
| ; RUN: %p2i -i %s --args -notranslate -timing -no-ir-gen \
|
| +; RUN: -allow-externally-defined-symbols \
|
| ; RUN: | %if --need=allow_disable_ir_gen --command \
|
| ; RUN: FileCheck --check-prefix=NOIR %s
|
|
|
| @@ -30,20 +32,20 @@ declare i64 @llvm.ctpop.i64(i64)
|
| declare i8* @llvm.stacksave()
|
| declare void @llvm.stackrestore(i8*)
|
|
|
| -define i32 @test_nacl_read_tp() {
|
| +define internal i32 @test_nacl_read_tp() {
|
| entry:
|
| %ptr = call i8* @llvm.nacl.read.tp()
|
| %__1 = ptrtoint i8* %ptr to i32
|
| ret i32 %__1
|
| }
|
|
|
| -; CHECK: define i32 @test_nacl_read_tp() {
|
| +; CHECK: define internal i32 @test_nacl_read_tp() {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %ptr = call i32 @llvm.nacl.read.tp()
|
| ; CHECK-NEXT: ret i32 %ptr
|
| ; CHECK-NEXT: }
|
|
|
| -define void @test_memcpy(i32 %iptr_dst, i32 %iptr_src, i32 %len) {
|
| +define internal void @test_memcpy(i32 %iptr_dst, i32 %iptr_src, i32 %len) {
|
| entry:
|
| %dst = inttoptr i32 %iptr_dst to i8*
|
| %src = inttoptr i32 %iptr_src to i8*
|
| @@ -52,13 +54,13 @@ entry:
|
| ret void
|
| }
|
|
|
| -; CHECK-NEXT: define void @test_memcpy(i32 %iptr_dst, i32 %iptr_src, i32 %len) {
|
| +; CHECK-NEXT: define internal void @test_memcpy(i32 %iptr_dst, i32 %iptr_src, i32 %len) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i32 %iptr_dst, i32 %iptr_src, i32 %len, i32 1, i1 false)
|
| ; CHECK-NEXT: ret void
|
| ; CHECK-NEXT: }
|
|
|
| -define void @test_memmove(i32 %iptr_dst, i32 %iptr_src, i32 %len) {
|
| +define internal void @test_memmove(i32 %iptr_dst, i32 %iptr_src, i32 %len) {
|
| entry:
|
| %dst = inttoptr i32 %iptr_dst to i8*
|
| %src = inttoptr i32 %iptr_src to i8*
|
| @@ -67,13 +69,13 @@ entry:
|
| ret void
|
| }
|
|
|
| -; CHECK-NEXT: define void @test_memmove(i32 %iptr_dst, i32 %iptr_src, i32 %len) {
|
| +; CHECK-NEXT: define internal void @test_memmove(i32 %iptr_dst, i32 %iptr_src, i32 %len) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: call void @llvm.memmove.p0i8.p0i8.i32(i32 %iptr_dst, i32 %iptr_src, i32 %len, i32 1, i1 false)
|
| ; CHECK-NEXT: ret void
|
| ; CHECK-NEXT: }
|
|
|
| -define void @test_memset(i32 %iptr_dst, i32 %wide_val, i32 %len) {
|
| +define internal void @test_memset(i32 %iptr_dst, i32 %wide_val, i32 %len) {
|
| entry:
|
| %val = trunc i32 %wide_val to i8
|
| %dst = inttoptr i32 %iptr_dst to i8*
|
| @@ -82,14 +84,14 @@ entry:
|
| ret void
|
| }
|
|
|
| -; CHECK-NEXT: define void @test_memset(i32 %iptr_dst, i32 %wide_val, i32 %len) {
|
| +; CHECK-NEXT: define internal void @test_memset(i32 %iptr_dst, i32 %wide_val, i32 %len) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %val = trunc i32 %wide_val to i8
|
| ; CHECK-NEXT: call void @llvm.memset.p0i8.i32(i32 %iptr_dst, i8 %val, i32 %len, i32 1, i1 false)
|
| ; CHECK-NEXT: ret void
|
| ; CHECK-NEXT: }
|
|
|
| -define i32 @test_setjmplongjmp(i32 %iptr_env) {
|
| +define internal i32 @test_setjmplongjmp(i32 %iptr_env) {
|
| entry:
|
| %env = inttoptr i32 %iptr_env to i8*
|
| %i = call i32 @llvm.nacl.setjmp(i8* %env)
|
| @@ -104,7 +106,7 @@ NonZero:
|
| ret i32 1
|
| }
|
|
|
| -; CHECK-NEXT: define i32 @test_setjmplongjmp(i32 %iptr_env) {
|
| +; CHECK-NEXT: define internal i32 @test_setjmplongjmp(i32 %iptr_env) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %i = call i32 @llvm.nacl.setjmp(i32 %iptr_env)
|
| ; CHECK-NEXT: %r1 = icmp eq i32 %i, 0
|
| @@ -116,7 +118,7 @@ NonZero:
|
| ; CHECK-NEXT: ret i32 1
|
| ; CHECK-NEXT: }
|
|
|
| -define float @test_sqrt_float(float %x, i32 %iptr) {
|
| +define internal float @test_sqrt_float(float %x, i32 %iptr) {
|
| entry:
|
| %r = call float @llvm.sqrt.f32(float %x)
|
| %r2 = call float @llvm.sqrt.f32(float %r)
|
| @@ -125,7 +127,7 @@ entry:
|
| ret float %r4
|
| }
|
|
|
| -; CHECK-NEXT: define float @test_sqrt_float(float %x, i32 %iptr) {
|
| +; CHECK-NEXT: define internal float @test_sqrt_float(float %x, i32 %iptr) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call float @llvm.sqrt.f32(float %x)
|
| ; CHECK-NEXT: %r2 = call float @llvm.sqrt.f32(float %r)
|
| @@ -134,7 +136,7 @@ entry:
|
| ; CHECK-NEXT: ret float %r4
|
| ; CHECK-NEXT: }
|
|
|
| -define double @test_sqrt_double(double %x, i32 %iptr) {
|
| +define internal double @test_sqrt_double(double %x, i32 %iptr) {
|
| entry:
|
| %r = call double @llvm.sqrt.f64(double %x)
|
| %r2 = call double @llvm.sqrt.f64(double %r)
|
| @@ -143,7 +145,7 @@ entry:
|
| ret double %r4
|
| }
|
|
|
| -; CHECK-NEXT: define double @test_sqrt_double(double %x, i32 %iptr) {
|
| +; CHECK-NEXT: define internal double @test_sqrt_double(double %x, i32 %iptr) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call double @llvm.sqrt.f64(double %x)
|
| ; CHECK-NEXT: %r2 = call double @llvm.sqrt.f64(double %r)
|
| @@ -152,7 +154,7 @@ entry:
|
| ; CHECK-NEXT: ret double %r4
|
| ; CHECK-NEXT: }
|
|
|
| -define float @test_fabs_float(float %x) {
|
| +define internal float @test_fabs_float(float %x) {
|
| entry:
|
| %r = call float @llvm.fabs.f32(float %x)
|
| %r2 = call float @llvm.fabs.f32(float %r)
|
| @@ -161,7 +163,7 @@ entry:
|
| ret float %r4
|
| }
|
|
|
| -; CHECK-NEXT: define float @test_fabs_float(float %x) {
|
| +; CHECK-NEXT: define internal float @test_fabs_float(float %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call float @llvm.fabs.f32(float %x)
|
| ; CHECK-NEXT: %r2 = call float @llvm.fabs.f32(float %r)
|
| @@ -170,7 +172,7 @@ entry:
|
| ; CHECK-NEXT: ret float %r4
|
| ; CHECK-NEXT: }
|
|
|
| -define double @test_fabs_double(double %x) {
|
| +define internal double @test_fabs_double(double %x) {
|
| entry:
|
| %r = call double @llvm.fabs.f64(double %x)
|
| %r2 = call double @llvm.fabs.f64(double %r)
|
| @@ -179,7 +181,7 @@ entry:
|
| ret double %r4
|
| }
|
|
|
| -; CHECK-NEXT: define double @test_fabs_double(double %x) {
|
| +; CHECK-NEXT: define internal double @test_fabs_double(double %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call double @llvm.fabs.f64(double %x)
|
| ; CHECK-NEXT: %r2 = call double @llvm.fabs.f64(double %r)
|
| @@ -188,7 +190,7 @@ entry:
|
| ; CHECK-NEXT: ret double %r4
|
| ; CHECK-NEXT: }
|
|
|
| -define <4 x float> @test_fabs_v4f32(<4 x float> %x) {
|
| +define internal <4 x float> @test_fabs_v4f32(<4 x float> %x) {
|
| entry:
|
| %r = call <4 x float> @llvm.fabs.v4f32(<4 x float> %x)
|
| %r2 = call <4 x float> @llvm.fabs.v4f32(<4 x float> %r)
|
| @@ -197,7 +199,7 @@ entry:
|
| ret <4 x float> %r4
|
| }
|
|
|
| -; CHECK-NEXT: define <4 x float> @test_fabs_v4f32(<4 x float> %x) {
|
| +; CHECK-NEXT: define internal <4 x float> @test_fabs_v4f32(<4 x float> %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call <4 x float> @llvm.fabs.v4f32(<4 x float> %x)
|
| ; CHECK-NEXT: %r2 = call <4 x float> @llvm.fabs.v4f32(<4 x float> %r)
|
| @@ -206,7 +208,7 @@ entry:
|
| ; CHECK-NEXT: ret <4 x float> %r4
|
| ; CHECK-NEXT: }
|
|
|
| -define i32 @test_trap(i32 %br) {
|
| +define internal i32 @test_trap(i32 %br) {
|
| entry:
|
| %r1 = icmp eq i32 %br, 0
|
| br i1 %r1, label %Zero, label %NonZero
|
| @@ -217,7 +219,7 @@ NonZero:
|
| ret i32 1
|
| }
|
|
|
| -; CHECK-NEXT: define i32 @test_trap(i32 %br) {
|
| +; CHECK-NEXT: define internal i32 @test_trap(i32 %br) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r1 = icmp eq i32 %br, 0
|
| ; CHECK-NEXT: br i1 %r1, label %Zero, label %NonZero
|
| @@ -228,7 +230,7 @@ NonZero:
|
| ; CHECK-NEXT: ret i32 1
|
| ; CHECK-NEXT: }
|
|
|
| -define i32 @test_bswap_16(i32 %x) {
|
| +define internal i32 @test_bswap_16(i32 %x) {
|
| entry:
|
| %x_trunc = trunc i32 %x to i16
|
| %r = call i16 @llvm.bswap.i16(i16 %x_trunc)
|
| @@ -236,7 +238,7 @@ entry:
|
| ret i32 %r_zext
|
| }
|
|
|
| -; CHECK-NEXT: define i32 @test_bswap_16(i32 %x) {
|
| +; CHECK-NEXT: define internal i32 @test_bswap_16(i32 %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %x_trunc = trunc i32 %x to i16
|
| ; CHECK-NEXT: %r = call i16 @llvm.bswap.i16(i16 %x_trunc)
|
| @@ -244,110 +246,110 @@ entry:
|
| ; CHECK-NEXT: ret i32 %r_zext
|
| ; CHECK-NEXT: }
|
|
|
| -define i32 @test_bswap_32(i32 %x) {
|
| +define internal i32 @test_bswap_32(i32 %x) {
|
| entry:
|
| %r = call i32 @llvm.bswap.i32(i32 %x)
|
| ret i32 %r
|
| }
|
|
|
| -; CHECK-NEXT: define i32 @test_bswap_32(i32 %x) {
|
| +; CHECK-NEXT: define internal i32 @test_bswap_32(i32 %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call i32 @llvm.bswap.i32(i32 %x)
|
| ; CHECK-NEXT: ret i32 %r
|
| ; CHECK-NEXT: }
|
|
|
| -define i64 @test_bswap_64(i64 %x) {
|
| +define internal i64 @test_bswap_64(i64 %x) {
|
| entry:
|
| %r = call i64 @llvm.bswap.i64(i64 %x)
|
| ret i64 %r
|
| }
|
|
|
| -; CHECK-NEXT: define i64 @test_bswap_64(i64 %x) {
|
| +; CHECK-NEXT: define internal i64 @test_bswap_64(i64 %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call i64 @llvm.bswap.i64(i64 %x)
|
| ; CHECK-NEXT: ret i64 %r
|
| ; CHECK-NEXT: }
|
|
|
| -define i32 @test_ctlz_32(i32 %x) {
|
| +define internal i32 @test_ctlz_32(i32 %x) {
|
| entry:
|
| %r = call i32 @llvm.ctlz.i32(i32 %x, i1 false)
|
| ret i32 %r
|
| }
|
|
|
| -; CHECK-NEXT: define i32 @test_ctlz_32(i32 %x) {
|
| +; CHECK-NEXT: define internal i32 @test_ctlz_32(i32 %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call i32 @llvm.ctlz.i32(i32 %x, i1 false)
|
| ; CHECK-NEXT: ret i32 %r
|
| ; CHECK-NEXT: }
|
|
|
| -define i64 @test_ctlz_64(i64 %x) {
|
| +define internal i64 @test_ctlz_64(i64 %x) {
|
| entry:
|
| %r = call i64 @llvm.ctlz.i64(i64 %x, i1 false)
|
| ret i64 %r
|
| }
|
|
|
| -; CHECK-NEXT: define i64 @test_ctlz_64(i64 %x) {
|
| +; CHECK-NEXT: define internal i64 @test_ctlz_64(i64 %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call i64 @llvm.ctlz.i64(i64 %x, i1 false)
|
| ; CHECK-NEXT: ret i64 %r
|
| ; CHECK-NEXT: }
|
|
|
| -define i32 @test_cttz_32(i32 %x) {
|
| +define internal i32 @test_cttz_32(i32 %x) {
|
| entry:
|
| %r = call i32 @llvm.cttz.i32(i32 %x, i1 false)
|
| ret i32 %r
|
| }
|
|
|
| -; CHECK-NEXT: define i32 @test_cttz_32(i32 %x) {
|
| +; CHECK-NEXT: define internal i32 @test_cttz_32(i32 %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call i32 @llvm.cttz.i32(i32 %x, i1 false)
|
| ; CHECK-NEXT: ret i32 %r
|
| ; CHECK-NEXT: }
|
|
|
| -define i64 @test_cttz_64(i64 %x) {
|
| +define internal i64 @test_cttz_64(i64 %x) {
|
| entry:
|
| %r = call i64 @llvm.cttz.i64(i64 %x, i1 false)
|
| ret i64 %r
|
| }
|
|
|
| -; CHECK-NEXT: define i64 @test_cttz_64(i64 %x) {
|
| +; CHECK-NEXT: define internal i64 @test_cttz_64(i64 %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call i64 @llvm.cttz.i64(i64 %x, i1 false)
|
| ; CHECK-NEXT: ret i64 %r
|
| ; CHECK-NEXT: }
|
|
|
| -define i32 @test_popcount_32(i32 %x) {
|
| +define internal i32 @test_popcount_32(i32 %x) {
|
| entry:
|
| %r = call i32 @llvm.ctpop.i32(i32 %x)
|
| ret i32 %r
|
| }
|
|
|
| -; CHECK-NEXT: define i32 @test_popcount_32(i32 %x) {
|
| +; CHECK-NEXT: define internal i32 @test_popcount_32(i32 %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call i32 @llvm.ctpop.i32(i32 %x)
|
| ; CHECK-NEXT: ret i32 %r
|
| ; CHECK-NEXT: }
|
|
|
| -define i64 @test_popcount_64(i64 %x) {
|
| +define internal i64 @test_popcount_64(i64 %x) {
|
| entry:
|
| %r = call i64 @llvm.ctpop.i64(i64 %x)
|
| ret i64 %r
|
| }
|
|
|
| -; CHECK-NEXT: define i64 @test_popcount_64(i64 %x) {
|
| +; CHECK-NEXT: define internal i64 @test_popcount_64(i64 %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %r = call i64 @llvm.ctpop.i64(i64 %x)
|
| ; CHECK-NEXT: ret i64 %r
|
| ; CHECK-NEXT: }
|
|
|
| -define void @test_stacksave_noalloca() {
|
| +define internal void @test_stacksave_noalloca() {
|
| entry:
|
| %sp = call i8* @llvm.stacksave()
|
| call void @llvm.stackrestore(i8* %sp)
|
| ret void
|
| }
|
|
|
| -; CHECK-NEXT: define void @test_stacksave_noalloca() {
|
| +; CHECK-NEXT: define internal void @test_stacksave_noalloca() {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %sp = call i32 @llvm.stacksave()
|
| ; CHECK-NEXT: call void @llvm.stackrestore(i32 %sp)
|
| @@ -356,7 +358,7 @@ entry:
|
|
|
| declare i32 @foo(i32 %x)
|
|
|
| -define void @test_stacksave_multiple(i32 %x) {
|
| +define internal void @test_stacksave_multiple(i32 %x) {
|
| entry:
|
| %x_4 = mul i32 %x, 4
|
| %sp1 = call i8* @llvm.stacksave()
|
| @@ -383,7 +385,7 @@ entry:
|
| ret void
|
| }
|
|
|
| -; CHECK-NEXT: define void @test_stacksave_multiple(i32 %x) {
|
| +; CHECK-NEXT: define internal void @test_stacksave_multiple(i32 %x) {
|
| ; CHECK-NEXT: entry:
|
| ; CHECK-NEXT: %x_4 = mul i32 %x, 4
|
| ; CHECK-NEXT: %sp1 = call i32 @llvm.stacksave()
|
|
|