mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-22 12:08:26 +00:00
65696f40e4
The code have been developed by Daniel Berlin over the years, and the new implementation goal is that of addressing shortcomings of the current GVN infrastructure, i.e. long compile time for large testcases, lack of phi predication, no load/store value numbering etc... The current code just implements the "core" GVN algorithm, although other pieces (load coercion, phi handling, predicate system) are already implemented in a branch out of tree. Once the core is stable, we'll start adding pieces on top of the base framework. The test currently living in test/Transform/NewGVN are a copy of the ones in GVN, with proper `XFAIL` (missing features in NewGVN). A flag will be added in a future commit to enable NewGVN, so that interested parties can exercise this code easily. Differential Revision: https://reviews.llvm.org/D26224 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@290346 91177308-0d34-0410-b5e6-96231b3b80d8
26 lines
817 B
LLVM
26 lines
817 B
LLVM
; XFAIL: *
|
|
; RUN: opt -disable-basicaa -newgvn -S < %s | FileCheck %s
|
|
target datalayout = "e-p:32:32:32"
|
|
target triple = "i386-pc-linux-gnu"
|
|
define <2 x i32> @test1() {
|
|
%v1 = alloca <2 x i32>
|
|
call void @anything(<2 x i32>* %v1)
|
|
%v2 = load <2 x i32>, <2 x i32>* %v1
|
|
%v3 = inttoptr <2 x i32> %v2 to <2 x i8*>
|
|
%v4 = bitcast <2 x i32>* %v1 to <2 x i8*>*
|
|
store <2 x i8*> %v3, <2 x i8*>* %v4
|
|
%v5 = load <2 x i32>, <2 x i32>* %v1
|
|
ret <2 x i32> %v5
|
|
; CHECK-LABEL: @test1(
|
|
; CHECK: %v1 = alloca <2 x i32>
|
|
; CHECK: call void @anything(<2 x i32>* %v1)
|
|
; CHECK: %v2 = load <2 x i32>, <2 x i32>* %v1
|
|
; CHECK: %v3 = inttoptr <2 x i32> %v2 to <2 x i8*>
|
|
; CHECK: %v4 = bitcast <2 x i32>* %v1 to <2 x i8*>*
|
|
; CHECK: store <2 x i8*> %v3, <2 x i8*>* %v4
|
|
; CHECK: ret <2 x i32> %v2
|
|
}
|
|
|
|
declare void @anything(<2 x i32>*)
|
|
|