mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-30 21:29:28 +00:00
another mechanical change accomplished though the power of terrible Perl scripts. I have manually switched some "s to 's to make escaping simpler. While I started this to fix tests that aren't run in all configurations, the massive number of tests is due to a really frustrating fragility of our testing infrastructure: things like 'grep -v', 'not grep', and 'expected failures' can mask broken tests all too easily. Essentially, I'm deeply disturbed that I can change the testsuite so radically without causing any change in results for most platforms. =/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@159547 91177308-0d34-0410-b5e6-96231b3b80d8
37 lines
1.4 KiB
LLVM
37 lines
1.4 KiB
LLVM
; RUN: opt < %s -basicaa -memcpyopt -dse -S | grep "call.*initialize" | not grep memtmp
|
|
; PR2077
|
|
|
|
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32"
|
|
target triple = "i386-pc-linux-gnu"
|
|
|
|
%0 = type { x86_fp80, x86_fp80 }
|
|
|
|
define internal fastcc void @initialize(%0* noalias sret %agg.result) nounwind {
|
|
entry:
|
|
%agg.result.03 = getelementptr %0* %agg.result, i32 0, i32 0
|
|
store x86_fp80 0xK00000000000000000000, x86_fp80* %agg.result.03
|
|
%agg.result.15 = getelementptr %0* %agg.result, i32 0, i32 1
|
|
store x86_fp80 0xK00000000000000000000, x86_fp80* %agg.result.15
|
|
ret void
|
|
}
|
|
|
|
declare fastcc x86_fp80 @passed_uninitialized(%0*) nounwind
|
|
|
|
define fastcc void @badly_optimized() nounwind {
|
|
entry:
|
|
%z = alloca %0
|
|
%tmp = alloca %0
|
|
%memtmp = alloca %0, align 8
|
|
call fastcc void @initialize(%0* noalias sret %memtmp)
|
|
%tmp1 = bitcast %0* %tmp to i8*
|
|
%memtmp2 = bitcast %0* %memtmp to i8*
|
|
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %tmp1, i8* %memtmp2, i32 24, i32 8, i1 false)
|
|
%z3 = bitcast %0* %z to i8*
|
|
%tmp4 = bitcast %0* %tmp to i8*
|
|
call void @llvm.memcpy.p0i8.p0i8.i32(i8* %z3, i8* %tmp4, i32 24, i32 8, i1 false)
|
|
%tmp5 = call fastcc x86_fp80 @passed_uninitialized(%0* %z)
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i32, i1) nounwind
|