1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=aarch64-- | FileCheck %s
4 define <4 x i32> @sextbool_add_vector(<4 x i32> %c1, <4 x i32> %c2, <4 x i32> %x) {
5 ; CHECK-LABEL: sextbool_add_vector:
7 ; CHECK-NEXT: cmeq v0.4s, v0.4s, v1.4s
8 ; CHECK-NEXT: add v0.4s, v2.4s, v0.4s
10 %c = icmp eq <4 x i32> %c1, %c2
11 %b = sext <4 x i1> %c to <4 x i32>
12 %s = add <4 x i32> %x, %b
16 define <4 x i32> @zextbool_sub_vector(<4 x i32> %c1, <4 x i32> %c2, <4 x i32> %x) {
17 ; CHECK-LABEL: zextbool_sub_vector:
19 ; CHECK-NEXT: cmeq v0.4s, v0.4s, v1.4s
20 ; CHECK-NEXT: add v0.4s, v2.4s, v0.4s
22 %c = icmp eq <4 x i32> %c1, %c2
23 %b = zext <4 x i1> %c to <4 x i32>
24 %s = sub <4 x i32> %x, %b
28 define i32 @assertsext_sub_1(i1 signext %cond, i32 %y) {
29 ; CHECK-LABEL: assertsext_sub_1:
31 ; CHECK-NEXT: add w0, w1, w0
33 %e = zext i1 %cond to i32
38 define i32 @assertsext_add_1(i1 signext %cond, i32 %y) {
39 ; CHECK-LABEL: assertsext_add_1:
41 ; CHECK-NEXT: sub w0, w1, w0
43 %e = zext i1 %cond to i32
48 define i32 @assertsext_add_1_commute(i1 signext %cond, i32 %y) {
49 ; CHECK-LABEL: assertsext_add_1_commute:
51 ; CHECK-NEXT: sub w0, w1, w0
53 %e = zext i1 %cond to i32