1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -verify-machineinstrs -csky-no-aliases -mattr=+e2 < %s -mtriple=csky | FileCheck %s
4 define i32 @test_or_128(i32 noundef %0) {
5 ; CHECK-LABEL: test_or_128:
7 ; CHECK-NEXT: ori32 a0, a0, 128
13 define i32 @test_or_131072(i32 noundef %0) {
14 ; CHECK-LABEL: test_or_131072:
16 ; CHECK-NEXT: bseti16 a0, 17
18 %2 = or i32 %0, 131072
22 define i32 @test_or_192(i32 noundef %0) {
23 ; CHECK-LABEL: test_or_192:
25 ; CHECK-NEXT: ori32 a0, a0, 192
31 define i32 @test_or_3072(i32 noundef %0) {
32 ; CHECK-LABEL: test_or_3072:
34 ; CHECK-NEXT: ori32 a0, a0, 3072
40 define i32 @test_or_196608(i32 noundef %0) {
41 ; CHECK-LABEL: test_or_196608:
43 ; CHECK-NEXT: movih32 a1, 3
44 ; CHECK-NEXT: or16 a0, a1
46 %2 = or i32 %0, 196608
50 define i32 @test_or_65540(i32 noundef %0) {
51 ; CHECK-LABEL: test_or_65540:
53 ; CHECK-NEXT: movih32 a1, 1
54 ; CHECK-NEXT: ori32 a1, a1, 4
55 ; CHECK-NEXT: or16 a0, a1
61 define i32 @test_andnot_128(i32 noundef %0) {
62 ; CHECK-LABEL: test_andnot_128:
64 ; CHECK-NEXT: andni32 a0, a0, 128
70 define i32 @test_andnot_131072(i32 noundef %0) {
71 ; CHECK-LABEL: test_andnot_131072:
73 ; CHECK-NEXT: bclri16 a0, 17
75 %2 = and i32 %0, -131073
79 define i32 @test_andnot_192(i32 noundef %0) {
80 ; CHECK-LABEL: test_andnot_192:
82 ; CHECK-NEXT: andni32 a0, a0, 192
88 define i32 @test_andnot_3072(i32 noundef %0) {
89 ; CHECK-LABEL: test_andnot_3072:
91 ; CHECK-NEXT: andni32 a0, a0, 3072
93 %2 = and i32 %0, -3073
97 define i32 @test_andnot_1966608(i32 noundef %0) {
98 ; CHECK-LABEL: test_andnot_1966608:
100 ; CHECK-NEXT: movih32 a1, 65505
101 ; CHECK-NEXT: ori32 a1, a1, 65007
102 ; CHECK-NEXT: and16 a0, a1
104 %2 = and i32 %0, -1966609
108 define i32 @test_andnot_65540(i32 noundef %0) {
109 ; CHECK-LABEL: test_andnot_65540:
111 ; CHECK-NEXT: movih32 a1, 65534
112 ; CHECK-NEXT: ori32 a1, a1, 65531
113 ; CHECK-NEXT: and16 a0, a1
115 %2 = and i32 %0, -65541