diff --git a/llvm/test/CodeGen/X86/pr90688.ll b/llvm/test/CodeGen/X86/pr90688.ll new file mode 100644 index 0000000000000..28c016ce28aad --- /dev/null +++ b/llvm/test/CodeGen/X86/pr90688.ll @@ -0,0 +1,15 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4 +; RUN: llc < %s -mtriple=x86_64-linux-gnu | FileCheck %s + +define i64 @off(i8 signext %a) { +; CHECK-LABEL: off: +; CHECK: # %bb.0: # %entry +; CHECK-NEXT: movzbl %dil, %eax +; CHECK-NEXT: leal 1024(,%rax,8), %eax +; CHECK-NEXT: retq +entry: + %add = xor i8 %a, -128 + %conv2 = zext i8 %add to i64 + %mul = shl nuw nsw i64 %conv2, 3 + ret i64 %mul +}