1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s
4 ; There should be exactly one shift and one add left.
6 define i32 @test1(i32 %X, i32 %Y) {
8 ; CHECK-NEXT: [[REASS_ADD:%.*]] = add i32 [[Y:%.*]], [[X:%.*]]
9 ; CHECK-NEXT: [[REASS_MUL:%.*]] = shl i32 [[REASS_ADD]], 1
10 ; CHECK-NEXT: ret i32 [[REASS_MUL]]
14 %t4 = add i32 %t6, %t2