1 ; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
3 ; There should be exactly one shift and one add left.
5 define i32 @test1(i32 %X, i32 %Y) {
7 ; CHECK-NEXT: [[REASS_ADD:%.*]] = add i32 %Y, %X
8 ; CHECK-NEXT: [[REASS_MUL:%.*]] = shl i32 [[REASS_ADD]], 1
9 ; CHECK-NEXT: ret i32 [[REASS_MUL]]
13 %t4 = add i32 %t6, %t2