llvm-6502/test/Transforms/InstCombine/sdiv-1.ll
NAKAMURA Takumi 4bf4c738e8 llvm/test/Transforms/InstCombine/sdiv-1.ll: FileCheck-ize.
"not grep '-715827882'" performed as below...bad...

Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168430 91177308-0d34-0410-b5e6-96231b3b80d8
2012-11-21 14:46:18 +00:00

25 lines
457 B
LLVM

; RUN: opt < %s -instcombine -inline -S | FileCheck %s
; PR3142
; CHECK-NOT: -715827882
define i32 @a(i32 %X) nounwind readnone {
entry:
%0 = sub i32 0, %X
%1 = sdiv i32 %0, -3
ret i32 %1
}
define i32 @b(i32 %X) nounwind readnone {
entry:
%0 = call i32 @a(i32 -2147483648)
ret i32 %0
}
define i32 @c(i32 %X) nounwind readnone {
entry:
%0 = sub i32 0, -2147483648
%1 = sdiv i32 %0, -3
ret i32 %1
}