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

Side by Side Diff: test/NaCl/Bitcode/inttoptr-of-ptrtoint-elide.ll

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 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/NaCl/Bitcode/inttoptr-elide.ll ('k') | test/NaCl/Bitcode/lit.local.cfg » ('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 ; Test that the writer elides an inttoptr of a ptrtoint.
2
3 ; RUN: llvm-as < %s | pnacl-freeze \
4 ; RUN: | pnacl-bcanalyzer -dump-records \
5 ; RUN: | FileCheck %s -check-prefix=PF2
6
7 ; RUN: llvm-as < %s | pnacl-freeze | pnacl-thaw \
8 ; RUN: | llvm-dis - | FileCheck %s -check-prefix=TD2
9
10
11 @bytes = internal global [4 x i8] c"abcd"
12
13 define void @inttoptr_of_ptrtoint() {
14 ; These two instructions are usually replaced with an equivalent
15 ; bitcast, but either sequence is allowed by the PNaCl ABI verifier.
16 %1 = ptrtoint [4 x i8]* @bytes to i32
17 %2 = inttoptr i32 %1 to i8*
18 load i8* %2
19 ret void
20 }
21
22 ; TD2: define void @inttoptr_of_ptrtoint() {
23 ; TD2-NEXT: %1 = bitcast [4 x i8]* @bytes to i8*
24 ; TD2-NEXT: %2 = load i8* %1
25 ; TD2-NEXT: ret void
26 ; TD2-NEXT: }
27
28 ; PF2: <FUNCTION_BLOCK>
29 ; PF2-NEXT: <DECLAREBLOCKS op0=1/>
30 ; PF2-NEXT: <INST_LOAD {{.*}}/>
31 ; PF2-NEXT: <INST_RET/>
32 ; PF2: </FUNCTION_BLOCK>
OLDNEW
« no previous file with comments | « test/NaCl/Bitcode/inttoptr-elide.ll ('k') | test/NaCl/Bitcode/lit.local.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698