[PATCH] D52294: [InstCombine] Fix incongruous GEP type addrspace
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 21 01:01:17 PDT 2018
lebedev.ri added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstructionCombining.cpp:2033-2035
+ Value *NGEP =
+ GEP.isInBounds()
+ ? Builder.CreateInBoundsGEP(nullptr, SrcOp, makeArrayRef(Ops).slice(1))
----------------
I do not understand, why do we need to create a new GEP here, as compared to the old code?
Why can't we just only create `AddrSpaceCastInst` if needed?
Repository:
rL LLVM
https://reviews.llvm.org/D52294
More information about the llvm-commits
mailing list