36 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=instcombine -S | FileCheck %s3 4; This test makes sure that mul instructions are properly eliminated.5; This test is for Integer BitWidth >= 64 && BitWidth % 2 >= 1024.6 7define i177 @test1(i177 %X) {8; CHECK-LABEL: @test1(9; CHECK-NEXT: [[Y:%.*]] = shl i177 [[X:%.*]], 15510; CHECK-NEXT: ret i177 [[Y]]11;12 %C = shl i177 1, 15513 %Y = mul i177 %X, %C14 ret i177 %Y15}16 17define <2 x i177> @test2(<2 x i177> %X) {18; CHECK-LABEL: @test2(19; CHECK-NEXT: [[Y:%.*]] = shl <2 x i177> [[X:%.*]], splat (i177 155)20; CHECK-NEXT: ret <2 x i177> [[Y]]21;22 %C = shl <2 x i177> <i177 1, i177 1>, <i177 155, i177 155>23 %Y = mul <2 x i177> %X, %C24 ret <2 x i177> %Y25}26 27define <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]]31;32 %C = shl <2 x i177> <i177 1, i177 1>, <i177 150, i177 155>33 %Y = mul <2 x i177> %X, %C34 ret <2 x i177> %Y35}36