[PATCH] D95103: [DAGCombiner] Precommit test case for D95086
Guozhi Wei via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 20 17:17:38 PST 2021
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG96296d9220ee: [DAGCombiner] Precommit test case for D95086 (authored by Carrot).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D95103/new/
https://reviews.llvm.org/D95103
Files:
llvm/test/CodeGen/X86/select-ext.ll
Index: llvm/test/CodeGen/X86/select-ext.ll
===================================================================
--- /dev/null
+++ llvm/test/CodeGen/X86/select-ext.ll
@@ -0,0 +1,21 @@
+; RUN: llc -mtriple=x86_64-unknown-unknown < %s | FileCheck %s
+
+; TODO: (zext(select c, load1, load2)) -> (select c, zextload1, zextload2)
+
+; CHECK-LABEL: foo
+; CHECK: movzbl (%rdi), %eax
+; CHECK-NEXT: movzbl 1(%rdi), %ecx
+; CHECK-NEXT: testl %esi, %esi
+; CHECK-NEXT: cmovel %eax, %ecx
+; CHECK-NEXT: movzbl %cl, %eax
+; CHECK-NEXT: retq
+
+define i64 @foo(i8* %p, i1 zeroext %c) {
+ %ld1 = load volatile i8, i8* %p
+ %arrayidx1 = getelementptr inbounds i8, i8* %p, i64 1
+ %ld2 = load volatile i8, i8* %arrayidx1
+ %cond.v = select i1 %c, i8 %ld2, i8 %ld1
+ %cond = zext i8 %cond.v to i64
+ ret i64 %cond
+}
+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D95103.318071.patch
Type: text/x-patch
Size: 831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210121/fab32b14/attachment.bin>
More information about the llvm-commits
mailing list