35 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --function-signature --scrub-attributes2; RUN: opt < %s -S -passes=ipsccp | FileCheck %s3 4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"5target triple = "x86_64-unknown-linux-gnu"6 7define i64 @fn2() {8; CHECK-LABEL: define {{[^@]+}}@fn2()9; CHECK-NEXT: entry:10; CHECK-NEXT: [[CONV:%.*]] = sext i32 undef to i6411; CHECK-NEXT: [[DIV:%.*]] = sdiv i64 8, [[CONV]]12; CHECK-NEXT: [[CALL2:%.*]] = call i64 @fn1(i64 [[DIV]])13; CHECK-NEXT: ret i64 [[CALL2]]14;15entry:16 %conv = sext i32 undef to i6417 %div = sdiv i64 8, %conv18 %call2 = call i64 @fn1(i64 %div)19 ret i64 %call220}21 22define internal i64 @fn1(i64 %p1) {23; CHECK-LABEL: define {{[^@]+}}@fn124; CHECK-SAME: (i64 [[P1:%.*]])25; CHECK-NEXT: entry:26; CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne i64 [[P1]], 027; CHECK-NEXT: [[COND:%.*]] = select i1 [[TOBOOL]], i64 [[P1]], i64 [[P1]]28; CHECK-NEXT: ret i64 [[COND]]29;30entry:31 %tobool = icmp ne i64 %p1, 032 %cond = select i1 %tobool, i64 %p1, i64 %p133 ret i64 %cond34}35