llvm-project/llvm/lib/Transforms
Vedant Kumar 9ece818291 [InstCombine] Preserve debug value when simplifying cast-of-select
InstCombine has a cast transform that matches a cast-of-select:

  Orig = cast (Src = select Cond TV FV)

And tries to replace it with a select which has the cast folded in:

  NewSel = select Cond (cast TV) (cast FV)

The combiner does RAUW(Orig, NewSel), so any debug values for Orig would
survive the transform. But debug values for Src would be lost.

This patch teaches InstCombine to replace all debug uses of Src with
NewSel (taking care of doing any necessary DIExpression rewriting).

Differential Revision: https://reviews.llvm.org/D49270

llvm-svn: 337310
2018-07-17 18:08:36 +00:00
..
AggressiveInstCombine [LLVM-C] Fix name mangling on AggressiveInstCombine 2018-07-17 11:13:58 +00:00
Coroutines Move Analysis/Utils/Local.h back to Transforms 2018-06-04 21:23:21 +00:00
Hello
IPO Restore "[ThinLTO] Ensure we always select the same function copy to import" 2018-07-16 15:30:27 +00:00
InstCombine [InstCombine] Preserve debug value when simplifying cast-of-select 2018-07-17 18:08:36 +00:00
Instrumentation MSan: minor fixes, NFC 2018-07-16 10:57:19 +00:00
ObjCARC ProvenanceAnalysis: Store WeakTrackingVH instead of Value* in UnderlyingValue Cache. 2018-06-21 05:14:00 +00:00
Scalar [IPSCCP] Run Solve each time we resolved an undef in a function. 2018-07-17 14:04:59 +00:00
Utils Fix comments which mixed up 'before' and 'after', NFC 2018-07-13 22:39:31 +00:00
Vectorize [SLPVectorizer] Don't attempt horizontal reduction on pointer types (PR38191) 2018-07-17 13:43:33 +00:00
CMakeLists.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00
LLVMBuild.txt Another try to commit 323321 (aggressive instruction combine). 2018-01-25 12:06:32 +00:00