1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2; RUN: llc < %s -mtriple=i686-linux | FileCheck %s --check-prefix=X86 3; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s --check-prefix=X64 4 5define i32 @main() nounwind { 6; X86-LABEL: main: 7; X86: # %bb.0: # %entry 8; X86-NEXT: pushl %eax 9; X86-NEXT: movl $1, (%esp) 10; X86-NEXT: movl $1, %eax 11; X86-NEXT: popl %ecx 12; X86-NEXT: retl 13; 14; X64-LABEL: main: 15; X64: # %bb.0: # %entry 16; X64-NEXT: movl $1, -{{[0-9]+}}(%rsp) 17; X64-NEXT: movl $1, %eax 18; X64-NEXT: retq 19entry: 20 %a = alloca i32, align 4 21 store i32 1, ptr %a, align 4 22 %0 = load i32, ptr %a, align 4 23 %or = or i32 1, %0 24 %and = and i32 1, %or 25 %rem = urem i32 %and, 1 26 %add = add i32 %rem, 1 27 ret i32 %add 28} 29