brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 5f21a23 Raw
41 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2;RUN: llc < %s | FileCheck %s3 4; This test case failed on legalization of "shl" node. PR29058.5 6target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"7target triple = "x86_64-unknown-linux-gnu"8 9@structMember = external dso_local local_unnamed_addr global i64, align 810 11define i32 @PR29058(i8 %x, i32 %y) {12; CHECK-LABEL: PR29058:13; CHECK:       # %bb.0: # %entry14; CHECK-NEXT:    testb %dil, %dil15; CHECK-NEXT:    movl $2147483646, %eax # imm = 0x7FFFFFFE16; CHECK-NEXT:    cmovnel %esi, %eax17; CHECK-NEXT:    xorl %ecx, %ecx18; CHECK-NEXT:    cmpb $1, %dil19; CHECK-NEXT:    sbbl %ecx, %ecx20; CHECK-NEXT:    orb %sil, %cl21; CHECK-NEXT:    # kill: def $cl killed $cl killed $ecx22; CHECK-NEXT:    shll %cl, %eax23; CHECK-NEXT:    movq %rax, structMember(%rip)24; CHECK-NEXT:    # kill: def $eax killed $eax killed $rax25; CHECK-NEXT:    retq26entry:27  %bool_1 = icmp ne i8 %x, 028  %bool_2 = icmp eq i8 %x, 029  %0 = select i1 %bool_2, i32 2147483646, i32 %y30  %or_1 = select i1 %bool_1, i32 %y, i32 -131  %shl_1 = shl i32 %0, %or_132  %conv = zext i32 %shl_1 to i6433  store i64 %conv, ptr @structMember, align 834  %tmp = select i1 %bool_2, i32 2147483646, i32 %y35  %lnot = icmp eq i8 %x, 036  %or_2 = select i1 %lnot, i32 -1, i32 %y37  %shl_2 = shl i32 %tmp, %or_238  ret i32 %shl_239}40 41