aboutsummaryrefslogtreecommitdiff
path: root/llvm/test/CodeGen/X86/lea-16bit.ll
blob: cec29ab1da6ab21dc7df161218f3e0c9132e3022 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc < %s -mtriple=x86_64-linux | FileCheck %s --check-prefix=NO-NDD
; RUN: llc < %s -mtriple=x86_64-linux -mattr=+ndd | FileCheck %s --check-prefix=NDD

define i16 @lea16bit(i16 %in) {
; NO-NDD-LABEL: lea16bit:
; NO-NDD:       # %bb.0:
; NO-NDD-NEXT:    # kill: def $edi killed $edi def $rdi
; NO-NDD-NEXT:    leal 1(%rdi,%rdi), %eax
; NO-NDD-NEXT:    # kill: def $ax killed $ax killed $eax
; NO-NDD-NEXT:    retq
;
; NDD-LABEL: lea16bit:
; NDD:       # %bb.0:
; NDD-NEXT:    # kill: def $edi killed $edi def $rdi
; NDD-NEXT:    leaw 1(%rdi,%rdi), %ax
; NDD-NEXT:    retq
  %shl = shl i16 %in, 1
  %or = or i16 %shl, 1
  ret i16 %or
}