-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[X86] Special handle for v1i1 during ExtractBitFromMaskVector
Fixes #64322 Reviewed By: RKSimon Differential Revision: https://reviews.llvm.org/D156855
- Loading branch information
1 parent
cd328c1
commit 4d6f4c9
Showing
2 changed files
with
34 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,21 @@ | ||
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2 | ||
; RUN: llc < %s -mtriple=x86_64-unknown-unknown -mcpu=icelake-server | FileCheck %s | ||
|
||
@G = global <1 x i1> <i1 true> | ||
@G.1 = global i1 false | ||
|
||
define void @foo(i32 %x) { | ||
; CHECK-LABEL: foo: | ||
; CHECK: # %bb.0: | ||
; CHECK-NEXT: movq G@GOTPCREL(%rip), %rax | ||
; CHECK-NEXT: kmovb (%rax), %k0 | ||
; CHECK-NEXT: kmovd %k0, %eax | ||
; CHECK-NEXT: andb $1, %al | ||
; CHECK-NEXT: movq G.1@GOTPCREL(%rip), %rcx | ||
; CHECK-NEXT: movb %al, (%rcx) | ||
; CHECK-NEXT: retq | ||
%LGV = load <1 x i1>, ptr @G | ||
%E = extractelement <1 x i1> %LGV, i32 %x | ||
store i1 %E, ptr @G.1 | ||
ret void | ||
} |