projects
/
oota-llvm.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Reapply 108136 with an ugly pasto fixed.
[oota-llvm.git]
/
test
/
Transforms
/
InstCombine
/
nsw.ll
1
; RUN: opt < %s -instcombine -S | FileCheck %s
2
3
; CHECK: define i32 @foo
4
; %y = sub i32 0, %x
5
; %z = sdiv i32 %y, 337
6
; ret i32 %y
7
define i32 @foo(i32 %x) {
8
%y = sub i32 0, %x
9
%z = sdiv i32 %y, 337
10
ret i32 %y
11
}
12
13
; CHECK: define i32 @bar
14
; %y = sdiv i32 %x, -337
15
; ret i32 %y
16
define i32 @bar(i32 %x) {
17
%y = sub nsw i32 0, %x
18
%z = sdiv i32 %y, 337
19
ret i32 %y
20
}