1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py 2 ; REQUIRES: asserts 3 ; RUN: opt -S -debug-counter=newgvn-vn-skip=1,newgvn-vn-count=2 -newgvn < %s 2>&1 | FileCheck %s 4 ;; Test that, with debug counters on, we don't value number the first instruction, only the second and third, 5 ;; which means we do not discover the return is constant. 6 define i32 @vntest() { 7 ; CHECK-LABEL: @vntest( 8 ; CHECK-NEXT: bb: 9 ; CHECK-NEXT: [[A:%.*]] = add i32 1, 3 10 ; CHECK-NEXT: [[D:%.*]] = add i32 8, 8 11 ; CHECK-NEXT: ret i32 [[D]] 12 ; 13 bb: 14 %a = add i32 1, 3 15 %b = add i32 %a, %a 16 %c = add i32 %a, %a 17 %d = add i32 %b, %c 18 ret i32 %d 19 } 20 21 22 23