@@ -431,7 +431,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
431
431
. map ( |idx| self . constant_u32 ( self . span ( ) , idx) . def ( self ) )
432
432
. collect :: < Vec < _ > > ( ) ;
433
433
self . emit ( )
434
- . access_chain ( leaf_ptr_ty, None , ptr. def ( self ) , indices)
434
+ . in_bounds_access_chain ( leaf_ptr_ty, None , ptr. def ( self ) , indices)
435
435
. unwrap ( )
436
436
. with_type ( leaf_ptr_ty)
437
437
} ;
@@ -1417,7 +1417,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
1417
1417
. collect :: < Vec < _ > > ( ) ;
1418
1418
return self
1419
1419
. emit ( )
1420
- . access_chain ( result_type, None , original_ptr, indices)
1420
+ . in_bounds_access_chain ( result_type, None , original_ptr, indices)
1421
1421
. unwrap ( )
1422
1422
. with_type ( result_type) ;
1423
1423
}
@@ -1435,7 +1435,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
1435
1435
}
1436
1436
let index_const = self . constant_u32 ( self . span ( ) , idx as u32 ) . def ( self ) ;
1437
1437
self . emit ( )
1438
- . access_chain (
1438
+ . in_bounds_access_chain (
1439
1439
result_type,
1440
1440
None ,
1441
1441
ptr. def ( self ) ,
@@ -1744,7 +1744,7 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
1744
1744
. map ( |idx| self . constant_u32 ( self . span ( ) , idx) . def ( self ) )
1745
1745
. collect :: < Vec < _ > > ( ) ;
1746
1746
self . emit ( )
1747
- . access_chain ( dest_ty, None , ptr. def ( self ) , indices)
1747
+ . in_bounds_access_chain ( dest_ty, None , ptr. def ( self ) , indices)
1748
1748
. unwrap ( )
1749
1749
. with_type ( dest_ty)
1750
1750
} else {
@@ -2683,7 +2683,6 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
2683
2683
enum Inst < ' tcx , ID > {
2684
2684
Bitcast ( ID , ID ) ,
2685
2685
CompositeExtract ( ID , ID , u32 ) ,
2686
- AccessChain ( ID , ID , SpirvConst < ' tcx , ' tcx > ) ,
2687
2686
InBoundsAccessChain ( ID , ID , SpirvConst < ' tcx , ' tcx > ) ,
2688
2687
Store ( ID , ID ) ,
2689
2688
Load ( ID , ID ) ,
@@ -2721,9 +2720,6 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
2721
2720
Some (
2722
2721
match ( inst. class . opcode , inst. result_id , & id_operands[ ..] ) {
2723
2722
( Op :: Bitcast , Some ( r) , & [ x] ) => Inst :: Bitcast ( r, x) ,
2724
- ( Op :: AccessChain , Some ( r) , & [ p, i] ) => {
2725
- Inst :: AccessChain ( r, p, self . builder . lookup_const_by_id ( i) ?)
2726
- }
2727
2723
( Op :: InBoundsAccessChain , Some ( r) , & [ p, i] ) => {
2728
2724
Inst :: InBoundsAccessChain (
2729
2725
r,
@@ -2887,9 +2883,9 @@ impl<'a, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'tcx> {
2887
2883
array_base_ptr,
2888
2884
SpirvConst :: U32 ( array_idx) ,
2889
2885
) ,
2890
- Inst :: AccessChain ( a_ptr, a_base_ptr, SpirvConst :: U32 ( 0 ) ) ,
2886
+ Inst :: InBoundsAccessChain ( a_ptr, a_base_ptr, SpirvConst :: U32 ( 0 ) ) ,
2891
2887
Inst :: Store ( a_st_dst, a_st_val) ,
2892
- Inst :: AccessChain ( b_ptr, b_base_ptr, SpirvConst :: U32 ( 1 ) ) ,
2888
+ Inst :: InBoundsAccessChain ( b_ptr, b_base_ptr, SpirvConst :: U32 ( 1 ) ) ,
2893
2889
Inst :: Store ( b_st_dst, b_st_val) ,
2894
2890
] if array_base_ptr == rt_args_array_ptr_id
2895
2891
&& array_idx as usize == rt_arg_idx
0 commit comments