1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -passes=reassociate -S < %s | FileCheck %s
6 define void @test1(i32 %x, i32 %y) {
8 ; CHECK-NEXT: [[TMP1:%.*]] = mul i32 [[Y:%.*]], [[X:%.*]]
9 ; CHECK-NEXT: [[TMP2:%.*]] = mul i32 [[Y]], [[X]]
10 ; CHECK-NEXT: [[TMP3:%.*]] = sub i32 [[TMP1]], [[TMP2]]
11 ; CHECK-NEXT: call void @use(i32 [[TMP1]])
12 ; CHECK-NEXT: call void @use(i32 [[TMP3]])
13 ; CHECK-NEXT: ret void
19 call void @use(i32 %1)
20 call void @use(i32 %3)