llvm-6502/test/CodeGen/X86/urem-i8-constant.ll
Dan Gohman 77003040b2 Don't lower srem/urem X%C to X-X/C*C unless the division is actually
optimized. This avoids creating illegal divisions when the combiner is
running after legalize; this fixes PR1815. Also, it produces better
code in the included testcase by avoiding the subtract and multiply
when the division isn't optimized.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44341 91177308-0d34-0410-b5e6-96231b3b80d8
2007-11-26 23:46:11 +00:00

7 lines
127 B
LLVM

; RUN: llvm-as < %s | llc -march=x86 | not grep mul
define i8 @foo(i8 %tmp325) {
%t546 = urem i8 %tmp325, 37
ret i8 %t546
}