1 ; RUN: llvm-reduce --abort-on-invalid-reduction --delta-passes=instruction-flags --test FileCheck --test-arg --check-prefixes=INTERESTING,CHECK --test-arg %s --test-arg --input-file %s -o %t
2 ; RUN: FileCheck -check-prefixes=RESULT,CHECK %s < %t
4 ; CHECK-LABEL: @add_nuw_nsw_none(
7 define i32 @add_nuw_nsw_none(i32 %a, i32 %b) {
8 %op = add nuw nsw i32 %a, %b
12 ; CHECK-LABEL: @add_nuw_nsw_keep_nuw(
15 define i32 @add_nuw_nsw_keep_nuw(i32 %a, i32 %b) {
16 %op = add nuw nsw i32 %a, %b
20 ; CHECK-LABEL: @add_nuw_nsw_keep_nsw(
23 define i32 @add_nuw_nsw_keep_nsw(i32 %a, i32 %b) {
24 %op = add nuw nsw i32 %a, %b
28 ; CHECK-LABEL: @add_nuw_keep_nuw(
31 define i32 @add_nuw_keep_nuw(i32 %a, i32 %b) {
32 %op = add nuw i32 %a, %b
36 ; CHECK-LABEL: @add_nsw_keep_nsw(
39 define i32 @add_nsw_keep_nsw(i32 %a, i32 %b) {
40 %op = add nsw i32 %a, %b
44 ; CHECK-LABEL: @ashr_exact_drop(
47 define i32 @ashr_exact_drop(i32 %a, i32 %b) {
48 %op = ashr exact i32 %a, %b
52 ; CHECK-LABEL: @ashr_exact_keep(
54 ; RESULT: ashr exact i32
55 define i32 @ashr_exact_keep(i32 %a, i32 %b) {
56 %op = ashr exact i32 %a, %b
60 ; CHECK-LABEL: @getelementptr_inbounds_drop(
61 ; INTERESTING: getelementptr
62 ; RESULT: getelementptr i32, ptr %a, i64 %b
63 define ptr @getelementptr_inbounds_drop(ptr %a, i64 %b) {
64 %op = getelementptr inbounds i32, ptr %a, i64 %b
68 ; CHECK-LABEL: @getelementptr_inbounds_keep(
69 ; INTERESTING: inbounds
70 ; RESULT: getelementptr inbounds i32, ptr %a, i64 %b
71 define ptr @getelementptr_inbounds_keep(ptr %a, i64 %b) {
72 %op = getelementptr inbounds i32, ptr %a, i64 %b
76 ; CHECK-LABEL: @fadd_reassoc_none(
79 define float @fadd_reassoc_none(float %a, float %b) {
80 %op = fadd reassoc float %a, %b
84 ; CHECK-LABEL: @fadd_reassoc_keep(
85 ; INTERESTING: fadd reassoc
86 ; RESULT: fadd reassoc float
87 define float @fadd_reassoc_keep(float %a, float %b) {
88 %op = fadd reassoc float %a, %b
92 ; CHECK-LABEL: @fadd_nnan_none(
95 define float @fadd_nnan_none(float %a, float %b) {
96 %op = fadd nnan float %a, %b
100 ; CHECK-LABEL: @fadd_nnan_keep(
101 ; INTERESTING: fadd nnan
102 ; RESULT: fadd nnan float
103 define float @fadd_nnan_keep(float %a, float %b) {
104 %op = fadd nnan float %a, %b
108 ; CHECK-LABEL: @fadd_ninf_none(
109 ; INTERESTING: = fadd
111 define float @fadd_ninf_none(float %a, float %b) {
112 %op = fadd ninf float %a, %b
116 ; CHECK-LABEL: @fadd_ninf_keep(
117 ; INTERESTING: fadd ninf
118 ; RESULT: fadd ninf float
119 define float @fadd_ninf_keep(float %a, float %b) {
120 %op = fadd ninf float %a, %b
124 ; CHECK-LABEL: @fadd_nsz_none(
125 ; INTERESTING: = fadd
127 define float @fadd_nsz_none(float %a, float %b) {
128 %op = fadd nsz float %a, %b
132 ; CHECK-LABEL: @fadd_nsz_keep(
133 ; INTERESTING: fadd nsz
134 ; RESULT: fadd nsz float
135 define float @fadd_nsz_keep(float %a, float %b) {
136 %op = fadd nsz float %a, %b
140 ; CHECK-LABEL: @fadd_arcp_none(
141 ; INTERESTING: = fadd
143 define float @fadd_arcp_none(float %a, float %b) {
144 %op = fadd arcp float %a, %b
148 ; CHECK-LABEL: @fadd_arcp_keep(
149 ; INTERESTING: fadd arcp
150 ; RESULT: fadd arcp float
151 define float @fadd_arcp_keep(float %a, float %b) {
152 %op = fadd arcp float %a, %b
156 ; CHECK-LABEL: @fadd_contract_none(
157 ; INTERESTING: = fadd
159 define float @fadd_contract_none(float %a, float %b) {
160 %op = fadd contract float %a, %b
164 ; CHECK-LABEL: @fadd_contract_keep(
165 ; INTERESTING: fadd contract
166 ; RESULT: fadd contract float
167 define float @fadd_contract_keep(float %a, float %b) {
168 %op = fadd contract float %a, %b
172 ; CHECK-LABEL: @fadd_afn_none(
173 ; INTERESTING: = fadd
175 define float @fadd_afn_none(float %a, float %b) {
176 %op = fadd afn float %a, %b
180 ; CHECK-LABEL: @fadd_afn_keep(
181 ; INTERESTING: fadd afn
182 ; RESULT: fadd afn float
183 define float @fadd_afn_keep(float %a, float %b) {
184 %op = fadd afn float %a, %b
188 ; CHECK-LABEL: @fadd_fast_none(
189 ; INTERESTING: = fadd
191 define float @fadd_fast_none(float %a, float %b) {
192 %op = fadd fast float %a, %b
196 ; CHECK-LABEL: @fadd_nnan_ninf_keep_nnan(
198 ; RESULT: fadd nnan float
199 define float @fadd_nnan_ninf_keep_nnan(float %a, float %b) {
200 %op = fadd nnan ninf float %a, %b