|
| 1 | +; ModuleID = 'zeromap.go' |
| 2 | +source_filename = "zeromap.go" |
| 3 | +target datalayout = "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20" |
| 4 | +target triple = "wasm32-unknown-wasi" |
| 5 | + |
| 6 | +%main.hasPadding = type { i1, i32, i1 } |
| 7 | + |
| 8 | +declare noalias nonnull ptr @runtime.alloc(i32, ptr, ptr) #0 |
| 9 | + |
| 10 | +declare void @runtime.trackPointer(ptr nocapture readonly, ptr, ptr) #0 |
| 11 | + |
| 12 | +; Function Attrs: nounwind |
| 13 | +define hidden void @main.init(ptr %context) unnamed_addr #1 { |
| 14 | +entry: |
| 15 | + ret void |
| 16 | +} |
| 17 | + |
| 18 | +; Function Attrs: noinline nounwind |
| 19 | +define hidden i32 @main.testZeroGet(ptr dereferenceable_or_null(40) %m, i1 %s.b1, i32 %s.i, i1 %s.b2, ptr %context) unnamed_addr #2 { |
| 20 | +entry: |
| 21 | + %hashmap.key = alloca %main.hasPadding, align 8 |
| 22 | + %hashmap.value = alloca i32, align 4 |
| 23 | + %s = alloca %main.hasPadding, align 8 |
| 24 | + %0 = insertvalue %main.hasPadding zeroinitializer, i1 %s.b1, 0 |
| 25 | + %1 = insertvalue %main.hasPadding %0, i32 %s.i, 1 |
| 26 | + %2 = insertvalue %main.hasPadding %1, i1 %s.b2, 2 |
| 27 | + %stackalloc = alloca i8, align 1 |
| 28 | + store %main.hasPadding zeroinitializer, ptr %s, align 8 |
| 29 | + call void @runtime.trackPointer(ptr nonnull %s, ptr nonnull %stackalloc, ptr undef) #4 |
| 30 | + store %main.hasPadding %2, ptr %s, align 8 |
| 31 | + call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %hashmap.value) |
| 32 | + call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %hashmap.key) |
| 33 | + store %main.hasPadding %2, ptr %hashmap.key, align 8 |
| 34 | + %3 = getelementptr inbounds i8, ptr %hashmap.key, i32 1 |
| 35 | + call void @runtime.memzero(ptr nonnull %3, i32 3, ptr undef) #4 |
| 36 | + %4 = getelementptr inbounds i8, ptr %hashmap.key, i32 9 |
| 37 | + call void @runtime.memzero(ptr nonnull %4, i32 3, ptr undef) #4 |
| 38 | + %5 = call i1 @runtime.hashmapBinaryGet(ptr %m, ptr nonnull %hashmap.key, ptr nonnull %hashmap.value, i32 4, ptr undef) #4 |
| 39 | + call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %hashmap.key) |
| 40 | + %6 = load i32, ptr %hashmap.value, align 4 |
| 41 | + call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hashmap.value) |
| 42 | + ret i32 %6 |
| 43 | +} |
| 44 | + |
| 45 | +; Function Attrs: argmemonly nocallback nofree nosync nounwind willreturn |
| 46 | +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #3 |
| 47 | + |
| 48 | +declare void @runtime.memzero(ptr, i32, ptr) #0 |
| 49 | + |
| 50 | +declare i1 @runtime.hashmapBinaryGet(ptr dereferenceable_or_null(40), ptr, ptr, i32, ptr) #0 |
| 51 | + |
| 52 | +; Function Attrs: argmemonly nocallback nofree nosync nounwind willreturn |
| 53 | +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #3 |
| 54 | + |
| 55 | +; Function Attrs: noinline nounwind |
| 56 | +define hidden void @main.testZeroSet(ptr dereferenceable_or_null(40) %m, i1 %s.b1, i32 %s.i, i1 %s.b2, ptr %context) unnamed_addr #2 { |
| 57 | +entry: |
| 58 | + %hashmap.key = alloca %main.hasPadding, align 8 |
| 59 | + %hashmap.value = alloca i32, align 4 |
| 60 | + %s = alloca %main.hasPadding, align 8 |
| 61 | + %0 = insertvalue %main.hasPadding zeroinitializer, i1 %s.b1, 0 |
| 62 | + %1 = insertvalue %main.hasPadding %0, i32 %s.i, 1 |
| 63 | + %2 = insertvalue %main.hasPadding %1, i1 %s.b2, 2 |
| 64 | + %stackalloc = alloca i8, align 1 |
| 65 | + store %main.hasPadding zeroinitializer, ptr %s, align 8 |
| 66 | + call void @runtime.trackPointer(ptr nonnull %s, ptr nonnull %stackalloc, ptr undef) #4 |
| 67 | + store %main.hasPadding %2, ptr %s, align 8 |
| 68 | + call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %hashmap.value) |
| 69 | + store i32 5, ptr %hashmap.value, align 4 |
| 70 | + call void @llvm.lifetime.start.p0(i64 12, ptr nonnull %hashmap.key) |
| 71 | + store %main.hasPadding %2, ptr %hashmap.key, align 8 |
| 72 | + %3 = getelementptr inbounds i8, ptr %hashmap.key, i32 1 |
| 73 | + call void @runtime.memzero(ptr nonnull %3, i32 3, ptr undef) #4 |
| 74 | + %4 = getelementptr inbounds i8, ptr %hashmap.key, i32 9 |
| 75 | + call void @runtime.memzero(ptr nonnull %4, i32 3, ptr undef) #4 |
| 76 | + call void @runtime.hashmapBinarySet(ptr %m, ptr nonnull %hashmap.key, ptr nonnull %hashmap.value, ptr undef) #4 |
| 77 | + call void @llvm.lifetime.end.p0(i64 12, ptr nonnull %hashmap.key) |
| 78 | + call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hashmap.value) |
| 79 | + ret void |
| 80 | +} |
| 81 | + |
| 82 | +declare void @runtime.hashmapBinarySet(ptr dereferenceable_or_null(40), ptr, ptr, ptr) #0 |
| 83 | + |
| 84 | +; Function Attrs: noinline nounwind |
| 85 | +define hidden i32 @main.testZeroArrayGet(ptr dereferenceable_or_null(40) %m, [2 x %main.hasPadding] %s, ptr %context) unnamed_addr #2 { |
| 86 | +entry: |
| 87 | + %hashmap.key = alloca [2 x %main.hasPadding], align 8 |
| 88 | + %hashmap.value = alloca i32, align 4 |
| 89 | + %s1 = alloca [2 x %main.hasPadding], align 8 |
| 90 | + %stackalloc = alloca i8, align 1 |
| 91 | + store %main.hasPadding zeroinitializer, ptr %s1, align 8 |
| 92 | + %s1.repack2 = getelementptr inbounds [2 x %main.hasPadding], ptr %s1, i32 0, i32 1 |
| 93 | + store %main.hasPadding zeroinitializer, ptr %s1.repack2, align 4 |
| 94 | + call void @runtime.trackPointer(ptr nonnull %s1, ptr nonnull %stackalloc, ptr undef) #4 |
| 95 | + %s.elt = extractvalue [2 x %main.hasPadding] %s, 0 |
| 96 | + store %main.hasPadding %s.elt, ptr %s1, align 8 |
| 97 | + %s1.repack3 = getelementptr inbounds [2 x %main.hasPadding], ptr %s1, i32 0, i32 1 |
| 98 | + %s.elt4 = extractvalue [2 x %main.hasPadding] %s, 1 |
| 99 | + store %main.hasPadding %s.elt4, ptr %s1.repack3, align 4 |
| 100 | + call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %hashmap.value) |
| 101 | + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %hashmap.key) |
| 102 | + %s.elt7 = extractvalue [2 x %main.hasPadding] %s, 0 |
| 103 | + store %main.hasPadding %s.elt7, ptr %hashmap.key, align 8 |
| 104 | + %hashmap.key.repack8 = getelementptr inbounds [2 x %main.hasPadding], ptr %hashmap.key, i32 0, i32 1 |
| 105 | + %s.elt9 = extractvalue [2 x %main.hasPadding] %s, 1 |
| 106 | + store %main.hasPadding %s.elt9, ptr %hashmap.key.repack8, align 4 |
| 107 | + %0 = getelementptr inbounds i8, ptr %hashmap.key, i32 1 |
| 108 | + call void @runtime.memzero(ptr nonnull %0, i32 3, ptr undef) #4 |
| 109 | + %1 = getelementptr inbounds i8, ptr %hashmap.key, i32 9 |
| 110 | + call void @runtime.memzero(ptr nonnull %1, i32 3, ptr undef) #4 |
| 111 | + %2 = getelementptr inbounds i8, ptr %hashmap.key, i32 13 |
| 112 | + call void @runtime.memzero(ptr nonnull %2, i32 3, ptr undef) #4 |
| 113 | + %3 = getelementptr inbounds i8, ptr %hashmap.key, i32 21 |
| 114 | + call void @runtime.memzero(ptr nonnull %3, i32 3, ptr undef) #4 |
| 115 | + %4 = call i1 @runtime.hashmapBinaryGet(ptr %m, ptr nonnull %hashmap.key, ptr nonnull %hashmap.value, i32 4, ptr undef) #4 |
| 116 | + call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %hashmap.key) |
| 117 | + %5 = load i32, ptr %hashmap.value, align 4 |
| 118 | + call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hashmap.value) |
| 119 | + ret i32 %5 |
| 120 | +} |
| 121 | + |
| 122 | +; Function Attrs: noinline nounwind |
| 123 | +define hidden void @main.testZeroArraySet(ptr dereferenceable_or_null(40) %m, [2 x %main.hasPadding] %s, ptr %context) unnamed_addr #2 { |
| 124 | +entry: |
| 125 | + %hashmap.key = alloca [2 x %main.hasPadding], align 8 |
| 126 | + %hashmap.value = alloca i32, align 4 |
| 127 | + %s1 = alloca [2 x %main.hasPadding], align 8 |
| 128 | + %stackalloc = alloca i8, align 1 |
| 129 | + store %main.hasPadding zeroinitializer, ptr %s1, align 8 |
| 130 | + %s1.repack2 = getelementptr inbounds [2 x %main.hasPadding], ptr %s1, i32 0, i32 1 |
| 131 | + store %main.hasPadding zeroinitializer, ptr %s1.repack2, align 4 |
| 132 | + call void @runtime.trackPointer(ptr nonnull %s1, ptr nonnull %stackalloc, ptr undef) #4 |
| 133 | + %s.elt = extractvalue [2 x %main.hasPadding] %s, 0 |
| 134 | + store %main.hasPadding %s.elt, ptr %s1, align 8 |
| 135 | + %s1.repack3 = getelementptr inbounds [2 x %main.hasPadding], ptr %s1, i32 0, i32 1 |
| 136 | + %s.elt4 = extractvalue [2 x %main.hasPadding] %s, 1 |
| 137 | + store %main.hasPadding %s.elt4, ptr %s1.repack3, align 4 |
| 138 | + call void @llvm.lifetime.start.p0(i64 4, ptr nonnull %hashmap.value) |
| 139 | + store i32 5, ptr %hashmap.value, align 4 |
| 140 | + call void @llvm.lifetime.start.p0(i64 24, ptr nonnull %hashmap.key) |
| 141 | + %s.elt7 = extractvalue [2 x %main.hasPadding] %s, 0 |
| 142 | + store %main.hasPadding %s.elt7, ptr %hashmap.key, align 8 |
| 143 | + %hashmap.key.repack8 = getelementptr inbounds [2 x %main.hasPadding], ptr %hashmap.key, i32 0, i32 1 |
| 144 | + %s.elt9 = extractvalue [2 x %main.hasPadding] %s, 1 |
| 145 | + store %main.hasPadding %s.elt9, ptr %hashmap.key.repack8, align 4 |
| 146 | + %0 = getelementptr inbounds i8, ptr %hashmap.key, i32 1 |
| 147 | + call void @runtime.memzero(ptr nonnull %0, i32 3, ptr undef) #4 |
| 148 | + %1 = getelementptr inbounds i8, ptr %hashmap.key, i32 9 |
| 149 | + call void @runtime.memzero(ptr nonnull %1, i32 3, ptr undef) #4 |
| 150 | + %2 = getelementptr inbounds i8, ptr %hashmap.key, i32 13 |
| 151 | + call void @runtime.memzero(ptr nonnull %2, i32 3, ptr undef) #4 |
| 152 | + %3 = getelementptr inbounds i8, ptr %hashmap.key, i32 21 |
| 153 | + call void @runtime.memzero(ptr nonnull %3, i32 3, ptr undef) #4 |
| 154 | + call void @runtime.hashmapBinarySet(ptr %m, ptr nonnull %hashmap.key, ptr nonnull %hashmap.value, ptr undef) #4 |
| 155 | + call void @llvm.lifetime.end.p0(i64 24, ptr nonnull %hashmap.key) |
| 156 | + call void @llvm.lifetime.end.p0(i64 4, ptr nonnull %hashmap.value) |
| 157 | + ret void |
| 158 | +} |
| 159 | + |
| 160 | +; Function Attrs: nounwind |
| 161 | +define hidden void @main.main(ptr %context) unnamed_addr #1 { |
| 162 | +entry: |
| 163 | + ret void |
| 164 | +} |
| 165 | + |
| 166 | +attributes #0 = { "target-features"="+bulk-memory,+nontrapping-fptoint,+sign-ext" } |
| 167 | +attributes #1 = { nounwind "target-features"="+bulk-memory,+nontrapping-fptoint,+sign-ext" } |
| 168 | +attributes #2 = { noinline nounwind "target-features"="+bulk-memory,+nontrapping-fptoint,+sign-ext" } |
| 169 | +attributes #3 = { argmemonly nocallback nofree nosync nounwind willreturn } |
| 170 | +attributes #4 = { nounwind } |
0 commit comments