From: Simon Pilgrim Date: Fri, 8 Mar 2019 19:16:26 +0000 (+0000) Subject: [X86] Add test case for PR22473 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9808bce5ccdeff6bcf5d96df1745fd1962bcc05f;p=llvm [X86] Add test case for PR22473 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@355712 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/X86/pr22473.ll b/test/CodeGen/X86/pr22473.ll new file mode 100644 index 00000000000..145f81d286f --- /dev/null +++ b/test/CodeGen/X86/pr22473.ll @@ -0,0 +1,22 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=i686-unknown | FileCheck %s --check-prefixes=X86 +; RUN: llc < %s -mtriple=x86_64-unknown | FileCheck %s --check-prefixes=X64 + +define zeroext i1 @PR22473(i8*, i8) { +; X86-LABEL: PR22473: +; X86: # %bb.0: +; X86-NEXT: movl {{[0-9]+}}(%esp), %eax +; X86-NEXT: movb (%eax), %al +; X86-NEXT: cmpb {{[0-9]+}}(%esp), %al +; X86-NEXT: sete %al +; X86-NEXT: retl +; +; X64-LABEL: PR22473: +; X64: # %bb.0: +; X64-NEXT: cmpb %sil, (%rdi) +; X64-NEXT: sete %al +; X64-NEXT: retq + %3 = load i8, i8* %0, align 1 + %4 = icmp eq i8 %3, %1 + ret i1 %4 +}