1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/Analysis/AssumptionCache/basic.ll
Michael Kruse 4625d98371 Revert "[AssumptionCache] Avoid dangling llvm.assume calls in the cache"
This reverts commit b7d870eae7fdadcf10d0f177faa7409c2e37d776 and the
subsequent fix "[Polly] Fix build after AssumptionCache change (D96168)"
(commit e6810cab09fcbc87b6e5e4d226de0810e2f2ea38).

It caused indeterminism in the output, such that e.g. the
polly-x86_64-linux buildbot failed accasionally.
2021-02-11 12:17:38 -06:00

23 lines
585 B
LLVM

; RUN: opt < %s -disable-output -passes='print<assumptions>' 2>&1 | FileCheck %s
target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128"
declare void @llvm.assume(i1)
define void @test1(i32 %a) {
; CHECK-LABEL: Cached assumptions for function: test1
; CHECK-NEXT: icmp ne i32 %{{.*}}, 0
; CHECK-NEXT: icmp slt i32 %{{.*}}, 0
; CHECK-NEXT: icmp sgt i32 %{{.*}}, 0
entry:
%cond1 = icmp ne i32 %a, 0
call void @llvm.assume(i1 %cond1)
%cond2 = icmp slt i32 %a, 0
call void @llvm.assume(i1 %cond2)
%cond3 = icmp sgt i32 %a, 0
call void @llvm.assume(i1 %cond3)
ret void
}