forked from llvm-mirror/llvm
-
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: PerformOrCombine introduced a vselect node with a wrong order of…
… operands. This bug was introduced when a dedicated blend sdnode was replaced with the vselect node (in 139479). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145488 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
2 changed files
with
23 additions
and
1 deletion.
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,22 @@ | ||
; RUN: llc < %s -mcpu=corei7 | FileCheck %s | ||
|
||
; Test that the order of operands is correct | ||
; CHECK: select_func | ||
; CHECK: pblendvb %xmm1, %xmm2 | ||
; CHECK: ret | ||
|
||
define void @select_func() { | ||
entry: | ||
%c.lobit.i.i.i = ashr <8 x i16> <i16 17, i16 5, i16 1, i16 15, i16 19, i16 15, i16 4, i16 1> , <i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15, i16 15> | ||
%a35 = bitcast <8 x i16> %c.lobit.i.i.i to <2 x i64> | ||
%and.i56.i.i.i = and <8 x i16> %c.lobit.i.i.i, <i16 25, i16 8, i16 65, i16 25, i16 8, i16 95, i16 15, i16 45> | ||
%and.i5.i.i.i = bitcast <8 x i16> %and.i56.i.i.i to <2 x i64> | ||
%neg.i.i.i.i = xor <2 x i64> %a35, <i64 -1, i64 -1> | ||
%and.i.i.i.i = and <2 x i64> zeroinitializer, %neg.i.i.i.i | ||
%or.i.i.i.i = or <2 x i64> %and.i.i.i.i, %and.i5.i.i.i | ||
%a37 = bitcast <2 x i64> %or.i.i.i.i to <8 x i16> | ||
store <8 x i16> %a37, <8 x i16> addrspace(1)* undef, align 4 | ||
ret void | ||
} | ||
|
||
|