brintos

brintos / llvm-project-archived public Read only

0
0
Text · 594 B · edb21ad Raw
20 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=nary-reassociate -S | FileCheck %s3 4; The test check that compilation does not fall into infinite loop.5 6define i8 @foo(i8 %v) local_unnamed_addr #0 {7; CHECK-LABEL: @foo(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]]13;14region.0:15  %0 = mul nsw i8 16, %v16  %1 = mul nsw i8 0, %017  %2 = mul nsw i8 1, %118  ret i8 %219}20