1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/test/ExecutionEngine/MCJIT/test-setcond-int.ll
Peter Collingbourne 5f190b5e4e Introduce llvm::sys::getProcessTriple() function.
In r143502, we renamed getHostTriple() to getDefaultTargetTriple()
as part of work to allow the user to supply a different default
target triple at configure time.  This change also affected the JIT.
However, it is inappropriate to use the default target triple in the
JIT in most circumstances because this will not necessarily match
the current architecture used by the process, leading to illegal
instruction and other such errors at run time.

Introduce the getProcessTriple() function for use in the JIT and
its clients, and cause the JIT to use it.  On architectures with a
single bitness, the host and process triples are identical.  On other
architectures, the host triple represents the architecture of the
host CPU, while the process triple represents the architecture used
by the host CPU to interpret machine code within the current process.
For example, when executing 32-bit code on a 64-bit Linux machine,
the host triple may be 'x86_64-unknown-linux-gnu', while the process
triple may be 'i386-unknown-linux-gnu'.

This fixes JIT for the 32-on-64-bit (and vice versa) build on non-Apple
platforms.

Differential Revision: http://llvm-reviews.chandlerc.com/D254

llvm-svn: 172627
2013-01-16 17:27:22 +00:00

70 lines
3.4 KiB
LLVM

; RUN: %lli_mcjit %s > /dev/null
define i32 @main() {
%int1 = add i32 0, 0 ; <i32> [#uses=6]
%int2 = add i32 0, 0 ; <i32> [#uses=6]
%long1 = add i64 0, 0 ; <i64> [#uses=6]
%long2 = add i64 0, 0 ; <i64> [#uses=6]
%sbyte1 = add i8 0, 0 ; <i8> [#uses=6]
%sbyte2 = add i8 0, 0 ; <i8> [#uses=6]
%short1 = add i16 0, 0 ; <i16> [#uses=6]
%short2 = add i16 0, 0 ; <i16> [#uses=6]
%ubyte1 = add i8 0, 0 ; <i8> [#uses=6]
%ubyte2 = add i8 0, 0 ; <i8> [#uses=6]
%uint1 = add i32 0, 0 ; <i32> [#uses=6]
%uint2 = add i32 0, 0 ; <i32> [#uses=6]
%ulong1 = add i64 0, 0 ; <i64> [#uses=6]
%ulong2 = add i64 0, 0 ; <i64> [#uses=6]
%ushort1 = add i16 0, 0 ; <i16> [#uses=6]
%ushort2 = add i16 0, 0 ; <i16> [#uses=6]
%test1 = icmp eq i8 %ubyte1, %ubyte2 ; <i1> [#uses=0]
%test2 = icmp uge i8 %ubyte1, %ubyte2 ; <i1> [#uses=0]
%test3 = icmp ugt i8 %ubyte1, %ubyte2 ; <i1> [#uses=0]
%test4 = icmp ule i8 %ubyte1, %ubyte2 ; <i1> [#uses=0]
%test5 = icmp ult i8 %ubyte1, %ubyte2 ; <i1> [#uses=0]
%test6 = icmp ne i8 %ubyte1, %ubyte2 ; <i1> [#uses=0]
%test7 = icmp eq i16 %ushort1, %ushort2 ; <i1> [#uses=0]
%test8 = icmp uge i16 %ushort1, %ushort2 ; <i1> [#uses=0]
%test9 = icmp ugt i16 %ushort1, %ushort2 ; <i1> [#uses=0]
%test10 = icmp ule i16 %ushort1, %ushort2 ; <i1> [#uses=0]
%test11 = icmp ult i16 %ushort1, %ushort2 ; <i1> [#uses=0]
%test12 = icmp ne i16 %ushort1, %ushort2 ; <i1> [#uses=0]
%test13 = icmp eq i32 %uint1, %uint2 ; <i1> [#uses=0]
%test14 = icmp uge i32 %uint1, %uint2 ; <i1> [#uses=0]
%test15 = icmp ugt i32 %uint1, %uint2 ; <i1> [#uses=0]
%test16 = icmp ule i32 %uint1, %uint2 ; <i1> [#uses=0]
%test17 = icmp ult i32 %uint1, %uint2 ; <i1> [#uses=0]
%test18 = icmp ne i32 %uint1, %uint2 ; <i1> [#uses=0]
%test19 = icmp eq i64 %ulong1, %ulong2 ; <i1> [#uses=0]
%test20 = icmp uge i64 %ulong1, %ulong2 ; <i1> [#uses=0]
%test21 = icmp ugt i64 %ulong1, %ulong2 ; <i1> [#uses=0]
%test22 = icmp ule i64 %ulong1, %ulong2 ; <i1> [#uses=0]
%test23 = icmp ult i64 %ulong1, %ulong2 ; <i1> [#uses=0]
%test24 = icmp ne i64 %ulong1, %ulong2 ; <i1> [#uses=0]
%test25 = icmp eq i8 %sbyte1, %sbyte2 ; <i1> [#uses=0]
%test26 = icmp sge i8 %sbyte1, %sbyte2 ; <i1> [#uses=0]
%test27 = icmp sgt i8 %sbyte1, %sbyte2 ; <i1> [#uses=0]
%test28 = icmp sle i8 %sbyte1, %sbyte2 ; <i1> [#uses=0]
%test29 = icmp slt i8 %sbyte1, %sbyte2 ; <i1> [#uses=0]
%test30 = icmp ne i8 %sbyte1, %sbyte2 ; <i1> [#uses=0]
%test31 = icmp eq i16 %short1, %short2 ; <i1> [#uses=0]
%test32 = icmp sge i16 %short1, %short2 ; <i1> [#uses=0]
%test33 = icmp sgt i16 %short1, %short2 ; <i1> [#uses=0]
%test34 = icmp sle i16 %short1, %short2 ; <i1> [#uses=0]
%test35 = icmp slt i16 %short1, %short2 ; <i1> [#uses=0]
%test36 = icmp ne i16 %short1, %short2 ; <i1> [#uses=0]
%test37 = icmp eq i32 %int1, %int2 ; <i1> [#uses=0]
%test38 = icmp sge i32 %int1, %int2 ; <i1> [#uses=0]
%test39 = icmp sgt i32 %int1, %int2 ; <i1> [#uses=0]
%test40 = icmp sle i32 %int1, %int2 ; <i1> [#uses=0]
%test41 = icmp slt i32 %int1, %int2 ; <i1> [#uses=0]
%test42 = icmp ne i32 %int1, %int2 ; <i1> [#uses=0]
%test43 = icmp eq i64 %long1, %long2 ; <i1> [#uses=0]
%test44 = icmp sge i64 %long1, %long2 ; <i1> [#uses=0]
%test45 = icmp sgt i64 %long1, %long2 ; <i1> [#uses=0]
%test46 = icmp sle i64 %long1, %long2 ; <i1> [#uses=0]
%test47 = icmp slt i64 %long1, %long2 ; <i1> [#uses=0]
%test48 = icmp ne i64 %long1, %long2 ; <i1> [#uses=0]
ret i32 0
}