1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc < %s -mtriple=x86_64-linux -o - | FileCheck %s
4 declare i32 @llvm.smul.fix.i32(i32, i32, i32 immarg)
5 declare i32 @llvm.umul.fix.i32(i32, i32, i32 immarg)
6 declare i32 @llvm.smul.fix.sat.i32(i32, i32, i32 immarg)
7 declare i32 @llvm.umul.fix.sat.i32(i32, i32, i32 immarg)
9 declare <4 x i32> @llvm.smul.fix.v4i32(<4 x i32>, <4 x i32>, i32 immarg)
10 declare <4 x i32> @llvm.umul.fix.v4i32(<4 x i32>, <4 x i32>, i32 immarg)
11 declare <4 x i32> @llvm.smul.fix.sat.v4i32(<4 x i32>, <4 x i32>, i32 immarg)
12 declare <4 x i32> @llvm.umul.fix.sat.v4i32(<4 x i32>, <4 x i32>, i32 immarg)
14 define i32 @smulfix_undef(i32 %y) nounwind {
15 ; CHECK-LABEL: smulfix_undef:
17 ; CHECK-NEXT: xorl %eax, %eax
19 %tmp = call i32 @llvm.smul.fix.i32(i32 undef, i32 %y, i32 2)
23 define i32 @smulfix_zero(i32 %y) nounwind {
24 ; CHECK-LABEL: smulfix_zero:
26 ; CHECK-NEXT: xorl %eax, %eax
28 %tmp = call i32 @llvm.smul.fix.i32(i32 0, i32 %y, i32 2)
32 define i32 @umulfix_undef(i32 %y) nounwind {
33 ; CHECK-LABEL: umulfix_undef:
35 ; CHECK-NEXT: xorl %eax, %eax
37 %tmp = call i32 @llvm.umul.fix.i32(i32 undef, i32 %y, i32 2)
41 define i32 @umulfix_zero(i32 %y) nounwind {
42 ; CHECK-LABEL: umulfix_zero:
44 ; CHECK-NEXT: xorl %eax, %eax
46 %tmp = call i32 @llvm.umul.fix.i32(i32 0, i32 %y, i32 2)
50 define i32 @smulfixsat_undef(i32 %y) nounwind {
51 ; CHECK-LABEL: smulfixsat_undef:
53 ; CHECK-NEXT: xorl %eax, %eax
55 %tmp = call i32 @llvm.smul.fix.sat.i32(i32 undef, i32 %y, i32 2)
59 define i32 @smulfixsat_zero(i32 %y) nounwind {
60 ; CHECK-LABEL: smulfixsat_zero:
62 ; CHECK-NEXT: xorl %eax, %eax
64 %tmp = call i32 @llvm.smul.fix.sat.i32(i32 0, i32 %y, i32 2)
68 define i32 @umulfixsat_undef(i32 %y) nounwind {
69 ; CHECK-LABEL: umulfixsat_undef:
71 ; CHECK-NEXT: xorl %eax, %eax
73 %tmp = call i32 @llvm.umul.fix.sat.i32(i32 undef, i32 %y, i32 2)
77 define i32 @umulfixsat_zero(i32 %y) nounwind {
78 ; CHECK-LABEL: umulfixsat_zero:
80 ; CHECK-NEXT: xorl %eax, %eax
82 %tmp = call i32 @llvm.umul.fix.sat.i32(i32 0, i32 %y, i32 2)
86 define <4 x i32> @vec_smulfix_undef(<4 x i32> %y) nounwind {
87 ; CHECK-LABEL: vec_smulfix_undef:
89 ; CHECK-NEXT: xorps %xmm0, %xmm0
91 %tmp = call <4 x i32> @llvm.smul.fix.v4i32(<4 x i32> undef, <4 x i32> %y, i32 2)
95 define <4 x i32> @vec_smulfix_zero(<4 x i32> %y) nounwind {
96 ; CHECK-LABEL: vec_smulfix_zero:
98 ; CHECK-NEXT: xorps %xmm0, %xmm0
100 %tmp = call <4 x i32> @llvm.smul.fix.v4i32(<4 x i32> <i32 0, i32 0, i32 0, i32 0>, <4 x i32> %y, i32 2)
104 define <4 x i32> @vec_umulfix_undef(<4 x i32> %y) nounwind {
105 ; CHECK-LABEL: vec_umulfix_undef:
107 ; CHECK-NEXT: xorps %xmm0, %xmm0
109 %tmp = call <4 x i32> @llvm.umul.fix.v4i32(<4 x i32> undef, <4 x i32> %y, i32 2)
113 define <4 x i32> @vec_umulfix_zero(<4 x i32> %y) nounwind {
114 ; CHECK-LABEL: vec_umulfix_zero:
116 ; CHECK-NEXT: xorps %xmm0, %xmm0
118 %tmp = call <4 x i32> @llvm.umul.fix.v4i32(<4 x i32> <i32 0, i32 0, i32 0, i32 0>, <4 x i32> %y, i32 2)
122 define <4 x i32> @vec_smulfixsat_undef(<4 x i32> %y) nounwind {
123 ; CHECK-LABEL: vec_smulfixsat_undef:
125 ; CHECK-NEXT: xorps %xmm0, %xmm0
127 %tmp = call <4 x i32> @llvm.smul.fix.sat.v4i32(<4 x i32> undef, <4 x i32> %y, i32 2)
131 define <4 x i32> @vec_smulfixsat_zero(<4 x i32> %y) nounwind {
132 ; CHECK-LABEL: vec_smulfixsat_zero:
134 ; CHECK-NEXT: xorps %xmm0, %xmm0
136 %tmp = call <4 x i32> @llvm.smul.fix.sat.v4i32(<4 x i32> <i32 0, i32 0, i32 0, i32 0>, <4 x i32> %y, i32 2)
140 define <4 x i32> @vec_umulfixsat_undef(<4 x i32> %y) nounwind {
141 ; CHECK-LABEL: vec_umulfixsat_undef:
143 ; CHECK-NEXT: xorps %xmm0, %xmm0
145 %tmp = call <4 x i32> @llvm.umul.fix.sat.v4i32(<4 x i32> undef, <4 x i32> %y, i32 2)
149 define <4 x i32> @vec_umulfixsat_zero(<4 x i32> %y) nounwind {
150 ; CHECK-LABEL: vec_umulfixsat_zero:
152 ; CHECK-NEXT: xorps %xmm0, %xmm0
154 %tmp = call <4 x i32> @llvm.umul.fix.sat.v4i32(<4 x i32> <i32 0, i32 0, i32 0, i32 0>, <4 x i32> %y, i32 2)