Author: Guozhi Wei Date: 2021-01-20T17:15:47-08:00 New Revision: 96296d9220ee5193f6ad7ff181d42c10d9f3c7e3
URL: https://github.com/llvm/llvm-project/commit/96296d9220ee5193f6ad7ff181d42c10d9f3c7e3 DIFF: https://github.com/llvm/llvm-project/commit/96296d9220ee5193f6ad7ff181d42c10d9f3c7e3.diff LOG: [DAGCombiner] Precommit test case for D95086 This is the test case for D95086 with worse result. Differential Revision: https://reviews.llvm.org/D95103 Added: llvm/test/CodeGen/X86/select-ext.ll Modified: Removed: ################################################################################ diff --git a/llvm/test/CodeGen/X86/select-ext.ll b/llvm/test/CodeGen/X86/select-ext.ll new file mode 100644 index 000000000000..848d6fa5f0c7 --- /dev/null +++ b/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 +} + _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits