1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/test/Transforms/EarlyCSE/flags.ll
Geoff Berry 4a45626e2f [EarlyCSE] Optionally use MemorySSA. NFC.
Summary:
Use MemorySSA, if requested, to do less conservative memory dependency
checking.

This change doesn't enable the MemorySSA enhanced EarlyCSE in the
default pipelines, so should be NFC.

Reviewers: dberlin, sanjoy, reames, majnemer

Subscribers: mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D19821

llvm-svn: 280279
2016-08-31 19:24:10 +00:00

20 lines
502 B
LLVM

; RUN: opt -early-cse -S < %s | FileCheck %s
; RUN: opt -basicaa -early-cse-memssa -S < %s | FileCheck %s
declare void @use(i1)
define void @test1(float %x, float %y) {
entry:
%cmp1 = fcmp nnan oeq float %y, %x
%cmp2 = fcmp oeq float %x, %y
call void @use(i1 %cmp1)
call void @use(i1 %cmp2)
ret void
}
; CHECK-LABEL: define void @test1(
; CHECK: %[[cmp:.*]] = fcmp oeq float %y, %x
; CHECK-NEXT: call void @use(i1 %[[cmp]])
; CHECK-NEXT: call void @use(i1 %[[cmp]])
; CHECK-NEXT: ret void