1 ; NOTE: Assertions have been autogenerated by update_test_checks.py
2 ; RUN: opt < %s -S -instsimplify | FileCheck %s
4 declare i16 @llvm.bswap.i16(i16)
6 define i1 @test1(i16 %arg) {
11 %b = call i16 @llvm.bswap.i16(i16 %a)
12 %res = icmp eq i16 %b, 0
16 define i1 @test2(i16 %arg) {
17 ; CHECK-LABEL: @test2(
20 %a = or i16 %arg, 1024
21 %b = call i16 @llvm.bswap.i16(i16 %a)
22 %res = icmp eq i16 %b, 0
26 define i1 @test3(i16 %arg) {
27 ; CHECK-LABEL: @test3(
31 %b = call i16 @llvm.bswap.i16(i16 %a)
33 %res = icmp eq i16 %and, 1
37 define i1 @test4(i16 %arg) {
38 ; CHECK-LABEL: @test4(
41 %a = and i16 %arg, 511
42 %b = call i16 @llvm.bswap.i16(i16 %a)
43 %and = and i16 %b, 256
44 %res = icmp eq i16 %and, 1