mirror of
https://github.com/RPCS3/llvm.git
synced 2024-11-30 15:10:30 +00:00
c6e896237f
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@357132 91177308-0d34-0410-b5e6-96231b3b80d8
29 lines
787 B
LLVM
29 lines
787 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
|
; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
|
|
|
|
define i1 @foo(i32 %i) optsize {
|
|
; CHECK-LABEL: foo:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: andl $305419896, %edi # imm = 0x12345678
|
|
; CHECK-NEXT: movl $305419896, %eax # imm = 0x12345678
|
|
; CHECK-NEXT: cmpl %eax, %edi
|
|
; CHECK-NEXT: sete %al
|
|
; CHECK-NEXT: retq
|
|
%and = and i32 %i, 305419896
|
|
%cmp = icmp eq i32 %and, 305419896
|
|
ret i1 %cmp
|
|
}
|
|
|
|
define zeroext i1 @g(i32 %x) optsize {
|
|
; CHECK-LABEL: g:
|
|
; CHECK: # %bb.0:
|
|
; CHECK-NEXT: orl $1, %edi
|
|
; CHECK-NEXT: movl $1, %eax
|
|
; CHECK-NEXT: cmpl %eax, %edi
|
|
; CHECK-NEXT: sete %al
|
|
; CHECK-NEXT: retq
|
|
%t0 = or i32 %x, 1
|
|
%t1 = icmp eq i32 %t0, 1
|
|
ret i1 %t1
|
|
}
|