1 ; RUN: opt < %s -S -instsimplify | FileCheck %s
3 declare i16 @llvm.bswap.i16(i16)
5 define i1 @test1(i16 %arg) {
9 %b = call i16 @llvm.bswap.i16(i16 %a)
10 %res = icmp eq i16 %b, 0
14 define i1 @test2(i16 %arg) {
17 %a = or i16 %arg, 1024
18 %b = call i16 @llvm.bswap.i16(i16 %a)
19 %res = icmp eq i16 %b, 0
23 define i1 @test3(i16 %arg) {
27 %b = call i16 @llvm.bswap.i16(i16 %a)
29 %res = icmp eq i16 %and, 1
33 define i1 @test4(i16 %arg) {
36 %a = and i16 %arg, 511
37 %b = call i16 @llvm.bswap.i16(i16 %a)
38 %and = and i16 %b, 256
39 %res = icmp eq i16 %and, 1