2018-05-19 07:54:33 +08:00
|
|
|
; RUN: opt -S -instsimplify -instcombine < %s | FileCheck %s
|
|
|
|
|
Implement strip.invariant.group
Summary:
This patch introduce new intrinsic -
strip.invariant.group that was described in the
RFC: Devirtualization v2
Reviewers: rsmith, hfinkel, nlopes, sanjoy, amharc, kuhar
Subscribers: arsenm, nhaehnle, JDevlieghere, hiraditya, xbolva00, llvm-commits
Differential Revision: https://reviews.llvm.org/D47103
Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com>
llvm-svn: 336073
2018-07-02 12:49:30 +08:00
|
|
|
; CHECK-LABEL: define void @checkNonnullLaunder()
|
|
|
|
define void @checkNonnullLaunder() {
|
2018-07-13 07:55:20 +08:00
|
|
|
; CHECK: %[[p:.*]] = call i8* @llvm.launder.invariant.group.p0i8(i8* nonnull %0)
|
|
|
|
; CHECK: call void @use(i8* nonnull %[[p]])
|
2018-05-19 07:54:33 +08:00
|
|
|
entry:
|
|
|
|
%0 = alloca i8, align 8
|
|
|
|
|
|
|
|
%p = call i8* @llvm.launder.invariant.group.p0i8(i8* %0)
|
|
|
|
%p2 = call i8* @llvm.launder.invariant.group.p0i8(i8* %p)
|
|
|
|
call void @use(i8* %p2)
|
|
|
|
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
Implement strip.invariant.group
Summary:
This patch introduce new intrinsic -
strip.invariant.group that was described in the
RFC: Devirtualization v2
Reviewers: rsmith, hfinkel, nlopes, sanjoy, amharc, kuhar
Subscribers: arsenm, nhaehnle, JDevlieghere, hiraditya, xbolva00, llvm-commits
Differential Revision: https://reviews.llvm.org/D47103
Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com>
llvm-svn: 336073
2018-07-02 12:49:30 +08:00
|
|
|
; CHECK-LABEL: define void @checkNonnullStrip()
|
|
|
|
define void @checkNonnullStrip() {
|
2018-07-13 07:55:20 +08:00
|
|
|
; CHECK: %[[p:.*]] = call i8* @llvm.strip.invariant.group.p0i8(i8* nonnull %0)
|
|
|
|
; CHECK: call void @use(i8* nonnull %[[p]])
|
Implement strip.invariant.group
Summary:
This patch introduce new intrinsic -
strip.invariant.group that was described in the
RFC: Devirtualization v2
Reviewers: rsmith, hfinkel, nlopes, sanjoy, amharc, kuhar
Subscribers: arsenm, nhaehnle, JDevlieghere, hiraditya, xbolva00, llvm-commits
Differential Revision: https://reviews.llvm.org/D47103
Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com>
llvm-svn: 336073
2018-07-02 12:49:30 +08:00
|
|
|
entry:
|
|
|
|
%0 = alloca i8, align 8
|
|
|
|
|
|
|
|
%p = call i8* @llvm.strip.invariant.group.p0i8(i8* %0)
|
|
|
|
%p2 = call i8* @llvm.strip.invariant.group.p0i8(i8* %p)
|
|
|
|
call void @use(i8* %p2)
|
|
|
|
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2018-05-19 07:54:33 +08:00
|
|
|
declare i8* @llvm.launder.invariant.group.p0i8(i8*)
|
Implement strip.invariant.group
Summary:
This patch introduce new intrinsic -
strip.invariant.group that was described in the
RFC: Devirtualization v2
Reviewers: rsmith, hfinkel, nlopes, sanjoy, amharc, kuhar
Subscribers: arsenm, nhaehnle, JDevlieghere, hiraditya, xbolva00, llvm-commits
Differential Revision: https://reviews.llvm.org/D47103
Co-authored-by: Krzysztof Pszeniczny <krzysztof.pszeniczny@gmail.com>
llvm-svn: 336073
2018-07-02 12:49:30 +08:00
|
|
|
declare i8* @llvm.strip.invariant.group.p0i8(i8*)
|
|
|
|
|
2018-05-19 07:54:33 +08:00
|
|
|
declare void @use(i8*)
|