; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 2
; RUN: opt < %s -passes=inline -S | FileCheck %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
define ptr @callee() alwaysinline {
; CHECK-LABEL: define ptr @callee
; CHECK-SAME: () #[[ATTR0:[0-9]+]] {
; CHECK-NEXT: [[TMP1:%.*]] = call ptr @llvm.strip.invariant.group.p0(ptr null)
; CHECK-NEXT: ret ptr [[TMP1]]
;
%1 = call ptr @llvm.strip.invariant.group.p0(ptr null)
ret ptr %1
}
define ptr @caller() null_pointer_is_valid {
; CHECK-LABEL: define ptr @caller
; CHECK-SAME: () #[[ATTR1:[0-9]+]] {
; CHECK-NEXT: [[TMP1:%.*]] = call ptr @llvm.strip.invariant.group.p0(ptr null)
; CHECK-NEXT: ret ptr [[TMP1]]
;
%1 = call ptr @callee()
ret ptr %1
}
declare ptr @llvm.strip.invariant.group.p0(ptr)