llvm.org GIT mirror llvm / testing test / CodeGen / X86 / promote-i16.ll
testing

Tree @testing (Download .tar.gz)

promote-i16.ll @testingraw · history · blame

; RUN: llc < %s -mtriple=i686-unknown-linux-gnu | FileCheck %s

define signext i16 @foo(i16 signext %x) nounwind {
entry:
; CHECK-LABEL: foo:
; CHECK: movzwl 4(%esp), %eax
; CHECK-NEXT: xorl $21998, %eax
; CHECK-NEXT: # kill
; CHECK-NEXT: retl
  %0 = xor i16 %x, 21998
  ret i16 %0
}

define signext i16 @bar(i16 signext %x) nounwind {
entry:
; CHECK-LABEL: bar:
; CHECK: movzwl 4(%esp), %eax
; CHECK-NEXT: xorl $54766, %eax
; CHECK-NEXT: # kill
; CHECK-NEXT: retl
  %0 = xor i16 %x, 54766
  ret i16 %0
}