mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-07 16:42:07 +00:00
More instcombine testcases
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14094 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
525f228d95
commit
9e28f18fb3
@ -109,3 +109,30 @@ bool %test14b(bool %C, int %X) {
|
||||
ret bool %R
|
||||
}
|
||||
|
||||
int %test15a(int %X) { ;; Code sequence for (X & 16) ? 16 : 0
|
||||
%t1 = and int %X, 16
|
||||
%t2 = seteq int %t1, 0
|
||||
%t3 = select bool %t2, int 0, int 16 ;; X & 16
|
||||
ret int %t3
|
||||
}
|
||||
|
||||
int %test15b(int %X) { ;; Code sequence for (X & 32) ? 0 : 24
|
||||
%t1 = and int %X, 32
|
||||
%t2 = seteq int %t1, 0
|
||||
%t3 = select bool %t2, int 32, int 0 ;; ~X & 32
|
||||
ret int %t3
|
||||
}
|
||||
|
||||
int %test15c(int %X) { ;; Alternate code sequence for (X & 16) ? 16 : 0
|
||||
%t1 = and int %X, 16
|
||||
%t2 = seteq int %t1, 16
|
||||
%t3 = select bool %t2, int 16, int 0 ;; X & 16
|
||||
ret int %t3
|
||||
}
|
||||
|
||||
int %test15d(int %X) { ;; Alternate code sequence for (X & 16) ? 16 : 0
|
||||
%t1 = and int %X, 16
|
||||
%t2 = setne int %t1, 0
|
||||
%t3 = select bool %t2, int 16, int 0 ;; X & 16
|
||||
ret int %t3
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user