brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · b085258 Raw
32 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mtriple=aarch64 < %s | FileCheck %s3 4define void @peephole_csel(ptr %dst, i1 %0, i1 %cmp) {5; CHECK-LABEL: peephole_csel:6; CHECK:       // %bb.0: // %entry7; CHECK-NEXT:    tst w2, #0x18; CHECK-NEXT:    mov x8, xzr9; CHECK-NEXT:    tst w1, #0x110; CHECK-NEXT:    csinc x8, x8, xzr, ne11; CHECK-NEXT:    str x8, [x0]12; CHECK-NEXT:    ret13entry:14  br i1 %0, label %then, label %exit15 16then:                                             ; preds = %entry17  ; The donothing() is needed to make make this block less interesting to18  ; SimplifyCFG. Otherwise we may not get the csel that we want to test.19  call void @llvm.donothing()20  br i1 %cmp, label %true, label %exit21 22true:                                             ; preds = %then23  ; Same as above24  call void @llvm.donothing()25  br label %exit26 27exit: ; preds = %true, %then, %entry28  %x = phi i64 [ 0, %true ], [ 0, %then ], [ 1, %entry ]29  store i64 %x, ptr %dst, align 830  ret void31}32