1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -instcombine -S | FileCheck %s
4 ; This test makes sure that mul instructions are properly eliminated.
5 ; This test is for Integer BitWidth < 64 && BitWidth % 2 != 0.
7 define i17 @test1(i17 %X) {
9 ; CHECK-NEXT: [[Y:%.*]] = shl i17 [[X:%.*]], 10
10 ; CHECK-NEXT: ret i17 [[Y]]
16 define <2 x i17> @test2(<2 x i17> %X) {
17 ; CHECK-LABEL: @test2(
18 ; CHECK-NEXT: [[Y:%.*]] = shl <2 x i17> [[X:%.*]], <i17 10, i17 10>
19 ; CHECK-NEXT: ret <2 x i17> [[Y]]
21 %Y = mul <2 x i17> %X, <i17 1024, i17 1024>
25 define <2 x i17> @test3(<2 x i17> %X) {
26 ; CHECK-LABEL: @test3(
27 ; CHECK-NEXT: [[Y:%.*]] = shl <2 x i17> [[X:%.*]], <i17 10, i17 8>
28 ; CHECK-NEXT: ret <2 x i17> [[Y]]
30 %Y = mul <2 x i17> %X, <i17 1024, i17 256>