1 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 -O3 | FileCheck %s --check-prefix=OPT
2 ; RUN: llc < %s -march=nvptx -mcpu=sm_20 -O0 | FileCheck %s --check-prefix=NOOPT
4 ; OPT-LABEL: @mulwide16
5 ; NOOPT-LABEL: @mulwide16
6 define i32 @mulwide16(i16 %a, i16 %b) {
9 %val0 = sext i16 %a to i32
10 %val1 = sext i16 %b to i32
11 %val2 = mul i32 %val0, %val1
15 ; OPT-LABEL: @mulwideu16
16 ; NOOPT-LABEL: @mulwideu16
17 define i32 @mulwideu16(i16 %a, i16 %b) {
20 %val0 = zext i16 %a to i32
21 %val1 = zext i16 %b to i32
22 %val2 = mul i32 %val0, %val1
26 ; OPT-LABEL: @mulwide8
27 ; NOOPT-LABEL: @mulwide8
28 define i32 @mulwide8(i8 %a, i8 %b) {
31 %val0 = sext i8 %a to i32
32 %val1 = sext i8 %b to i32
33 %val2 = mul i32 %val0, %val1
37 ; OPT-LABEL: @mulwideu8
38 ; NOOPT-LABEL: @mulwideu8
39 define i32 @mulwideu8(i8 %a, i8 %b) {
42 %val0 = zext i8 %a to i32
43 %val1 = zext i8 %b to i32
44 %val2 = mul i32 %val0, %val1
48 ; OPT-LABEL: @mulwide32
49 ; NOOPT-LABEL: @mulwide32
50 define i64 @mulwide32(i32 %a, i32 %b) {
53 %val0 = sext i32 %a to i64
54 %val1 = sext i32 %b to i64
55 %val2 = mul i64 %val0, %val1
59 ; OPT-LABEL: @mulwideu32
60 ; NOOPT-LABEL: @mulwideu32
61 define i64 @mulwideu32(i32 %a, i32 %b) {
64 %val0 = zext i32 %a to i64
65 %val1 = zext i32 %b to i64
66 %val2 = mul i64 %val0, %val1
70 ; OPT-LABEL: @mulwideu7
71 ; NOOPT-LABEL: @mulwideu7
72 define i64 @mulwideu7(i7 %a, i7 %b) {
75 %val0 = zext i7 %a to i64
76 %val1 = zext i7 %b to i64
77 %val2 = mul i64 %val0, %val1
81 ; OPT-LABEL: @mulwides7
82 ; NOOPT-LABEL: @mulwides7
83 define i64 @mulwides7(i7 %a, i7 %b) {
86 %val0 = sext i7 %a to i64
87 %val1 = sext i7 %b to i64
88 %val2 = mul i64 %val0, %val1