| ; 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 |
| } |