Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(904)

Side by Side Diff: test/CodeGen/X86/codegen-prepare.ll

Issue 183273009: Prep for merging 3.4: Undo changes from 3.3 branch (Closed) Base URL: http://git.chromium.org/native_client/pnacl-llvm.git@master
Patch Set: Retry Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/CodeGen/R600/vtx-schedule.ll ('k') | test/CodeGen/X86/compact-unwind.ll » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 ; RUN: llc < %s -mtriple=x86_64-pc-linux | FileCheck %s
2
3 ; Check that the CodeGenPrepare Pass
4 ; does not wrongly rewrite the address computed by Instruction %4
5 ; as [12 + Base:%this].
6
7 ; This test makes sure that:
8 ; - both the store and the first load instructions
9 ; within basic block labeled 'if.then' are not removed.
10 ; - the store instruction stores a value at address [60 + %this]
11 ; - the first load instruction loads a value at address [12 + %this]
12
13 %class.A = type { %struct.B }
14 %struct.B = type { %class.C, %class.D, %class.C, %class.D }
15 %class.C = type { float, float, float }
16 %class.D = type { [3 x %class.C] }
17
18 define linkonce_odr void @foo(%class.A* nocapture %this, i32 %BoolValue) nounwin d uwtable {
19 entry:
20 %cmp = icmp eq i32 %BoolValue, 0
21 %address1 = getelementptr inbounds %class.A* %this, i64 0, i32 0, i32 3
22 %address2 = getelementptr inbounds %class.A* %this, i64 0, i32 0, i32 1
23 br i1 %cmp, label %if.else, label %if.then
24
25 if.then: ; preds = %entry
26 %0 = getelementptr inbounds %class.D* %address2, i64 0, i32 0, i64 0, i32 0
27 %1 = load float* %0, align 4
28 %2 = getelementptr inbounds float* %0, i64 3
29 %3 = load float* %2, align 4
30 %4 = getelementptr inbounds %class.D* %address1, i64 0, i32 0, i64 0, i32 0
31 store float %1, float* %4, align 4
32 br label %if.end
33
34 if.else: ; preds = %entry
35 br label %if.end
36
37 if.end: ; preds = %if.then, %if.else, %entry
38 ret void
39 }
40
41 ; CHECK: foo:
42 ; CHECK: movss 12([[THIS:%[a-zA-Z0-9]+]]), [[REGISTER:%[a-zA-Z0-9]+]]
43 ; CHECK-NEXT: movss [[REGISTER]], 60([[THIS]])
44
OLDNEW
« no previous file with comments | « test/CodeGen/R600/vtx-schedule.ll ('k') | test/CodeGen/X86/compact-unwind.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698