1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00
llvm-mirror/test/Transforms
Krishna Kariya 05b090ffb1 [InstCombine] Fold IntToPtr/PtrToInt to bitcast
The inttoptr/ptrtoint roundtrip optimization is not always correct.
We are working towards removing this optimization and adding support
to specific cases where this optimization works. This patch is the
first one on this line.

Consider the example:

    %i = ptrtoint i8* %X to i64
    %p = inttoptr i64 %i to i16*
    %cmp = icmp eq i8* %load, %p

In this specific case, the inttoptr/ptrtoint optimization is correct
as it only compares the pointer values. In this patch, we fold
inttoptr/ptrtoint to a bitcast (if src and dest types are different).

Differential Revision: https://reviews.llvm.org/D105088
2021-07-18 23:13:25 +02:00
..
ADCE
AddDiscriminators
AggressiveInstCombine
AlignmentFromAssumptions
ArgumentPromotion
AtomicExpand
Attributor [Attributor][FIX] Sanitize queries to LVI and ScalarEvolution 2021-07-10 16:45:19 -05:00
BDCE
BlockExtractor
BranchFolding
CalledValuePropagation
CallSiteSplitting
CanonicalizeAliases
CanonicalizeFreezeInLoops
CodeExtractor
CodeGenPrepare
ConstantHoisting
ConstantMerge
ConstraintElimination
Coroutines [NewPM] Consistently use 'simplifycfg' rather than 'simplify-cfg' 2021-07-09 09:47:03 +02:00
CorrelatedValuePropagation
CrossDSOCFI
DCE
DeadArgElim
DeadStoreElimination Revert "Transform memset + malloc --> calloc (PR25892)" 2021-07-09 16:26:48 +03:00
DivRemPairs [DivRemPairs] Add an initial case for hoisting to a common predecessor. 2021-07-11 10:03:07 -07:00
EarlyCSE
EliminateAvailableExternally
EntryExitInstrumenter
ExpandMemCmp
FixIrreducible
Float2Int
ForcedFunctionAttrs
FunctionAttrs Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
FunctionImport
FunctionSpecialization
GCOVProfiling
GlobalDCE
GlobalMerge
GlobalOpt [GlobalOpt] Fix a miscompile when evaluating struct initializers. 2021-07-14 15:37:01 -07:00
GlobalSplit
GuardWidening
GVN [tests] Stablize tests for possible change in deref semantics 2021-07-14 13:05:43 -07:00
GVNHoist
GVNSink
HardwareLoops
HelloNew
HotColdSplit
IndirectBrExpand
IndVarSimplify [IndVars] Don't widen pointers in WidenIV::getWideRecurrence 2021-07-11 17:04:50 -07:00
InferAddressSpaces
InferFunctionAttrs Reapply [IR] Don't mark mustprogress as type attribute 2021-07-09 20:57:44 +02:00
Inline [Inline] Add test for PR50589 (NFC) 2021-07-18 18:38:06 +02:00
InstCombine [InstCombine] Fold IntToPtr/PtrToInt to bitcast 2021-07-18 23:13:25 +02:00
InstMerge
InstNamer
InstSimplify Use update_test_checks.py to auto-generate check lines 2021-07-16 18:20:08 +07:00
InterleavedAccess
Internalize [Internalize] Preserve variables externally initialized. 2021-07-08 10:48:19 -04:00
IRCE
IROutliner
JumpThreading [tests] Stablize tests for possible change in deref semantics 2021-07-14 13:05:43 -07:00
LCSSA
LICM [tests] Stablize tests for possible change in deref semantics 2021-07-14 13:05:43 -07:00
LoadStoreVectorizer
LoopBoundSplit
LoopDataPrefetch
LoopDeletion [AsmParser] Unify parsing of attributes 2021-07-15 17:51:11 +02:00
LoopDistribute
LoopFlatten
LoopFusion
LoopIdiom
LoopInstSimplify
LoopInterchange [LoopInterchange] Check lcssa phis in the inner latch in scenarios of multi-level nested loops 2021-07-16 11:59:20 -04:00
LoopLoadElim
LoopPredication
LoopReroll [SCEV] Fix unsound reasoning in howManyLessThans 2021-07-15 10:32:47 -07:00
LoopRotate
LoopSimplify
LoopSimplifyCFG
LoopStrengthReduce [LSR] Handle case 1*reg => reg. PR50918 2021-07-16 11:33:59 +07:00
LoopTransformWarning
LoopUnroll [NewPM] Consistently use 'simplifycfg' rather than 'simplify-cfg' 2021-07-09 09:47:03 +02:00
LoopUnrollAndJam
LoopUnswitch
LoopVectorize [LV] Avoid scalable vectorization for loops containing alloca 2021-07-16 11:47:13 +01:00
LoopVersioning
LoopVersioningLICM
LowerAtomic
LowerConstantIntrinsics
LowerExpectIntrinsic
LowerGuardIntrinsic
LowerInvoke
LowerMatrixIntrinsics
LowerSwitch
LowerTypeTests
LowerWidenableCondition
MakeGuardsExplicit
Mem2Reg
MemCpyOpt [tests] Stablize tests for possible change in deref semantics 2021-07-14 13:05:43 -07:00
MergeFunc
MergeICmps [tests] Stablize tests for possible change in deref semantics 2021-07-14 13:05:43 -07:00
MetaRenamer
NameAnonGlobals
NaryReassociate
NewGVN
ObjCARC [ObjCARC] Use objc_msgSend instead of llvm.objc.msgSend in tests 2021-07-15 22:21:22 +02:00
OpenMP [OpenMP] Rework OpenMP remarks 2021-07-16 14:07:00 -04:00
PartialInlining
PartiallyInlineLibCalls
PGOProfile [SimplifyCFG] Rerun PHI deduplication after common code sinkinkg (PR51092) 2021-07-15 16:34:34 +03:00
PhaseOrdering [InstCombine] fold reassociative FP add into start value of fadd reduction 2021-07-18 06:26:20 -04:00
PlaceSafepoints
PreISelIntrinsicLowering
PruneEH [NewPM] Consistently use 'simplifycfg' rather than 'simplify-cfg' 2021-07-09 09:47:03 +02:00
Reassociate
Reg2Mem
RelLookupTableConverter/X86
RewriteStatepointsForGC [RS4GC] Use one DVCache for both inlineGetBaseAndOffset() and insertParsePoints() 2021-07-12 18:13:00 +07:00
SafeStack
SampleProfile [AFDO] Require x86_64-linux in a testcase 2021-07-10 07:52:20 -07:00
ScalarizeMaskedMemIntrin
Scalarizer
SCCP
SeparateConstOffsetFromGEP
SimpleLoopUnswitch [SimpleLoopUnswitch] Don't non-trivially unswitch loops with catchswitch exits 2021-07-14 14:07:28 -07:00
SimplifyCFG [SimplifyCFG] add test to show miscompile from FoldBranchToCommonDest (PR51125); NFC 2021-07-18 13:42:23 -04:00
Sink
SLPVectorizer [SLP]Improve calculations of the cost for reused/reordered scalars. 2021-07-16 13:40:15 -07:00
SpeculativeExecution
SROA
StraightLineStrengthReduce
StripDeadPrototypes
StripSymbols
StructurizeCFG
SyntheticCountsPropagation
TailCallElim [tests] Stablize tests for possible change in deref semantics 2021-07-14 13:05:43 -07:00
ThinLTOBitcodeWriter Revert "ThinLTO: Fix inline assembly references to static functions with CFI" 2021-07-16 14:47:33 -07:00
TypePromotion/ARM
UnifyFunctionExitNodes
UnifyLoopExits
Util
VectorCombine [tests] Stablize tests for possible change in deref semantics 2021-07-14 13:05:43 -07:00
WholeProgramDevirt