1 ; There should be exactly one shift and one add left. 2 ; RUN: opt < %s -reassociate -instcombine -S | FileCheck %s 3 4 define i32 @test1(i32 %X, i32 %Y) { 5 ; CHECK-LABEL: test1 6 ; CHECK-NEXT: %tmp = add i32 %Y, %X 7 ; CHECK-NEXT: %tmp1 = shl i32 %tmp, 1 8 ; CHECK-NEXT: ret i32 %tmp1 9 10 %tmp.2 = shl i32 %X, 1 11 %tmp.6 = shl i32 %Y, 1 12 %tmp.4 = add i32 %tmp.6, %tmp.2 13 ret i32 %tmp.4 14 } 15