llvm/llvm/test/Transforms/SCCP/ip-constant-ranges-intersection.ll

; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5
; RUN: opt < %s -passes=ipsccp -S | FileCheck %s

declare range(i32 0, 20) i32 @callee(i32)

define range(i32 10, 30) i32 @caller(i32 %x) {
; CHECK-LABEL: define range(i32 10, 20) i32 @caller(
; CHECK-SAME: i32 [[X:%.*]]) {
; CHECK-NEXT:  [[ENTRY:.*:]]
; CHECK-NEXT:    [[CALL:%.*]] = call range(i32 0, 20) i32 @callee()
; CHECK-NEXT:    ret i32 [[CALL]]
;
entry:
  %call = call range(i32 0, 20) i32 @callee()
  ret i32 %call
}