xref: /llvm-project/llvm/test/CodeGen/X86/urem-i8-constant.ll (revision d31220e0de0d8924e7c1f54d08d4515cfabb1aeb)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=i386-unknown-unknown | FileCheck %s
3
4; computeKnownBits determines that we don't need a mask op that is required in the general case.
5
6define i8 @foo(i8 %tmp325) {
7; CHECK-LABEL: foo:
8; CHECK:       # %bb.0:
9; CHECK-NEXT:    movzbl {{[0-9]+}}(%esp), %eax
10; CHECK-NEXT:    imull $111, %eax, %ecx
11; CHECK-NEXT:    shrl $12, %ecx
12; CHECK-NEXT:    leal (%ecx,%ecx,8), %edx
13; CHECK-NEXT:    leal (%ecx,%edx,4), %ecx
14; CHECK-NEXT:    subb %cl, %al
15; CHECK-NEXT:    # kill: def $al killed $al killed $eax
16; CHECK-NEXT:    retl
17  %t546 = urem i8 %tmp325, 37
18  ret i8 %t546
19}
20
21