mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-21 09:56:48 +00:00
[X86] Add test coverage for #134602
This commit is contained in:
parent
893cd69872
commit
150e7b14f9
25
llvm/test/CodeGen/X86/pr134602.ll
Normal file
25
llvm/test/CodeGen/X86/pr134602.ll
Normal file
@ -0,0 +1,25 @@
|
||||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
; RUN: llc < %s -mtriple=i686-- | FileCheck %s --check-prefix=X86
|
||||
; RUN: llc < %s -mtriple=x86_64-- | FileCheck %s --check-prefix=X64
|
||||
|
||||
; FIXME: incorrect vector codegen due to bad handling of splats of binops containing undefs
|
||||
define i32 @PR134602(i16 %a0) {
|
||||
; X86-LABEL: PR134602:
|
||||
; X86: # %bb.0:
|
||||
; X86-NEXT: movl {{[0-9]+}}(%esp), %eax
|
||||
; X86-NEXT: orl $1, %eax
|
||||
; X86-NEXT: addl $3, %eax
|
||||
; X86-NEXT: cwtl
|
||||
; X86-NEXT: retl
|
||||
;
|
||||
; X64-LABEL: PR134602:
|
||||
; X64: # %bb.0:
|
||||
; X64-NEXT: xorl %eax, %eax
|
||||
; X64-NEXT: retq
|
||||
%splat= insertelement <4 x i16> zeroinitializer, i16 %a0, i64 0
|
||||
%mul = mul <4 x i16> %splat, <i16 1, i16 1, i16 0, i16 0>
|
||||
%or = or <4 x i16> splat (i16 1), %mul
|
||||
%reduce = call i16 @llvm.vector.reduce.add.v4i16(<4 x i16> %or)
|
||||
%ret_32 = sext i16 %reduce to i32
|
||||
ret i32 %ret_32
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user