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 >= 1024.
7 define i177 @test1(i177 %X) {
9 ; CHECK-NEXT: [[Y:%.*]] = shl i177 [[X:%.*]], 155
10 ; CHECK-NEXT: ret i177 [[Y]]
17 define <2 x i177> @test2(<2 x i177> %X) {
18 ; CHECK-LABEL: @test2(
19 ; CHECK-NEXT: [[Y:%.*]] = shl <2 x i177> [[X:%.*]], <i177 155, i177 155>
20 ; CHECK-NEXT: ret <2 x i177> [[Y]]
22 %C = shl <2 x i177> <i177 1, i177 1>, <i177 155, i177 155>
23 %Y = mul <2 x i177> %X, %C
27 define <2 x i177> @test3(<2 x i177> %X) {
28 ; CHECK-LABEL: @test3(
29 ; CHECK-NEXT: [[Y:%.*]] = shl <2 x i177> [[X:%.*]], <i177 150, i177 155>
30 ; CHECK-NEXT: ret <2 x i177> [[Y]]
32 %C = shl <2 x i177> <i177 1, i177 1>, <i177 150, i177 155>
33 %Y = mul <2 x i177> %X, %C