1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -nary-reassociate -S | FileCheck %s
4 ; The test check that compilation does not fall into infinite loop.
6 define i8 @foo(i8 %v) local_unnamed_addr #0 {
8 ; CHECK-NEXT: region.0:
9 ; CHECK-NEXT: [[TMP0:%.*]] = mul nsw i8 16, [[V:%.*]]
10 ; CHECK-NEXT: [[TMP1:%.*]] = mul nsw i8 0, [[TMP0]]
11 ; CHECK-NEXT: [[TMP2:%.*]] = mul nsw i8 1, [[TMP1]]
12 ; CHECK-NEXT: ret i8 [[TMP2]]
15 %0 = mul nsw i8 16, %v