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] Add missing AVX512 anyext patterns.
Add AVX512 anyext patterns for i16 and i64, modeled on the existing i8 and i32 patterns. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273038 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
2 changed files
with
48 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,40 @@ | ||
; RUN: llc -mattr=+avx512f < %s | FileCheck %s | ||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" | ||
target triple = "x86_64-unknown-linux-gnu" | ||
|
||
; Note that the kmovs should really *not* appear in the output, this is an | ||
; artifact of the current poor lowering. This is tracked by PR28175. | ||
|
||
; CHECK-LABEL: @foo64 | ||
; CHECK: kmov | ||
; CHECK: kmov | ||
; CHECK: orq $-2, %rax | ||
; CHECK: ret | ||
define i64 @foo64(i1 zeroext %i, i32 %j) #0 { | ||
br label %bb | ||
|
||
bb: | ||
%z = zext i1 %i to i64 | ||
%v = or i64 %z, -2 | ||
br label %end | ||
|
||
end: | ||
ret i64 %v | ||
} | ||
|
||
; CHECK-LABEL: @foo16 | ||
; CHECK: kmov | ||
; CHECK: kmov | ||
; CHECK: orl $65534, %eax | ||
; CHECK: retq | ||
define i16 @foo16(i1 zeroext %i, i32 %j) #0 { | ||
br label %bb | ||
|
||
bb: | ||
%z = zext i1 %i to i16 | ||
%v = or i16 %z, -2 | ||
br label %end | ||
|
||
end: | ||
ret i16 %v | ||
} |