|
| 1 | +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 | +; RUN: llc < %s -mtriple=x86_64-- -mattr=avx512bf16,avx512fp16 | FileCheck %s |
| 3 | + |
| 4 | +define void @test(<2 x ptr> %ptr) { |
| 5 | +; CHECK-LABEL: test: |
| 6 | +; CHECK: # %bb.0: # %entry |
| 7 | +; CHECK-NEXT: xorl %eax, %eax |
| 8 | +; CHECK-NEXT: testb %al, %al |
| 9 | +; CHECK-NEXT: je .LBB0_1 |
| 10 | +; CHECK-NEXT: # %bb.2: # %loop.127.preheader |
| 11 | +; CHECK-NEXT: retq |
| 12 | +; CHECK-NEXT: .LBB0_1: # %ifmerge.89 |
| 13 | +; CHECK-NEXT: movzwl (%rax), %eax |
| 14 | +; CHECK-NEXT: shll $16, %eax |
| 15 | +; CHECK-NEXT: vmovd %eax, %xmm0 |
| 16 | +; CHECK-NEXT: vmulss %xmm0, %xmm0, %xmm0 |
| 17 | +; CHECK-NEXT: vbroadcastss %xmm0, %xmm0 |
| 18 | +; CHECK-NEXT: vmovlps %xmm0, (%rax) |
| 19 | +entry: |
| 20 | + br label %then.13 |
| 21 | + |
| 22 | +then.13: ; preds = %entry |
| 23 | + %0 = fpext bfloat poison to float |
| 24 | + br i1 poison, label %loop.127.preheader, label %ifmerge.89 |
| 25 | + |
| 26 | +ifmerge.89: ; preds = %then.13 |
| 27 | + %.splatinsert144 = insertelement <2 x float> poison, float %0, i64 0 |
| 28 | + %.splat145 = shufflevector <2 x float> %.splatinsert144, <2 x float> poison, <2 x i32> zeroinitializer |
| 29 | + %1 = tail call <2 x bfloat> @llvm.masked.gather.v2bf16.v2p0(<2 x ptr> undef, i32 2, <2 x i1> <i1 true, i1 true>, <2 x bfloat> poison) |
| 30 | + %2 = fpext <2 x bfloat> %1 to <2 x float> |
| 31 | + %3 = fmul fast <2 x float> %.splat145, %2 |
| 32 | + %4 = fadd fast <2 x float> zeroinitializer, %3 |
| 33 | + store <2 x float> %4, ptr poison, align 4 |
| 34 | + unreachable |
| 35 | + |
| 36 | +loop.127.preheader: ; preds = %then.13 |
| 37 | + ret void |
| 38 | +} |
| 39 | + |
| 40 | +declare <2 x bfloat> @llvm.masked.gather.v2bf16.v2p0(<2 x ptr>, i32 immarg, <2 x i1>, <2 x bfloat>) |
0 commit comments