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

Side by Side Diff: test/CodeGen/JS/globals.ll

Issue 1692803002: Remove Emscripten support (Closed) Base URL: https://chromium.googlesource.com/a/native_client/pnacl-llvm.git@master
Patch Set: Created 4 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/CodeGen/JS/global-alias.ll ('k') | test/CodeGen/JS/insertelement-chains.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 | FileCheck %s
2
3 ; Test simple global variable codegen.
4
5 target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64 :64:64-p:32:32:32-v128:32:128-n32-S128"
6 target triple = "asmjs-unknown-emscripten"
7
8 ; CHECK: function _loads() {
9 ; CHECK: [[VAR_t:\$[a-z]+]] = HEAP32[2]|0;
10 ; CHECK: [[VAR_s:\$[a-z]+]] = +HEAPF64[2];
11 ; CHECK: [[VAR_u:\$[a-z]+]] = HEAP8[24]|0;
12 ; CHECK: [[VAR_a:\$[a-z]+]] = (~~(([[VAR_s:\$[a-z]+]]))>>>0);
13 ; CHECK: [[VAR_b:\$[a-z]+]] = [[VAR_u:\$[a-z]+]] << 24 >> 24;
14 ; CHECK: [[VAR_c:\$[a-z]+]] = (([[VAR_t:\$[a-z]+]]) + ([[VAR_a:\$[a-z]+]]))|0;
15 ; CHECK: [[VAR_d:\$[a-z]+]] = (([[VAR_c:\$[a-z]+]]) + ([[VAR_b:\$[a-z]+]]))|0;
16 ; CHECK: return ([[VAR_d:\$[a-z]+]]|0);
17 define i32 @loads() {
18 %t = load i32, i32* @A
19 %s = load double, double* @B
20 %u = load i8, i8* @C
21 %a = fptoui double %s to i32
22 %b = sext i8 %u to i32
23 %c = add i32 %t, %a
24 %d = add i32 %c, %b
25 ret i32 %d
26 }
27
28 ; CHECK: function _stores([[VAR_m:\$[a-z]+]],[[VAR_n:\$[a-z]+]],[[VAR_o:\$[a-z]+ ]]) {
29 ; CHECK: [[VAR_m:\$[a-z]+]] = [[VAR_m:\$[a-z]+]]|0;
30 ; CHECK: [[VAR_n:\$[a-z]+]] = [[VAR_n:\$[a-z]+]]|0;
31 ; CHECK: [[VAR_o:\$[a-z]+]] = +[[VAR_o:\$[a-z]+]];
32 ; CHECK: HEAP32[2] = [[VAR_n:\$[a-z]+]];
33 ; CHECK: HEAPF64[2] = [[VAR_o:\$[a-z]+]];
34 ; CHECK: HEAP8[24] = [[VAR_m:\$[a-z]+]];
35 define void @stores(i8 %m, i32 %n, double %o) {
36 store i32 %n, i32* @A
37 store double %o, double* @B
38 store i8 %m, i8* @C
39 ret void
40 }
41
42 ; CHECK: allocate([133,26,0,0,0,0,0,0,205,204,204,204,204,76,55,64,2,0,0,0,0,0,0 ,0], "i8", ALLOC_NONE, Runtime.GLOBAL_BASE);
43 @A = global i32 6789
44 @B = global double 23.3
45 @C = global i8 2
OLDNEW
« no previous file with comments | « test/CodeGen/JS/global-alias.ll ('k') | test/CodeGen/JS/insertelement-chains.ll » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698