• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: opt < %s -basicaa -gvn -S | FileCheck %s
2
3declare i32 @foo(i32) readnone
4
5define i1 @bar() {
6; CHECK-LABEL: @bar(
7  %a = call i32 @foo (i32 0) readnone
8  %b = call i32 @foo (i32 0) readnone
9  %c = and i32 %a, %b
10  %x = call i32 @foo (i32 %a) readnone
11  %y = call i32 @foo (i32 %c) readnone
12  %z = icmp eq i32 %x, %y
13  ret i1 %z
14; CHECK: ret i1 true
15}
16