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)
8 declare <4 x i32> @llvm.smul.fix.v4i32(<4 x i32>, <4 x i32>, i32 immarg)
9 declare <4 x i32> @llvm.umul.fix.v4i32(<4 x i32>, <4 x i32>, i32 immarg)
10 declare <4 x i32> @llvm.smul.fix.sat.v4i32(<4 x i32>, <4 x i32>, i32 immarg)
12 define i32 @smulfix_undef(i32 %y) nounwind {
13 ; CHECK-LABEL: smulfix_undef:
15 ; CHECK-NEXT: xorl %eax, %eax
17 %tmp = call i32 @llvm.smul.fix.i32(i32 undef, i32 %y, i32 2)
21 define i32 @smulfix_zero(i32 %y) nounwind {
22 ; CHECK-LABEL: smulfix_zero:
24 ; CHECK-NEXT: xorl %eax, %eax
26 %tmp = call i32 @llvm.smul.fix.i32(i32 0, i32 %y, i32 2)
30 define i32 @umulfix_undef(i32 %y) nounwind {
31 ; CHECK-LABEL: umulfix_undef:
33 ; CHECK-NEXT: xorl %eax, %eax
35 %tmp = call i32 @llvm.umul.fix.i32(i32 undef, i32 %y, i32 2)
39 define i32 @umulfix_zero(i32 %y) nounwind {
40 ; CHECK-LABEL: umulfix_zero:
42 ; CHECK-NEXT: xorl %eax, %eax
44 %tmp = call i32 @llvm.umul.fix.i32(i32 0, i32 %y, i32 2)
48 define i32 @smulfixsat_undef(i32 %y) nounwind {
49 ; CHECK-LABEL: smulfixsat_undef:
51 ; CHECK-NEXT: xorl %eax, %eax
53 %tmp = call i32 @llvm.smul.fix.sat.i32(i32 undef, i32 %y, i32 2)
57 define i32 @smulfixsat_zero(i32 %y) nounwind {
58 ; CHECK-LABEL: smulfixsat_zero:
60 ; CHECK-NEXT: xorl %eax, %eax
62 %tmp = call i32 @llvm.smul.fix.sat.i32(i32 0, i32 %y, i32 2)
66 define <4 x i32> @vec_smulfix_undef(<4 x i32> %y) nounwind {
67 ; CHECK-LABEL: vec_smulfix_undef:
69 ; CHECK-NEXT: xorps %xmm0, %xmm0
71 %tmp = call <4 x i32> @llvm.smul.fix.v4i32(<4 x i32> undef, <4 x i32> %y, i32 2)
75 define <4 x i32> @vec_smulfix_zero(<4 x i32> %y) nounwind {
76 ; CHECK-LABEL: vec_smulfix_zero:
78 ; CHECK-NEXT: xorps %xmm0, %xmm0
80 %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)
84 define <4 x i32> @vec_umulfix_undef(<4 x i32> %y) nounwind {
85 ; CHECK-LABEL: vec_umulfix_undef:
87 ; CHECK-NEXT: xorps %xmm0, %xmm0
89 %tmp = call <4 x i32> @llvm.umul.fix.v4i32(<4 x i32> undef, <4 x i32> %y, i32 2)
93 define <4 x i32> @vec_umulfix_zero(<4 x i32> %y) nounwind {
94 ; CHECK-LABEL: vec_umulfix_zero:
96 ; CHECK-NEXT: xorps %xmm0, %xmm0
98 %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)
102 define <4 x i32> @vec_smulfixsat_undef(<4 x i32> %y) nounwind {
103 ; CHECK-LABEL: vec_smulfixsat_undef:
105 ; CHECK-NEXT: xorps %xmm0, %xmm0
107 %tmp = call <4 x i32> @llvm.smul.fix.sat.v4i32(<4 x i32> undef, <4 x i32> %y, i32 2)
111 define <4 x i32> @vec_smulfixsat_zero(<4 x i32> %y) nounwind {
112 ; CHECK-LABEL: vec_smulfixsat_zero:
114 ; CHECK-NEXT: xorps %xmm0, %xmm0
116 %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)