You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llvm/test/Transforms/InstCombine/AArch64/sve-intrinsic-to-svbool-binops.ll
+36Lines changed: 36 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -124,6 +124,42 @@ define <vscale x 8 x i1> @try_combine_svbool_binop_orr(<vscale x 8 x i1> %a, <vs
124
124
ret <vscale x 8 x i1> %t3
125
125
}
126
126
127
+
; Verify predicate cast does not hinder "isAllActive" knowledge.
128
+
define <vscale x 8 x half> @try_combine_svbool_binop_fadd(<vscale x 8 x half> %a, <vscale x 8 x half> %b) {
129
+
; CHECK-LABEL: @try_combine_svbool_binop_fadd(
130
+
; CHECK-NEXT: [[T1:%.*]] = tail call <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> splat (i1 true))
131
+
; CHECK-NEXT: [[T2:%.*]] = tail call <vscale x 8 x half> @llvm.aarch64.sve.fadd.nxv8f16(<vscale x 8 x i1> [[T1]], <vscale x 8 x half> [[A:%.*]], <vscale x 8 x half> [[B:%.*]])
132
+
; CHECK-NEXT: ret <vscale x 8 x half> [[T2]]
133
+
;
134
+
%t1 = tailcall <vscale x 8 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv8i1(<vscale x 16 x i1> splat (i1true))
135
+
%t2 = tailcall <vscale x 8 x half> @llvm.aarch64.sve.fadd.nxv8f16(<vscale x 8 x i1> %t1, <vscale x 8 x half> %a, <vscale x 8 x half> %b)
136
+
ret <vscale x 8 x half> %t2
137
+
}
138
+
139
+
; Verify predicate cast does not hinder "isAllActive" knowledge.
140
+
define <vscale x 4 x float> @try_combine_svbool_binop_fmul(<vscale x 4 x float> %a, <vscale x 4 x float> %b) {
141
+
; CHECK-LABEL: @try_combine_svbool_binop_fmul(
142
+
; CHECK-NEXT: [[T1:%.*]] = tail call <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> splat (i1 true))
143
+
; CHECK-NEXT: [[T2:%.*]] = tail call <vscale x 4 x float> @llvm.aarch64.sve.fmul.nxv4f32(<vscale x 4 x i1> [[T1]], <vscale x 4 x float> [[A:%.*]], <vscale x 4 x float> [[B:%.*]])
144
+
; CHECK-NEXT: ret <vscale x 4 x float> [[T2]]
145
+
;
146
+
%t1 = tailcall <vscale x 4 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv4i1(<vscale x 16 x i1> splat (i1true))
147
+
%t2 = tailcall <vscale x 4 x float> @llvm.aarch64.sve.fmul.nxv4f32(<vscale x 4 x i1> %t1, <vscale x 4 x float> %a, <vscale x 4 x float> %b)
148
+
ret <vscale x 4 x float> %t2
149
+
}
150
+
151
+
; Verify predicate cast does not hinder "isAllActive" knowledge.
152
+
define <vscale x 2 x double> @try_combine_svbool_binop_fsub(<vscale x 2 x double> %a, <vscale x 2 x double> %b) {
153
+
; CHECK-LABEL: @try_combine_svbool_binop_fsub(
154
+
; CHECK-NEXT: [[T1:%.*]] = tail call <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> splat (i1 true))
155
+
; CHECK-NEXT: [[T2:%.*]] = tail call <vscale x 2 x double> @llvm.aarch64.sve.fsub.nxv2f64(<vscale x 2 x i1> [[T1]], <vscale x 2 x double> [[A:%.*]], <vscale x 2 x double> [[B:%.*]])
156
+
; CHECK-NEXT: ret <vscale x 2 x double> [[T2]]
157
+
;
158
+
%t1 = tailcall <vscale x 2 x i1> @llvm.aarch64.sve.convert.from.svbool.nxv2i1(<vscale x 16 x i1> splat (i1true))
159
+
%t2 = tailcall <vscale x 2 x double> @llvm.aarch64.sve.fsub.nxv2f64(<vscale x 2 x i1> %t1, <vscale x 2 x double> %a, <vscale x 2 x double> %b)
160
+
ret <vscale x 2 x double> %t2
161
+
}
162
+
127
163
declare <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv8i1(<vscale x 8 x i1>)
128
164
declare <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv4i1(<vscale x 4 x i1>)
129
165
declare <vscale x 16 x i1> @llvm.aarch64.sve.convert.to.svbool.nxv2i1(<vscale x 2 x i1>)
0 commit comments