mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-23 12:40:17 +00:00
2d0eef4c7d
This includes instructions with aggregate operands (insert/extract), instructions with vector operands (insert/extract/shuffle), binary arithmetic and bitwise instructions, conversion instructions and terminators. Work was done by lama.saba@intel.com. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202262 91177308-0d34-0410-b5e6-96231b3b80d8
104 lines
2.0 KiB
LLVM
104 lines
2.0 KiB
LLVM
; RUN: llvm-dis < %s.bc| FileCheck %s
|
|
|
|
; conversionOperations.3.2.ll.bc was generated by passing this file to llvm-as-3.2.
|
|
; The test checks that LLVM does not misread conversion instructions from
|
|
; older bitcode files.
|
|
|
|
define void @trunc(i32 %src){
|
|
entry:
|
|
; CHECK: %res1 = trunc i32 %src to i8
|
|
%res1 = trunc i32 %src to i8
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @zext(i32 %src){
|
|
entry:
|
|
; CHECK: %res1 = zext i32 %src to i64
|
|
%res1 = zext i32 %src to i64
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @sext(i32 %src){
|
|
entry:
|
|
; CHECK: %res1 = sext i32 %src to i64
|
|
%res1 = sext i32 %src to i64
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @fptrunc(double %src){
|
|
entry:
|
|
; CHECK: %res1 = fptrunc double %src to float
|
|
%res1 = fptrunc double %src to float
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @fpext(float %src){
|
|
entry:
|
|
; CHECK: %res1 = fpext float %src to double
|
|
%res1 = fpext float %src to double
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @fptoui(float %src){
|
|
entry:
|
|
; CHECK: %res1 = fptoui float %src to i32
|
|
%res1 = fptoui float %src to i32
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @fptosi(float %src){
|
|
entry:
|
|
; CHECK: %res1 = fptosi float %src to i32
|
|
%res1 = fptosi float %src to i32
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @uitofp(i32 %src){
|
|
entry:
|
|
; CHECK: %res1 = uitofp i32 %src to float
|
|
%res1 = uitofp i32 %src to float
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @sitofp(i32 %src){
|
|
entry:
|
|
; CHECK: %res1 = sitofp i32 %src to float
|
|
%res1 = sitofp i32 %src to float
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @ptrtoint(i32* %src){
|
|
entry:
|
|
; CHECK: %res1 = ptrtoint i32* %src to i8
|
|
%res1 = ptrtoint i32* %src to i8
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @inttoptr(i32 %src){
|
|
entry:
|
|
; CHECK: %res1 = inttoptr i32 %src to i32*
|
|
%res1 = inttoptr i32 %src to i32*
|
|
|
|
ret void
|
|
}
|
|
|
|
define void @bitcast(i32 %src1, i32* %src2){
|
|
entry:
|
|
; CHECK: %res1 = bitcast i32 %src1 to i32
|
|
%res1 = bitcast i32 %src1 to i32
|
|
|
|
; CHECK: %res2 = bitcast i32* %src2 to i64*
|
|
%res2 = bitcast i32* %src2 to i64*
|
|
|
|
ret void
|
|
} |