brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · e3479f4 Raw
65 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple aarch64-unknown-unknown -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK-BASE3; RUN: llc < %s -mtriple aarch64-unknown-unknown -mattr=+fullfp16 -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK-FP164; RUN: llc < %s -mtriple aarch64-unknown-unknown -mattr=+bf16 -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK-BASE5; RUN: llc < %s -mtriple aarch64-unknown-unknown -mattr=+bf16,+fullfp16 -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK-FP166 7define bfloat @test_select(bfloat %a, bfloat %b, i1 zeroext %c) {8; CHECK-BASE-LABEL: test_select:9; CHECK-BASE:       // %bb.0:10; CHECK-BASE-NEXT:    // kill: def $h0 killed $h0 def $s011; CHECK-BASE-NEXT:    cmp w0, #012; CHECK-BASE-NEXT:    // kill: def $h1 killed $h1 def $s113; CHECK-BASE-NEXT:    fcsel s0, s0, s1, ne14; CHECK-BASE-NEXT:    // kill: def $h0 killed $h0 killed $s015; CHECK-BASE-NEXT:    ret16;17; CHECK-FP16-LABEL: test_select:18; CHECK-FP16:       // %bb.0:19; CHECK-FP16-NEXT:    cmp w0, #020; CHECK-FP16-NEXT:    fcsel h0, h0, h1, ne21; CHECK-FP16-NEXT:    ret22  %r = select i1 %c, bfloat %a, bfloat %b23  ret bfloat %r24}25 26define bfloat @test_select_fcc(bfloat %a, bfloat %b, float %c, float %d) {27; CHECK-BASE-LABEL: test_select_fcc:28; CHECK-BASE:       // %bb.0:29; CHECK-BASE-NEXT:    fcmp s2, s330; CHECK-BASE-NEXT:    // kill: def $h0 killed $h0 def $s031; CHECK-BASE-NEXT:    // kill: def $h1 killed $h1 def $s132; CHECK-BASE-NEXT:    fcsel s0, s0, s1, ne33; CHECK-BASE-NEXT:    // kill: def $h0 killed $h0 killed $s034; CHECK-BASE-NEXT:    ret35;36; CHECK-FP16-LABEL: test_select_fcc:37; CHECK-FP16:       // %bb.0:38; CHECK-FP16-NEXT:    fcmp s2, s339; CHECK-FP16-NEXT:    fcsel h0, h0, h1, ne40; CHECK-FP16-NEXT:    ret41  %cc = fcmp une float %c, %d42  %r = select i1 %cc, bfloat %a, bfloat %b43  ret bfloat %r44}45 46define bfloat @test_select_icc(bfloat %a, bfloat %b, i32 %c, i32 %d) {47; CHECK-BASE-LABEL: test_select_icc:48; CHECK-BASE:       // %bb.0:49; CHECK-BASE-NEXT:    // kill: def $h0 killed $h0 def $s050; CHECK-BASE-NEXT:    cmp w0, w151; CHECK-BASE-NEXT:    // kill: def $h1 killed $h1 def $s152; CHECK-BASE-NEXT:    fcsel s0, s0, s1, ne53; CHECK-BASE-NEXT:    // kill: def $h0 killed $h0 killed $s054; CHECK-BASE-NEXT:    ret55;56; CHECK-FP16-LABEL: test_select_icc:57; CHECK-FP16:       // %bb.0:58; CHECK-FP16-NEXT:    cmp w0, w159; CHECK-FP16-NEXT:    fcsel h0, h0, h1, ne60; CHECK-FP16-NEXT:    ret61  %cc = icmp ne i32 %c, %d62  %r = select i1 %cc, bfloat %a, bfloat %b63  ret bfloat %r64}65