+
+
+define void @test_well_formed_dag(i32 %in1, i32 %in2, i32* %addr) {
+; CHECK-LABEL: test_well_formed_dag:
+; CHECK-ARM: movw [[SMALL_CONST:r[0-9]+]], #675
+; CHECK-ARM: mul [[SMALL_PROD:r[0-9]+]], r0, [[SMALL_CONST]]
+; CHECK-ARM: add {{r[0-9]+}}, r1, [[SMALL_PROD]], lsl #7
+
+ %mul.small = mul i32 %in1, 675
+ store i32 %mul.small, i32* %addr
+ %mul.big = mul i32 %in1, 86400
+ %add = add i32 %in2, %mul.big
+ store i32 %add, i32* %addr
+ ret void
+}