forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[X86][SSE] combineScalarToVector - only reuse broadcasts for scalar_t…
…o_vector if the source operands scalar types match We were hitting an issue when the scalar_to_vector source was being implicitly truncated (in this case to i8 to vXi1) but we were also using the i8 source in a broadcast to a vXi8 value. Fixes PR50374
- Loading branch information
Showing
2 changed files
with
45 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=skx | FileCheck %s | ||
|
||
define void @PR50374() { | ||
; CHECK-LABEL: PR50374: | ||
; CHECK: # %bb.0: # %while.84.body.preheader | ||
; CHECK-NEXT: .p2align 4, 0x90 | ||
; CHECK-NEXT: .LBB0_1: # %vector.body1999 | ||
; CHECK-NEXT: # =>This Inner Loop Header: Depth=1 | ||
; CHECK-NEXT: jmp .LBB0_1 | ||
while.84.body.preheader: | ||
%0 = load i8, i8* undef, align 1 | ||
%1 = load i8, i8* undef, align 4 | ||
%.not14.2.2 = icmp eq i8 0, 0 | ||
%2 = and i8 %0, 1 | ||
%.not14.1.2 = icmp eq i8 %2, 0 | ||
%3 = select i1 %.not14.2.2, i1 %.not14.1.2, i1 false | ||
%.not14.2361 = icmp eq i8 0, 0 | ||
%4 = select i1 %3, i1 %.not14.2361, i1 false | ||
%add.10961.i.2.2 = select reassoc nsz contract i1 %4, float 0.000000e+00, float 0x7FF8000000000000 | ||
%broadcast.splatinsert2024 = insertelement <8 x float> poison, float %add.10961.i.2.2, i32 0 | ||
%broadcast.splat2025 = shufflevector <8 x float> %broadcast.splatinsert2024, <8 x float> poison, <8 x i32> zeroinitializer | ||
%broadcast.splatinsert2049 = insertelement <8 x i8> poison, i8 %1, i32 0 | ||
%broadcast.splat2050 = shufflevector <8 x i8> %broadcast.splatinsert2049, <8 x i8> poison, <8 x i32> zeroinitializer | ||
br label %vector.body1999 | ||
|
||
vector.body1999: ; preds = %vector.body1999, %while.84.body.preheader | ||
%predphi2026 = select <8 x i1> undef, <8 x float> undef, <8 x float> %broadcast.splat2025 | ||
%predphi2051 = select <8 x i1> undef, <8 x i8> %broadcast.splat2050, <8 x i8> undef | ||
br label %vector.body1999 | ||
} |