1; RUN: opt < %s -nary-reassociate -S | FileCheck %s 2 3target datalayout = "e-i64:64-v16:16-v32:32-n16:32:64" 4 5declare void @foo(i32) 6 7; CHECK-LABEL: @bar( 8define void @bar(i32 %a, i32 %b, i32 %c) { 9 %1 = mul i32 %a, %c 10; CHECK: [[BASE:%[a-zA-Z0-9]+]] = mul i32 %a, %c 11 call void @foo(i32 %1) 12 %2 = mul i32 %a, %b 13 %3 = mul i32 %2, %c 14; CHECK: [[RESULT:%[a-zA-Z0-9]+]] = mul i32 [[BASE]], %b 15 call void @foo(i32 %3) 16; CHECK-NEXT: call void @foo(i32 [[RESULT]]) 17 ret void 18} 19 20