1 ; RUN: llvm-upgrade < %s | llvm-as | opt -reassociate -gcse | llvm-dis | grep add | count 6
2 ; Each of these functions should turn into two adds each.
4 %e = external global int
5 %a = external global int
6 %b = external global int
7 %c = external global int
8 %f = external global int
20 store int %t2, int* %e ; e = (a+b)+c;
21 store int %t4, int* %f ; f = (a+c)+b
33 store int %t2, int* %e ; e = c+(a+b)
34 store int %t4, int* %f ; f = (c+a)+b
46 store int %t2, int* %e ; e = c+(b+a)
47 store int %t4, int* %f ; f = (c+a)+b