diff options
author | Dan Gohman <gohman@apple.com> | 2009-03-13 23:53:06 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-03-13 23:53:06 +0000 |
commit | 474d3b3f40e117a66946e9fb9d2016b4c05caef0 (patch) | |
tree | e4fe73f5281c4cbfdea7165412bf7d617eff8c60 /test/CodeGen | |
parent | 4425240dbcb6e0da24f4a9f72cfb24f529f5b7af (diff) | |
download | llvm-474d3b3f40e117a66946e9fb9d2016b4c05caef0.tar.gz llvm-474d3b3f40e117a66946e9fb9d2016b4c05caef0.tar.bz2 llvm-474d3b3f40e117a66946e9fb9d2016b4c05caef0.tar.xz |
Improve FastISel's handling of truncates to i1, and implement
ptrtoint and inttoptr in X86FastISel. These casts aren't always
handled in the generic FastISel code because X86 sometimes needs
custom code to do truncation and zero-extension.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66988 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/X86/fast-isel-phys.ll | 2 | ||||
-rw-r--r-- | test/CodeGen/X86/fast-isel-trunc.ll | 4 | ||||
-rw-r--r-- | test/CodeGen/X86/fast-isel.ll | 11 |
3 files changed, 13 insertions, 4 deletions
diff --git a/test/CodeGen/X86/fast-isel-phys.ll b/test/CodeGen/X86/fast-isel-phys.ll index 26011468f7..91dcca57cc 100644 --- a/test/CodeGen/X86/fast-isel-phys.ll +++ b/test/CodeGen/X86/fast-isel-phys.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -fast-isel -march=x86 +; RUN: llvm-as < %s | llc -fast-isel -fast-isel-abort -march=x86 define i8 @t2(i8 %a, i8 %c) nounwind { %tmp = shl i8 %a, %c diff --git a/test/CodeGen/X86/fast-isel-trunc.ll b/test/CodeGen/X86/fast-isel-trunc.ll index f70ff1c419..039f114737 100644 --- a/test/CodeGen/X86/fast-isel-trunc.ll +++ b/test/CodeGen/X86/fast-isel-trunc.ll @@ -1,5 +1,5 @@ -; RUN: llvm-as < %s | llc -march=x86 -fast-isel -; RUN: llvm-as < %s | llc -march=x86-64 -fast-isel +; RUN: llvm-as < %s | llc -march=x86 -fast-isel -fast-isel-abort +; RUN: llvm-as < %s | llc -march=x86-64 -fast-isel -fast-isel-abort define i8 @t1(i32 %x) signext nounwind { %tmp1 = trunc i32 %x to i8 diff --git a/test/CodeGen/X86/fast-isel.ll b/test/CodeGen/X86/fast-isel.ll index 9910629211..cd1e516ac8 100644 --- a/test/CodeGen/X86/fast-isel.ll +++ b/test/CodeGen/X86/fast-isel.ll @@ -1,4 +1,4 @@ -; RUN: llvm-as < %s | llc -fast-isel -march=x86 -mattr=sse2 +; RUN: llvm-as < %s | llc -fast-isel -fast-isel-abort -march=x86 -mattr=sse2 ; This tests very minimal fast-isel functionality. @@ -47,3 +47,12 @@ entry: %tmp2 = bitcast i32 0 to i32 ret i32 %tmp2 } + +define i1 @ptrtoint(i8* %p) nounwind { + %t = ptrtoint i8* %p to i1 + ret i1 %t +} +define i8* @inttoptr(i1 %p) nounwind { + %t = inttoptr i1 %p to i8* + ret i8* %t +} |