1 ; RUN: llc < %s -mtriple=aarch64-apple-darwin | FileCheck %s
3 declare i16 @llvm.bswap.i16(i16)
4 declare i32 @llvm.bswap.i32(i32)
8 define i1 @test1(i16 %arg) {
10 %b = call i16 @llvm.bswap.i16(i16 %a)
11 %and = and i16 %b, 256
12 %res = icmp eq i16 %and, 256
18 define i1 @test2(i16 %arg) {
20 %b = call i16 @llvm.bswap.i16(i16 %a)
21 %and = and i16 %b, 256
22 %res = icmp eq i16 %and, 256
28 define i1 @test3(i16 %arg) {
30 %b = call i16 @llvm.bswap.i16(i16 %a)
32 %res = icmp eq i16 %and, 1
38 define i1 @test4(i32 %arg) {
39 %a = or i32 %arg, 2147483647 ; i32_MAX
40 %b = call i32 @llvm.bswap.i32(i32 %a)
41 %and = and i32 %b, 127
42 %res = icmp eq i32 %and, 127