reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
; RUN: llc < %s -O0 -verify-machineinstrs -fast-isel-abort=1 -mtriple=powerpc64-unknown-linux-gnu -mcpu=pwr7 | FileCheck %s --check-prefix=ELF64

; zext

define i32 @zext_8_32(i8 %a) nounwind {
; ELF64: zext_8_32
  %r = zext i8 %a to i32
; ELF64: clrlwi {{[0-9]+}}, {{[0-9]+}}, 24
  ret i32 %r
}

define i32 @zext_16_32(i16 %a) nounwind {
; ELF64: zext_16_32
  %r = zext i16 %a to i32
; ELF64: clrlwi {{[0-9]+}}, {{[0-9]+}}, 16
  ret i32 %r
}

define i64 @zext_8_64(i8 %a) nounwind {
; ELF64: zext_8_64
  %r = zext i8 %a to i64
; ELF64: clrldi {{[0-9]+}}, {{[0-9]+}}, 56
  ret i64 %r
}

define i64 @zext_16_64(i16 %a) nounwind {
; ELF64: zext_16_64
  %r = zext i16 %a to i64
; ELF64: clrldi {{[0-9]+}}, {{[0-9]+}}, 48
  ret i64 %r
}

define i64 @zext_32_64(i32 %a) nounwind {
; ELF64: zext_32_64
  %r = zext i32 %a to i64
; ELF64: clrldi {{[0-9]+}}, {{[0-9]+}}, 32
  ret i64 %r
}

; sext

define i32 @sext_8_32(i8 %a) nounwind {
; ELF64: sext_8_32
  %r = sext i8 %a to i32
; ELF64: extsb
  ret i32 %r
}

define i32 @sext_16_32(i16 %a) nounwind {
; ELF64: sext_16_32
  %r = sext i16 %a to i32
; ELF64: extsh
  ret i32 %r
}

define i64 @sext_8_64(i8 %a) nounwind {
; ELF64: sext_8_64
  %r = sext i8 %a to i64
; ELF64: extsb
  ret i64 %r
}

define i64 @sext_16_64(i16 %a) nounwind {
; ELF64: sext_16_64
  %r = sext i16 %a to i64
; ELF64: extsh
  ret i64 %r
}

define i64 @sext_32_64(i32 %a) nounwind {
; ELF64: sext_32_64
  %r = sext i32 %a to i64
; ELF64: extsw
  ret i64 %r
}