xref: /llvm-project/llvm/test/CodeGen/M68k/Arith/lshr.ll (revision c23a780c306c410008ab127009cda26c7d9e5966)
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc < %s -mtriple=m68k-linux | FileCheck %s
3
4; Function Attrs: norecurse nounwind readnone
5define zeroext i1 @c_isspace(i32 %c) local_unnamed_addr #0 {
6; CHECK-LABEL: c_isspace:
7; CHECK:         .cfi_startproc
8; CHECK-NEXT:  ; %bb.0: ; %entry
9; CHECK-NEXT:    move.l (4,%sp), %d1
10; CHECK-NEXT:    add.l #-9, %d1
11; CHECK-NEXT:    and.l #16777215, %d1
12; CHECK-NEXT:    move.l #8388639, %d0
13; CHECK-NEXT:    lsr.l %d1, %d0
14; CHECK-NEXT:    and.l #1, %d0
15; CHECK-NEXT:    rts
16entry:
17  %switch.tableidx = add i32 %c, -9
18  %switch.cast = trunc i32 %switch.tableidx to i24
19  %switch.downshift = lshr i24 -8388577, %switch.cast
20  %0 = and i24 %switch.downshift, 1
21  %switch.masked = icmp ne i24 %0, 0
22  ret i1 %switch.masked
23}
24