2015-11-24 06:17:44 +08:00
|
|
|
; RUN: llc < %s -mtriple=x86_64-pc-win32-coreclr | FileCheck %s -check-prefix=WIN_X64
|
|
|
|
; RUN: llc < %s -mtriple=x86_64-pc-linux | FileCheck %s -check-prefix=LINUX
|
|
|
|
|
|
|
|
%Object = type <{ [0 x i64*]* }>
|
|
|
|
|
|
|
|
define void @C1(%Object addrspace(1)* %param0) gc "coreclr" {
|
|
|
|
entry:
|
|
|
|
|
2017-12-05 01:18:51 +08:00
|
|
|
; WIN_X64: # %bb.0:
|
2015-11-24 06:17:44 +08:00
|
|
|
; WIN_X64: pushq %rax
|
2017-12-05 01:18:51 +08:00
|
|
|
; LINUX: # %bb.0: # %entry
|
2015-11-24 06:17:44 +08:00
|
|
|
; LINUX: movq $0, -8(%rsp)
|
|
|
|
|
|
|
|
%this = alloca %Object addrspace(1)*
|
Elide stores which are overwritten without being observed.
Summary:
In SelectionDAG, when a store is immediately chained to another store
to the same address, elide the first store as it has no observable
effects. This is causes small improvements dealing with intrinsics
lowered to stores.
Test notes:
* Many testcases overwrite store addresses multiple times and needed
minor changes, mainly making stores volatile to prevent the
optimization from optimizing the test away.
* Many X86 test cases optimized out instructions associated with
associated with va_start.
* Note that test_splat in CodeGen/AArch64/misched-stp.ll no longer has
dependencies to check and can probably be removed and potentially
replaced with another test.
Reviewers: rnk, john.brawn
Subscribers: aemerson, rengolin, qcolombet, jyknight, nemanjai, nhaehnle, javed.absar, llvm-commits
Differential Revision: https://reviews.llvm.org/D33206
llvm-svn: 303198
2017-05-17 03:43:56 +08:00
|
|
|
store volatile %Object addrspace(1)* null, %Object addrspace(1)** %this
|
|
|
|
store volatile %Object addrspace(1)* %param0, %Object addrspace(1)** %this
|
2015-11-24 06:17:44 +08:00
|
|
|
br label %0
|
|
|
|
|
|
|
|
; <label>:0 ; preds = %entry
|
|
|
|
%1 = load %Object addrspace(1)*, %Object addrspace(1)** %this, align 8
|
|
|
|
|
|
|
|
; WIN_X64: xorl %r8d, %r8d
|
|
|
|
; WIN_X64: popq %rax
|
2016-09-09 07:35:10 +08:00
|
|
|
; WIN_X64: jmp C2 # TAILCALL
|
2015-11-24 06:17:44 +08:00
|
|
|
; LINUX: xorl %edx, %edx
|
|
|
|
; LINUX: jmp C2 # TAILCALL
|
|
|
|
|
|
|
|
tail call void @C2(%Object addrspace(1)* %1, i32 0, %Object addrspace(1)* null)
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @C2(%Object addrspace(1)*, i32, %Object addrspace(1)*)
|
|
|
|
|
|
|
|
; Function Attrs: nounwind
|
|
|
|
declare void @llvm.localescape(...) #0
|
|
|
|
|
|
|
|
attributes #0 = { nounwind }
|
|
|
|
|