llvm-6502/test/Transforms/ConstProp/InsertElement.ll
Rafael Espindola 1b4da6c8ce Avoid conversion to float when creating ConstantDataArray/ConstantDataVector.
Patch by Raoux, Thomas F!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229864 91177308-0d34-0410-b5e6-96231b3b80d8
2015-02-19 16:08:20 +00:00

13 lines
298 B
LLVM

; RUN: opt < %s -constprop -S | FileCheck %s
define i32 @test1() {
%A = bitcast i32 2139171423 to float
%B = insertelement <1 x float> undef, float %A, i32 0
%C = extractelement <1 x float> %B, i32 0
%D = bitcast float %C to i32
ret i32 %D
; CHECK: @test1
; CHECK: ret i32 2139171423
}