Skip to content

Commit

Permalink
[WebAssembly][test] Clean up ir-locals.ll after opaque pointer conver…
Browse files Browse the repository at this point in the history
…sion

The `tyname_cell` definitions at the top are now all the same, so
replace them with a single `alloca_cell` type.
  • Loading branch information
asb committed Feb 26, 2023
1 parent 771261f commit 1ae8597
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions llvm/test/CodeGen/WebAssembly/ir-locals.ll
@@ -1,10 +1,7 @@
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
; RUN: llc < %s --mtriple=wasm32-unknown-unknown | FileCheck %s

%i32_cell = type ptr addrspace(1)
%i64_cell = type ptr addrspace(1)
%f32_cell = type ptr addrspace(1)
%f64_cell = type ptr addrspace(1)
%alloca_cell = type ptr addrspace(1)

; We have a set of tests in which we set a local and then reload the
; local. If the load immediately follows the set, the DAG combiner will
Expand All @@ -24,9 +21,9 @@ define i32 @ir_local_i32(i32 %arg) {
; CHECK-NEXT: local.get 1
; CHECK-NEXT: # fallthrough-return
%retval = alloca i32, addrspace(1)
store i32 %arg, %i32_cell %retval
store i32 %arg, %alloca_cell %retval
call void @inhibit_store_to_load_forwarding()
%reloaded = load i32, %i32_cell %retval
%reloaded = load i32, %alloca_cell %retval
ret i32 %reloaded
}

Expand All @@ -41,9 +38,9 @@ define i64 @ir_local_i64(i64 %arg) {
; CHECK-NEXT: local.get 1
; CHECK-NEXT: # fallthrough-return
%retval = alloca i64, addrspace(1)
store i64 %arg, %i64_cell %retval
store i64 %arg, %alloca_cell %retval
call void @inhibit_store_to_load_forwarding()
%reloaded = load i64, %i64_cell %retval
%reloaded = load i64, %alloca_cell %retval
; See note in ir_local_i32.
ret i64 %reloaded
}
Expand All @@ -59,9 +56,9 @@ define float @ir_local_f32(float %arg) {
; CHECK-NEXT: local.get 1
; CHECK-NEXT: # fallthrough-return
%retval = alloca float, addrspace(1)
store float %arg, %f32_cell %retval
store float %arg, %alloca_cell %retval
call void @inhibit_store_to_load_forwarding()
%reloaded = load float, %f32_cell %retval
%reloaded = load float, %alloca_cell %retval
ret float %reloaded
}

Expand All @@ -76,9 +73,9 @@ define double @ir_local_f64(double %arg) {
; CHECK-NEXT: local.get 1
; CHECK-NEXT: # fallthrough-return
%retval = alloca double, addrspace(1)
store double %arg, %f64_cell %retval
store double %arg, %alloca_cell %retval
call void @inhibit_store_to_load_forwarding()
%reloaded = load double, %f64_cell %retval
%reloaded = load double, %alloca_cell %retval
ret double %reloaded
}

Expand Down

0 comments on commit 1ae8597

Please sign in to comment.