[PATCH] Big shift test
Paweł Bylica
chfast at gmail.com
Mon Apr 20 11:45:05 PDT 2015
A new test that checks X86_64 assembly
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7752
Files:
test/CodeGen/X86/shift-i256.ll
Index: test/CodeGen/X86/shift-i256.ll
===================================================================
--- test/CodeGen/X86/shift-i256.ll
+++ test/CodeGen/X86/shift-i256.ll
@@ -1,9 +1,21 @@
-; RUN: llc < %s -march=x86
-; RUN: llc < %s -march=x86-64
+; RUN: llc < %s -march=x86 | FileCheck %s
+; RUN: llc < %s -march=x86-64 -O0 | FileCheck %s -check-prefix=CHECK-X64
+; RUN: llc < %s -march=x86-64 -O2 | FileCheck %s -check-prefix=CHECK-X64
-define void @t(i256 %x, i256 %a, i256* nocapture %r) nounwind readnone {
+; CHECK-LABEL: shift1
+define void @shift1(i256 %x, i256 %a, i256* nocapture %r) nounwind readnone {
entry:
%0 = ashr i256 %x, %a
store i256 %0, i256* %r
ret void
}
+
+; CHECK-LABEL: shift2
+define i256 @shift2(i256 %c) nounwind
+{
+ %b = shl i256 1, %c ; %c must not be a constant
+ ; Special case when %c is 0:
+ ; CHECK-X64: testb [[REG:%r[0-9]+b]], [[REG]]
+ ; CHECK-X64: cmoveq
+ ret i256 %b
+}
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7752.24038.patch
Type: text/x-patch
Size: 948 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150420/d612de07/attachment.bin>
More information about the llvm-commits
mailing list