diff options
author | Nikita Popov <npopov@redhat.com> | 2024-07-15 09:26:03 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-15 09:26:03 +0200 |
commit | 9d34b673c0abea4ee0a3dd4c399314411b02f1cc (patch) | |
tree | be1bdf588c6c3f33fd1adb5908b4dd91bb06155e /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 297fab1b3075a9dcd65213176add34ad7d744bde (diff) | |
download | llvm-9d34b673c0abea4ee0a3dd4c399314411b02f1cc.zip llvm-9d34b673c0abea4ee0a3dd4c399314411b02f1cc.tar.gz llvm-9d34b673c0abea4ee0a3dd4c399314411b02f1cc.tar.bz2 |
[InstSimplify] Fold ptrtoint(ptradd(P,X-ptrtoint(P))) to X (#98649)
This is a special case of the general ptrtoint(gep) to add(ptrtoint)
transform that is particularly profitable, as everything folds away.
Proof: https://alive2.llvm.org/ce/z/fwv8_L
Fixes https://github.com/llvm/llvm-project/issues/86417.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions