~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/Transforms/InstCombine/2008-01-29-AddICmp.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; RUN: opt < %s -instcombine -S | not grep "a.off"
 
2
; PR1949
 
3
 
 
4
define i1 @test1(i32 %a) {
 
5
  %a.off = add i32 %a, 4          ; <i32> [#uses=1]
 
6
  %C = icmp ult i32 %a.off, 4             ; <i1> [#uses=1]
 
7
  ret i1 %C
 
8
}
 
9
 
 
10
define i1 @test2(i32 %a) {
 
11
  %a.off = sub i32 %a, 4          ; <i32> [#uses=1]
 
12
  %C = icmp ugt i32 %a.off, -5             ; <i1> [#uses=1]
 
13
  ret i1 %C
 
14
}
 
15
 
 
16
define i1 @test3(i32 %a) {
 
17
  %a.off = add i32 %a, 4          ; <i32> [#uses=1]
 
18
  %C = icmp slt i32 %a.off, 2147483652             ; <i1> [#uses=1]
 
19
  ret i1 %C
 
20
}