Translator tests: a volatile pointer load through a loaded pointer is one access
Under the resident-table domains a pointer loaded through a wide pointer is two whole words reached through PsbMem, which now reads them as one PhysicalStorageBuffer access (Aligned 4) instead of two word loads. The test counted two volatile loads; it now counts one and still checks the value the chased pointer reaches. Verified: the suite job m3-max-64513 at 428ff0fedd failed this assertion (left 1, right 2) on moltenvk-m3 robust=true; rerun below.
This commit is contained in:
1 parent
a10c7bd0be
commit
db5fefc2ce
1 file changed
+3
-3
@@ -944,8 +944,8 @@ fn volatile_accesses_through_a_loaded_pointer_are_exact() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// A volatile load of a pointer from the allocation a loaded pointer reaches (a pointer loaded
|
/// A volatile load of a pointer from the allocation a loaded pointer reaches (a pointer loaded
|
||||||
/// through a wide pointer): its guest address's two words are volatile loads by device address, and
|
/// through a wide pointer): its guest address, two whole words, is one volatile load by device
|
||||||
/// the pointer it yields resolves to its allocation.
|
/// address, and the pointer it yields resolves to its allocation.
|
||||||
#[test]
|
#[test]
|
||||||
fn a_volatile_pointer_load_through_a_loaded_pointer_is_exact() {
|
fn a_volatile_pointer_load_through_a_loaded_pointer_is_exact() {
|
||||||
let name = "dyn_volatile_chase";
|
let name = "dyn_volatile_chase";
|
||||||
@@ -971,7 +971,7 @@ fn a_volatile_pointer_load_through_a_loaded_pointer_is_exact() {
|
|||||||
let a = compile(&bc, name, &p).unwrap_or_else(|e| panic!("{what}: {e}"));
|
let a = compile(&bc, name, &p).unwrap_or_else(|e| panic!("{what}: {e}"));
|
||||||
link_and_validate(&a, &p).unwrap_or_else(|e| panic!("{what}: L3: {e}"));
|
link_and_validate(&a, &p).unwrap_or_else(|e| panic!("{what}: L3: {e}"));
|
||||||
let (plan, m) = typed_module(&bc, name, &p).expect("module");
|
let (plan, m) = typed_module(&bc, name, &p).expect("module");
|
||||||
assert_eq!(volatiles(&m), (vec![(PSB, 2)], vec![]), "{what}");
|
assert_eq!(volatiles(&m), (vec![(PSB, 1)], vec![]), "{what}");
|
||||||
let res = Resources {
|
let res = Resources {
|
||||||
buffers: vec![
|
buffers: vec![
|
||||||
slot_buffer(0, ptrs.clone()),
|
slot_buffer(0, ptrs.clone()),
|
||||||
|
|||||||
Reference in new issue
Block a user