diff --git a/test/Transforms/NaryReassociate/pr24301.ll b/test/Transforms/NaryReassociate/pr24301.ll index 49a4d2863e1..2bcbc937d18 100644 --- a/test/Transforms/NaryReassociate/pr24301.ll +++ b/test/Transforms/NaryReassociate/pr24301.ll @@ -1,8 +1,16 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py ; RUN: opt < %s -nary-reassociate -S | FileCheck %s ; RUN: opt < %s -passes='nary-reassociate' -S | FileCheck %s define i32 @foo(i32 %tmp4) { ; CHECK-LABEL: @foo( +; CHECK-NEXT: entry: +; CHECK-NEXT: [[TMP5:%.*]] = add i32 [[TMP4:%.*]], 8 +; CHECK-NEXT: [[TMP14:%.*]] = add i32 [[TMP5]], -128 +; CHECK-NEXT: [[TMP21:%.*]] = add i32 119, [[TMP4]] +; CHECK-NEXT: [[TMP23:%.*]] = add i32 [[TMP21]], -128 +; CHECK-NEXT: ret i32 [[TMP23]] +; entry: %tmp5 = add i32 %tmp4, 8 %tmp13 = add i32 %tmp4, -128 ; deleted @@ -10,6 +18,5 @@ entry: %tmp21 = add i32 119, %tmp4 ; do not rewrite %tmp23 against %tmp13 because %tmp13 is already deleted %tmp23 = add i32 %tmp21, -128 -; CHECK: %tmp23 = add i32 %tmp21, -128 ret i32 %tmp23 }