[PATCH] D13943: AVX-512: Fixed a bug in "select" operation for i1 type
Elena Demikhovsky via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 22 00:12:42 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL250996: AVX-512: Fixed a bug in select_cc for i1 type (authored by delena).
Changed prior to commit:
http://reviews.llvm.org/D13943?vs=38003&id=38096#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13943
Files:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
llvm/trunk/test/CodeGen/X86/avx512-cmp.ll
Index: llvm/trunk/test/CodeGen/X86/avx512-cmp.ll
===================================================================
--- llvm/trunk/test/CodeGen/X86/avx512-cmp.ll
+++ llvm/trunk/test/CodeGen/X86/avx512-cmp.ll
@@ -1,4 +1,5 @@
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=knl --show-mc-encoding | FileCheck %s
+; RUN: llc < %s -mtriple=i386-apple-darwin -mcpu=knl | FileCheck %s --check-prefix AVX512-32
; CHECK-LABEL: test1
; CHECK: vucomisd {{.*}}encoding: [0x62
@@ -99,3 +100,27 @@
B:
ret i32 7
}
+
+; AVX512-32-LABEL: test10
+; AVX512-32: movl 4(%esp), %ecx
+; AVX512-32: cmpl $9, (%ecx)
+; AVX512-32: seta %al
+; AVX512-32: cmpl $0, 4(%ecx)
+; AVX512-32: setg %cl
+; AVX512-32: je
+; AVX512-32: movb %cl, %al
+; AVX512-32: testb $1, %al
+
+define void @test10(i64* %i.addr) {
+
+ %x = load i64, i64* %i.addr, align 8
+ %cmp = icmp slt i64 %x, 10
+ br i1 %cmp, label %true, label %false
+
+true:
+ ret void
+
+false:
+ ret void
+}
+
Index: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
@@ -1328,6 +1328,7 @@
setOperationAction(ISD::BR_CC, MVT::i1, Expand);
setOperationAction(ISD::SETCC, MVT::i1, Custom);
+ setOperationAction(ISD::SELECT_CC, MVT::i1, Expand);
setOperationAction(ISD::XOR, MVT::i1, Legal);
setOperationAction(ISD::OR, MVT::i1, Legal);
setOperationAction(ISD::AND, MVT::i1, Legal);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13943.38096.patch
Type: text/x-patch
Size: 1638 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151022/74ec7bf8/attachment.bin>
More information about the llvm-commits
mailing list