2009-09-20 08:04:02 +08:00
|
|
|
; RUN: llvm-as < %s | llvm-dis | FileCheck %s
|
|
|
|
|
|
|
|
@X = external global i8
|
|
|
|
@Y = external global i8
|
|
|
|
@Z = external global i8
|
|
|
|
|
2009-09-20 15:00:24 +08:00
|
|
|
@A = global i1 add (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z))
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @A = global i1 xor (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z))
|
|
|
|
@B = global i1 sub (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z)), align 2
|
|
|
|
; CHECK: @B = global i1 xor (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z))
|
2009-09-20 15:00:24 +08:00
|
|
|
@C = global i1 mul (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z))
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @C = global i1 and (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z))
|
2009-09-20 08:04:02 +08:00
|
|
|
|
2009-09-20 15:00:24 +08:00
|
|
|
@D = global i1 sdiv (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z))
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @D = global i1 icmp ult (i8* @X, i8* @Y)
|
2009-09-20 15:00:24 +08:00
|
|
|
@E = global i1 udiv (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z))
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @E = global i1 icmp ult (i8* @X, i8* @Y)
|
2009-09-20 15:00:24 +08:00
|
|
|
@F = global i1 srem (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z))
|
|
|
|
; CHECK: @F = global i1 false ; <i1*> [#uses=0]
|
|
|
|
@G = global i1 urem (i1 icmp ult (i8* @X, i8* @Y), i1 icmp ult (i8* @X, i8* @Z))
|
|
|
|
; CHECK: @G = global i1 false ; <i1*> [#uses=0]
|
2009-09-20 13:48:50 +08:00
|
|
|
|
2009-09-20 15:00:24 +08:00
|
|
|
@H = global i1 icmp ule (i32* bitcast (i8* @X to i32*), i32* bitcast (i8* @Y to i32*))
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @H = global i1 icmp ule (i8* @X, i8* @Y)
|
2009-09-20 13:48:50 +08:00
|
|
|
|
2009-09-20 15:00:24 +08:00
|
|
|
@I = global i1 xor (i1 icmp ult (i8* @X, i8* @Y), i1 false)
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @I = global i1 icmp ult (i8* @X, i8* @Y)
|
2009-09-20 15:00:24 +08:00
|
|
|
@J = global i1 xor (i1 icmp ult (i8* @X, i8* @Y), i1 true)
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @J = global i1 icmp uge (i8* @X, i8* @Y)
|
2009-09-20 15:21:39 +08:00
|
|
|
|
|
|
|
@K = global i1 icmp eq (i1 icmp ult (i8* @X, i8* @Y), i1 false)
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @K = global i1 icmp uge (i8* @X, i8* @Y)
|
2009-09-20 15:21:39 +08:00
|
|
|
@L = global i1 icmp eq (i1 icmp ult (i8* @X, i8* @Y), i1 true)
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @L = global i1 icmp ult (i8* @X, i8* @Y)
|
2009-09-20 15:21:39 +08:00
|
|
|
@M = global i1 icmp ne (i1 icmp ult (i8* @X, i8* @Y), i1 true)
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @M = global i1 icmp uge (i8* @X, i8* @Y)
|
2009-09-20 15:21:39 +08:00
|
|
|
@N = global i1 icmp ne (i1 icmp ult (i8* @X, i8* @Y), i1 false)
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @N = global i1 icmp ult (i8* @X, i8* @Y)
|
2009-09-20 15:31:25 +08:00
|
|
|
|
|
|
|
@O = global i1 icmp eq (i32 zext (i1 icmp ult (i8* @X, i8* @Y) to i32), i32 0)
|
2009-10-18 05:51:19 +08:00
|
|
|
; CHECK: @O = global i1 icmp uge (i8* @X, i8* @Y)
|
|
|
|
|
2009-10-18 05:53:27 +08:00
|
|
|
|
|
|
|
|
|
|
|
; PR5176
|
|
|
|
|
|
|
|
; CHECK: @T1 = global i1 true
|
|
|
|
@T1 = global i1 icmp eq (i64 and (i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 192)), i256 64) to i64), i64 1), i64 0)
|
|
|
|
|
|
|
|
; CHECK: @T2 = global i1* @B
|
|
|
|
@T2 = global i1* inttoptr (i64 add (i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 192)), i256 192) to i64), i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 192)), i256 128) to i64)) to i1*)
|
|
|
|
|
|
|
|
; CHECK: @T3 = global i64 add (i64 ptrtoint (i1* @B to i64), i64 -1)
|
|
|
|
@T3 = global i64 add (i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 192)), i256 64) to i64), i64 -1)
|
|
|
|
|
|
|
|
; CHECK: @T4 = global i1* @B
|
|
|
|
@T4 = global i1* inttoptr (i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 192)), i256 64) to i64) to i1*)
|
|
|
|
|
|
|
|
; CHECK: @T5 = global i1* @A
|
|
|
|
@T5 = global i1* inttoptr (i64 add (i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 192)), i256 192) to i64), i64 trunc (i256 lshr (i256 or (i256 and (i256 and (i256 shl (i256 zext (i64 ptrtoint (i1* @B to i64) to i256), i256 64), i256 -6277101735386680763495507056286727952638980837032266301441), i256 6277101735386680763835789423207666416102355444464034512895), i256 shl (i256 zext (i64 ptrtoint (i1* @A to i64) to i256), i256 192)), i256 128) to i64)) to i1*)
|