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.
- When simplifying the mask generation for BLEND, check whether that mask is also consumed by other non-BLEND insns. If true, skip that simplification. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@195476 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
2 changed files
with
25 additions
and
0 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,16 @@ | ||
; RUN: llc < %s -mtriple=x86_64-linux-pc -mcpu=penryn | FileCheck %s | ||
|
||
; Ensure PSRAD is generated as the condition is consumed by both PADD and | ||
; BLENDVPS. PAND requires all bits setting properly. | ||
|
||
define <4 x i32> @foo(<4 x i32>* %p, <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v2, <4 x i32> %v3) { | ||
%sext_cond = sext <4 x i1> %cond to <4 x i32> | ||
%t1 = add <4 x i32> %v1, %sext_cond | ||
%t2 = select <4 x i1> %cond, <4 x i32> %v1, <4 x i32> %v2 | ||
store <4 x i32> %t2, <4 x i32>* %p | ||
ret <4 x i32> %t1 | ||
; CHECK: foo | ||
; CHECK: pslld | ||
; CHECK: psrad | ||
; CHECK: ret | ||
} |