llvm-6502/test/Assembler
Jingyue Wu f6eb7e3175 Canonicalize addrspacecast ConstExpr between different pointer types
As a follow-up to r210375 which canonicalizes addrspacecast
instructions, this patch canonicalizes addrspacecast constant
expressions.

Given clang uses ConstantExpr::getAddrSpaceCast to emit addrspacecast
cosntant expressions, this patch is also a step towards having the
frontend emit canonicalized addrspacecasts.

Piggyback a minor refactor in InstCombineCasts.cpp

Update three affected tests in addrspacecast-alias.ll,
access-non-generic.ll and constant-fold-gep.ll and added one new test in
constant-fold-address-space-pointer.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211004 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-15 21:40:57 +00:00
..
2002-03-08-NameCollision2.ll
2002-03-08-NameCollision.ll
2002-04-07-HexFloatConstants.ll
2002-04-07-InfConstant.ll
2002-04-29-NameBinding.ll
2002-05-02-InvalidForwardRef.ll
2002-07-14-OpaqueType.ll
2002-07-25-QuoteInString.ll
2002-07-25-ReturnPtrFunction.ll
2002-07-31-SlashInString.ll
2002-08-15-CastAmbiguity.ll
2002-08-15-ConstantExprProblem.ll
2002-08-15-UnresolvedGlobalReference.ll
2002-08-16-ConstExprInlined.ll
2002-08-19-BytecodeReader.ll
2002-08-22-DominanceProblem.ll
2002-10-08-LargeArrayPerformance.ll
2002-10-13-ConstantEncodingProblem.ll
2002-12-15-GlobalResolve.ll
2003-01-30-UnsignedString.ll
2003-04-15-ConstantInitAssertion.ll
2003-04-25-UnresolvedGlobalReference.ll
2003-05-03-BytecodeReaderProblem.ll
2003-05-12-MinIntProblem.ll
2003-05-15-AssemblerProblem.ll
2003-05-15-SwitchBug.ll
2003-05-21-ConstantShiftExpr.ll
2003-05-21-EmptyStructTest.ll
2003-05-21-MalformedShiftCrash.ll
2003-05-21-MalformedStructCrash.ll
2003-08-20-ConstantExprGEP-Fold.ll
2003-08-21-ConstantExprCast-Fold.ll
2003-11-05-ConstantExprShift.ll
2003-11-11-ImplicitRename.ll
2003-11-12-ConstantExprCast.ll
2003-11-24-SymbolTableCrash.ll
2004-01-11-getelementptrfolding.ll
2004-01-20-MaxLongLong.ll
2004-02-01-NegativeZero.ll
2004-02-27-SelfUseAssertError.ll
2004-03-07-FunctionAddressAlignment.ll
2004-03-30-UnclosedFunctionCrash.ll
2004-04-04-GetElementPtrIndexTypes.ll
2004-06-07-VerifierBug.ll
2004-10-22-BCWriterUndefBug.ll
2004-11-28-InvalidTypeCrash.ll
2005-01-03-FPConstantDisassembly.ll
2005-01-31-CallingAggregateFunction.ll
2005-05-05-OpaqueUndefValues.ll
2005-12-21-ZeroInitVector.ll
2006-09-28-CrashOnInvalid.ll
2006-12-09-Cast-To-Bool.ll
2007-01-02-Undefined-Arg-Type.ll
2007-01-05-Cmp-ConstExpr.ll
2007-01-16-CrashOnBadCast2.ll
2007-01-16-CrashOnBadCast.ll
2007-03-18-InvalidNumberedVar.ll
2007-03-19-NegValue.ll
2007-04-20-AlignedLoad.ll
2007-04-20-AlignedStore.ll
2007-04-25-AssemblerFoldExternWeak.ll
2007-05-21-Escape.ll
2007-07-19-ParamAttrAmbiguity.ll
2007-08-06-AliasInvalid.ll
2007-09-10-AliasFwdRef.ll Reject alias to undefined symbols in the verifier. 2014-03-12 20:15:49 +00:00
2007-09-29-GC.ll
2007-11-26-AttributeOverload.ll
2007-12-11-AddressSpaces.ll
2008-01-11-VarargAttrs.ll
2008-02-18-IntPointerCrash.ll
2008-07-10-APInt.ll
2008-09-02-FunctionNotes2.ll
2008-09-02-FunctionNotes.ll
2008-09-29-RetAttr.ll
2008-10-14-QuoteInName.ll
2009-02-01-UnnamedForwardRef.ll
2009-02-28-CastOpc.ll
2009-02-28-StripOpaqueName.ll
2009-03-24-ZextConstantExpr.ll
2009-07-24-ZeroArgGEP.ll
2010-02-05-FunctionLocalMetadataBecomesNull.ll
addrspacecast-alias.ll Canonicalize addrspacecast ConstExpr between different pointer types 2014-06-15 21:40:57 +00:00
aggregate-constant-values.ll
aggregate-return-single-value.ll
alias-redefinition.ll Don't crash on redefinitions. 2014-05-09 21:49:17 +00:00
align-inst-alloca.ll
align-inst-load.ll
align-inst-store.ll
align-inst.ll
alignstack.ll
anon-functions.ll
atomic.ll IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
attribute-builtin.ll
auto_upgrade_intrinsics.ll
bcwrap.ll
comment.ll
ConstantExprFold.ll
ConstantExprFoldCast.ll
ConstantExprFoldSelect.ll Fold vector selects with undef elements in the condition. Fixes PR18319. 2013-12-31 19:30:47 +00:00
ConstantExprNoFold.ll
externally-initialized.ll
extractvalue-invalid-idx.ll
fast-math-flags.ll
flags.ll
functionlocal-metadata.ll Fix broken CHECK lines. 2014-01-11 21:06:00 +00:00
getelementptr_struct.ll
getelementptr_vec_idx1.ll
getelementptr_vec_idx2.ll
getelementptr_vec_idx3.ll
getelementptr_vec_struct.ll
getelementptr.ll
getInt.ll Clean up RUN command for Assembler/getInt.ll. 2014-01-13 22:37:35 +00:00
global-addrspace-forwardref.ll
half-constprop.ll No need for those tests to go thru llvm-as and/or llvm-dis. 2014-05-27 22:03:28 +00:00
half-conv.ll No need for those tests to go thru llvm-as and/or llvm-dis. 2014-05-27 22:03:28 +00:00
half.ll
huge-array.ll
inalloca.ll IR: Change inalloca's grammar a bit 2014-03-09 06:41:58 +00:00
insertextractvalue.ll
insertvalue-invalid-idx.ll
internal-hidden-alias.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
internal-hidden-function.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
internal-hidden-variable.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
internal-protected-alias.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
internal-protected-function.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
internal-protected-variable.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
invalid_cast2.ll
invalid_cast3.ll Bug 18228 - Fix accepting bitcasts between vectors of pointers with a 2014-01-22 19:21:33 +00:00
invalid_cast.ll
invalid-fwdref1.ll
invalid-name.ll
metadata.ll
MultipleReturnValueType.ll
named-metadata.ll
numbered-values.ll
private-hidden-alias.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
private-hidden-function.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
private-hidden-variable.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
private-protected-alias.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
private-protected-function.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
private-protected-variable.ll IR: Don't allow non-default visibility on local linkage 2014-05-07 22:57:20 +00:00
select.ll
tls-models.ll
unnamed-addr.ll
unnamed.ll
vbool-cmp.ll
vector-cmp.ll
vector-select.ll
vector-shift.ll
x86mmx.ll