1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt %loadexampleirtransforms -passes=tut-simplifycfg -tut-simplifycfg-version=v1 -S < %s | FileCheck %s
3 ; RUN: opt %loadexampleirtransforms -passes=tut-simplifycfg -tut-simplifycfg-version=v2 -S < %s | FileCheck %s
4 ; RUN: opt %loadexampleirtransforms -passes=tut-simplifycfg -tut-simplifycfg-version=v3 -S < %s | FileCheck %s
6 define ptr @simp1(i32 %x) {
9 ; CHECK-NEXT: [[CMP:%.*]] = icmp slt i32 [[X:%.*]], 42
10 ; CHECK-NEXT: [[ADDR:%.*]] = select i1 [[CMP]], ptr inttoptr (i32 1 to ptr), ptr inttoptr (i32 1 to ptr)
11 ; CHECK-NEXT: ret ptr [[ADDR]]
14 %cmp = icmp slt i32 %x, 42
15 %addr = select i1 %cmp, ptr blockaddress(@simp1, %bb1), ptr blockaddress(@simp1, %bb2)