about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-12-15 13:50:38 +0000
committerbors <bors@rust-lang.org>2024-12-15 13:50:38 +0000
commita611773d80486c8511ed554400eab0681a8bb068 (patch)
tree1570b73c0abfda628ce230b1cca6c746430cbe2f /compiler/rustc_resolve/src
parent0894fb0fbf457916bb013168476d802852d9dd6a (diff)
parent3fc506b4d43938453fd399f403507e4b2031a167 (diff)
downloadrust-a611773d80486c8511ed554400eab0681a8bb068.tar.gz
rust-a611773d80486c8511ed554400eab0681a8bb068.zip
Auto merge of #134117 - DianQK:gep-i8, r=oli-obk
Modifies the index instruction from `gep [0 x %Type]` to `gep %Type`

Fixes #133979.

This PR modifies the index instruction from `gep [0 x %Type]` to `gep %Type`, which is the same with pointer offset calculation.

This will help LLVM calculate various formats of GEP instructions. According to [[RFC] Replacing getelementptr with ptradd](https://discourse.llvm.org/t/rfc-replacing-getelementptr-with-ptradd/68699), we ultimately aim to canonicalize everything to `gep i8`. Based on the results from https://github.com/rust-lang/rust/pull/134117#issuecomment-2531717076, I think we still need to investigate some missing optimizations, so this PR is just a small step forward.

r? compiler
Diffstat (limited to 'compiler/rustc_resolve/src')
0 files changed, 0 insertions, 0 deletions