brintos

brintos / llvm-project-archived public Read only

0
0
Text · 974 B · da0c12b Raw
29 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-unknown-linux-gnu | FileCheck %s3 4; The and with -9 has multiple users which prevents5; SimplifyDemandedBits from touching it. The truncate only6; demands the lower 8 bits. X86ISelDAGToDAG.cpp wants form7; a test instruction from the icmp+trunc+and, but needs to8; mask the -9 to 8 bits since SimplifyDemandedBits didn't.9 10define i32 @foo(i16 signext %0, i32 %1, ptr nocapture %2) {11; CHECK-LABEL: foo:12; CHECK:       # %bb.0:13; CHECK-NEXT:    incl %edi14; CHECK-NEXT:    andl $65527, %edi # imm = 0xFFF715; CHECK-NEXT:    movl %edi, (%rdx)16; CHECK-NEXT:    xorl %eax, %eax17; CHECK-NEXT:    testb %dil, %dil18; CHECK-NEXT:    cmovel %esi, %eax19; CHECK-NEXT:    retq20  %4 = add i16 %0, 121  %5 = and i16 %4, -922  %6 = zext i16 %5 to i3223  store i32 %6, ptr %2, align 424  %7 = trunc i16 %5 to i825  %8 = icmp eq i8 %7, 026  %9 = select i1 %8, i32 %1, i32 027  ret i32 %928}29