[all-commits] [llvm/llvm-project] 61907e: [Clang][CodeGen] Do not use the GEP result to infe...
Yingwei Zheng via All-commits
all-commits at lists.llvm.org
Thu Apr 3 03:04:04 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 61907ebd764afe75aa7134627f41827e6893d6d0
https://github.com/llvm/llvm-project/commit/61907ebd764afe75aa7134627f41827e6893d6d0
Author: Yingwei Zheng <dtcxzyw2333 at gmail.com>
Date: 2025-04-03 (Thu, 03 Apr 2025)
Changed paths:
M clang/lib/CodeGen/CGBuilder.h
Log Message:
-----------
[Clang][CodeGen] Do not use the GEP result to infer offset and result type (#134221)
If `CreateConstInBoundsGEP2_32` returns a constant null/gep, the cast to
GetElementPtrInst will fail.
This patch uses two static helpers
`GEPOperator::accumulateConstantOffset/GetElementPtrInst::getIndexedType`
to infer offset and result type instead of depending on the GEP result.
This patch is extracted from
https://github.com/llvm/llvm-project/pull/130734.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list