Files
TheRock/compiler/amd-llvm/llvm/test/CodeGen/X86/2011-12-15-vec_shift.ll
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

68 lines
2.9 KiB
LLVM

; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 6
; RUN: llc -mattr=+sse4.1 -mcpu=penryn < %s | FileCheck %s -check-prefix=CHECK-W-SSE4
; RUN: llc -mattr=-sse4.1 -mcpu=penryn < %s | FileCheck %s -check-prefix=CHECK-WO-SSE4
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.7"
; Test case for r146671
; With SSE41 - make sure operands to pblend are in the right order.
; Without SSE41 - make sure we're masking and pcmp'ing the VSELECT conditon vector.
define <16 x i8> @shift(<16 x i8> %a, <16 x i8> %b) nounwind {
; CHECK-W-SSE4-LABEL: shift:
; CHECK-W-SSE4: ## %bb.0:
; CHECK-W-SSE4-NEXT: movdqa %xmm0, %xmm2
; CHECK-W-SSE4-NEXT: movdqa %xmm0, %xmm3
; CHECK-W-SSE4-NEXT: psllw $4, %xmm3
; CHECK-W-SSE4-NEXT: pand {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm3
; CHECK-W-SSE4-NEXT: psllw $5, %xmm1
; CHECK-W-SSE4-NEXT: movdqa %xmm1, %xmm0
; CHECK-W-SSE4-NEXT: pblendvb %xmm0, %xmm3, %xmm2
; CHECK-W-SSE4-NEXT: movdqa %xmm2, %xmm3
; CHECK-W-SSE4-NEXT: paddb %xmm2, %xmm3
; CHECK-W-SSE4-NEXT: paddb %xmm3, %xmm3
; CHECK-W-SSE4-NEXT: paddb %xmm1, %xmm1
; CHECK-W-SSE4-NEXT: movdqa %xmm1, %xmm0
; CHECK-W-SSE4-NEXT: pblendvb %xmm0, %xmm3, %xmm2
; CHECK-W-SSE4-NEXT: movdqa %xmm2, %xmm3
; CHECK-W-SSE4-NEXT: paddb %xmm2, %xmm3
; CHECK-W-SSE4-NEXT: paddb %xmm1, %xmm1
; CHECK-W-SSE4-NEXT: movdqa %xmm1, %xmm0
; CHECK-W-SSE4-NEXT: pblendvb %xmm0, %xmm3, %xmm2
; CHECK-W-SSE4-NEXT: movdqa %xmm2, %xmm0
; CHECK-W-SSE4-NEXT: retq
;
; CHECK-WO-SSE4-LABEL: shift:
; CHECK-WO-SSE4: ## %bb.0:
; CHECK-WO-SSE4-NEXT: psllw $5, %xmm1
; CHECK-WO-SSE4-NEXT: pxor %xmm2, %xmm2
; CHECK-WO-SSE4-NEXT: pxor %xmm3, %xmm3
; CHECK-WO-SSE4-NEXT: pcmpgtb %xmm1, %xmm3
; CHECK-WO-SSE4-NEXT: movdqa %xmm3, %xmm4
; CHECK-WO-SSE4-NEXT: pandn %xmm0, %xmm4
; CHECK-WO-SSE4-NEXT: psllw $4, %xmm0
; CHECK-WO-SSE4-NEXT: pand %xmm3, %xmm0
; CHECK-WO-SSE4-NEXT: pand {{\.?LCPI[0-9]+_[0-9]+}}(%rip), %xmm0
; CHECK-WO-SSE4-NEXT: por %xmm4, %xmm0
; CHECK-WO-SSE4-NEXT: paddb %xmm1, %xmm1
; CHECK-WO-SSE4-NEXT: pxor %xmm3, %xmm3
; CHECK-WO-SSE4-NEXT: pcmpgtb %xmm1, %xmm3
; CHECK-WO-SSE4-NEXT: movdqa %xmm3, %xmm4
; CHECK-WO-SSE4-NEXT: pandn %xmm0, %xmm4
; CHECK-WO-SSE4-NEXT: paddb %xmm0, %xmm0
; CHECK-WO-SSE4-NEXT: paddb %xmm0, %xmm0
; CHECK-WO-SSE4-NEXT: pand %xmm3, %xmm0
; CHECK-WO-SSE4-NEXT: por %xmm4, %xmm0
; CHECK-WO-SSE4-NEXT: paddb %xmm1, %xmm1
; CHECK-WO-SSE4-NEXT: pcmpgtb %xmm1, %xmm2
; CHECK-WO-SSE4-NEXT: movdqa %xmm2, %xmm1
; CHECK-WO-SSE4-NEXT: pandn %xmm0, %xmm1
; CHECK-WO-SSE4-NEXT: paddb %xmm0, %xmm0
; CHECK-WO-SSE4-NEXT: pand %xmm2, %xmm0
; CHECK-WO-SSE4-NEXT: por %xmm1, %xmm0
; CHECK-WO-SSE4-NEXT: retq
%1 = shl <16 x i8> %a, %b
ret <16 x i8> %1
}