From 4e6438c5348359fff39207d7854e5758b9d0f0db Mon Sep 17 00:00:00 2001 From: David Majnemer Date: Thu, 28 May 2015 22:12:27 +0000 Subject: [PATCH] Add testcase for r238503. llvm-svn: 238515 --- llvm/test/CodeGen/X86/pr23664.ll | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 llvm/test/CodeGen/X86/pr23664.ll diff --git a/llvm/test/CodeGen/X86/pr23664.ll b/llvm/test/CodeGen/X86/pr23664.ll new file mode 100644 index 0000000..a501c0d --- /dev/null +++ b/llvm/test/CodeGen/X86/pr23664.ll @@ -0,0 +1,14 @@ +; RUN: llc -mtriple=x86_64-unknown-linux-gnu < %s | FileCheck %s + +define i2 @f(i32 %arg) { + %trunc = trunc i32 %arg to i1 + %sext = sext i1 %trunc to i2 + %or = or i2 %sext, 1 + ret i2 %or + +; CHECK-LABEL: f: +; CHECK: addb %dil, %dil +; CHECK-NEXT: orb $1, %dil +; CHECK-NEXT: movb %dil, %al +; CHECK-NEXT: retq +} -- 2.7.4