[clang] 1b9a6e5 - [CodeGenCXX] Convert some tests to opaque pointers (NFC)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 6 03:22:26 PDT 2022


Author: Nikita Popov
Date: 2022-10-06T12:22:03+02:00
New Revision: 1b9a6e58a8b831193c9e5e733f881aabe0d2d06b

URL: https://github.com/llvm/llvm-project/commit/1b9a6e58a8b831193c9e5e733f881aabe0d2d06b
DIFF: https://github.com/llvm/llvm-project/commit/1b9a6e58a8b831193c9e5e733f881aabe0d2d06b.diff

LOG: [CodeGenCXX] Convert some tests to opaque pointers (NFC)

Conversion done using the script at
https://gist.github.com/nikic/98357b71fd67756b0f064c9517b62a34.

These are tests where the conversion worked out of the box and no
manual fixup was performed.

Added: 
    

Modified: 
    clang/test/CodeGenCXX/2009-12-23-MissingSext.cpp
    clang/test/CodeGenCXX/2012-03-16-StoreAlign.cpp
    clang/test/CodeGenCXX/ARM/exception-alignment.cpp
    clang/test/CodeGenCXX/PR19955.cpp
    clang/test/CodeGenCXX/PR26569.cpp
    clang/test/CodeGenCXX/PR28523.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/child-inheritted-from-parent-in-comdat.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/child-vtable-in-comdat.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-1.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-2.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/inheritted-virtual-function.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/inline-virtual-function.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/inlined-key-function.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/member-function-pointer.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/no-alias-when-dso-local.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/override-pure-virtual-method.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/overriden-virtual-function.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/parent-and-child-in-comdats.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/parent-vtable-in-comdat.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/relative-vtables-flag.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/simple-vtable-definition.cpp
    clang/test/CodeGenCXX/RelativeVTablesABI/vtable-hidden-when-in-comdat.cpp
    clang/test/CodeGenCXX/aarch64-cxxabi.cpp
    clang/test/CodeGenCXX/address-space-of-this.cpp
    clang/test/CodeGenCXX/address-space-ref.cpp
    clang/test/CodeGenCXX/aix-constructor-attribute.cpp
    clang/test/CodeGenCXX/aix-destructor-attribute.cpp
    clang/test/CodeGenCXX/aix-static-init-debug-info.cpp
    clang/test/CodeGenCXX/aix-static-init-temp-spec-and-inline-var.cpp
    clang/test/CodeGenCXX/aix-static-init.cpp
    clang/test/CodeGenCXX/align-avx-complete-objects.cpp
    clang/test/CodeGenCXX/amdgcn-string-literal.cpp
    clang/test/CodeGenCXX/amdgcn_declspec_get.cpp
    clang/test/CodeGenCXX/amdgpu-kernel-arg-pointer-type.cpp
    clang/test/CodeGenCXX/apple-kext-indirect-call-2.cpp
    clang/test/CodeGenCXX/apple-kext-indirect-call.cpp
    clang/test/CodeGenCXX/apple-kext-indirect-virtual-dtor-call.cpp
    clang/test/CodeGenCXX/apple-kext.cpp
    clang/test/CodeGenCXX/arm-cc.cpp
    clang/test/CodeGenCXX/arm64-constructor-return.cpp
    clang/test/CodeGenCXX/arm64-empty-struct.cpp
    clang/test/CodeGenCXX/assign-construct-memcpy.cpp
    clang/test/CodeGenCXX/atomic-dllexport.cpp
    clang/test/CodeGenCXX/atomic-inline.cpp
    clang/test/CodeGenCXX/atomic.cpp
    clang/test/CodeGenCXX/atomicinit.cpp
    clang/test/CodeGenCXX/attr-annotate.cpp
    clang/test/CodeGenCXX/attr-annotate2.cpp
    clang/test/CodeGenCXX/attr-cpuspecific-outoflinedefs.cpp
    clang/test/CodeGenCXX/attr-cpuspecific.cpp
    clang/test/CodeGenCXX/attr-disable-tail-calls.cpp
    clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp
    clang/test/CodeGenCXX/attr-likelihood-switch-branch-weights.cpp
    clang/test/CodeGenCXX/attr-mustprogress.cpp
    clang/test/CodeGenCXX/attr-notail.cpp
    clang/test/CodeGenCXX/attr-retain.cpp
    clang/test/CodeGenCXX/attr-target-mv-diff-ns.cpp
    clang/test/CodeGenCXX/attr-target-mv-func-ptrs.cpp
    clang/test/CodeGenCXX/attr-target-mv-inalloca.cpp
    clang/test/CodeGenCXX/attr-target-mv-member-funcs.cpp
    clang/test/CodeGenCXX/attr-target-mv-modules.cpp
    clang/test/CodeGenCXX/attr-target-mv-out-of-line-defs.cpp
    clang/test/CodeGenCXX/attr-target-mv-overloads.cpp
    clang/test/CodeGenCXX/attr-x86-interrupt.cpp
    clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp
    clang/test/CodeGenCXX/attr.cpp
    clang/test/CodeGenCXX/auto-variable-template.cpp
    clang/test/CodeGenCXX/block-byref.cpp
    clang/test/CodeGenCXX/block-inalloca.cpp
    clang/test/CodeGenCXX/builtin-amdgcn-atomic-inc-dec.cpp
    clang/test/CodeGenCXX/builtin-bit-cast-no-tbaa.cpp
    clang/test/CodeGenCXX/builtin-calling-conv.cpp
    clang/test/CodeGenCXX/builtin-operator-new-delete.cpp
    clang/test/CodeGenCXX/builtin_FUNCTION.cpp
    clang/test/CodeGenCXX/builtin_LINE.cpp
    clang/test/CodeGenCXX/builtins-arm-exclusive.cpp
    clang/test/CodeGenCXX/builtins.cpp
    clang/test/CodeGenCXX/c99-variable-length-array.cpp
    clang/test/CodeGenCXX/call-with-static-chain.cpp
    clang/test/CodeGenCXX/cast-to-ref-bool.cpp
    clang/test/CodeGenCXX/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.cpp
    clang/test/CodeGenCXX/cfi-cast.cpp
    clang/test/CodeGenCXX/cfi-icall.cpp
    clang/test/CodeGenCXX/cfi-mfcall.cpp
    clang/test/CodeGenCXX/cfi-nvcall.cpp
    clang/test/CodeGenCXX/cfi-speculative-vtable.cpp
    clang/test/CodeGenCXX/cfi-stats.cpp
    clang/test/CodeGenCXX/clang-abi-compat.cpp
    clang/test/CodeGenCXX/clang-sections.cpp
    clang/test/CodeGenCXX/compound-literals.cpp
    clang/test/CodeGenCXX/condition.cpp
    clang/test/CodeGenCXX/constructor-alias.cpp
    clang/test/CodeGenCXX/constructor-direct-call.cpp
    clang/test/CodeGenCXX/constructor-init-reference.cpp
    clang/test/CodeGenCXX/constructor-template.cpp
    clang/test/CodeGenCXX/convert-to-fptr.cpp
    clang/test/CodeGenCXX/copy-assign-synthesis-1.cpp
    clang/test/CodeGenCXX/copy-assign-synthesis-2.cpp
    clang/test/CodeGenCXX/copy-constructor-elim.cpp
    clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp
    clang/test/CodeGenCXX/copy-initialization.cpp
    clang/test/CodeGenCXX/ctor-globalopt.cpp
    clang/test/CodeGenCXX/cxx-abi-switch.cpp
    clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp
    clang/test/CodeGenCXX/cxx0x-initializer-array.cpp
    clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp
    clang/test/CodeGenCXX/cxx11-exception-spec.cpp
    clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp
    clang/test/CodeGenCXX/cxx11-thread-local-visibility.cpp
    clang/test/CodeGenCXX/cxx11-user-defined-literal.cpp
    clang/test/CodeGenCXX/cxx1y-init-captures-eh.cpp
    clang/test/CodeGenCXX/cxx1y-init-captures.cpp
    clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp
    clang/test/CodeGenCXX/cxx1y-variable-template-linkage.cpp
    clang/test/CodeGenCXX/cxx1y-variable-template.cpp
    clang/test/CodeGenCXX/cxx1z-aligned-allocation.cpp
    clang/test/CodeGenCXX/cxx1z-init-statement.cpp
    clang/test/CodeGenCXX/cxx1z-inline-variables.cpp
    clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp
    clang/test/CodeGenCXX/cxx20-consteval-crash.cpp
    clang/test/CodeGenCXX/cxx20-p0388-unbound-ary.cpp
    clang/test/CodeGenCXX/cxx2a-compare.cpp
    clang/test/CodeGenCXX/cxx2a-consteval.cpp
    clang/test/CodeGenCXX/debug-info-atexit-stub.cpp
    clang/test/CodeGenCXX/debug-info-class.cpp
    clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp
    clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp
    clang/test/CodeGenCXX/debug-info-ctor.cpp
    clang/test/CodeGenCXX/debug-info-destroy-helper.cpp
    clang/test/CodeGenCXX/debug-info-globalinit.cpp
    clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
    clang/test/CodeGenCXX/debug-info-lambda.cpp
    clang/test/CodeGenCXX/debug-info-line.cpp
    clang/test/CodeGenCXX/debug-info-ms-dtor-thunks.cpp
    clang/test/CodeGenCXX/debug-info-nested-exprs.cpp
    clang/test/CodeGenCXX/debug-info-structured-binding.cpp
    clang/test/CodeGenCXX/debug-info-thunk-msabi.cpp
    clang/test/CodeGenCXX/debug-info-uuid.cpp
    clang/test/CodeGenCXX/debug-info.cpp
    clang/test/CodeGenCXX/decl-ref-init.cpp
    clang/test/CodeGenCXX/default-arguments.cpp
    clang/test/CodeGenCXX/default-constructor-template-member.cpp
    clang/test/CodeGenCXX/deferred-global-init.cpp
    clang/test/CodeGenCXX/derived-cast.cpp
    clang/test/CodeGenCXX/derived-to-base.cpp
    clang/test/CodeGenCXX/devirtualize-ms-dtor.cpp
    clang/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp
    clang/test/CodeGenCXX/dllexport-alias.cpp
    clang/test/CodeGenCXX/dllexport-ctor-closure.cpp
    clang/test/CodeGenCXX/dllexport-dtor-thunks.cpp
    clang/test/CodeGenCXX/dllexport-members.cpp
    clang/test/CodeGenCXX/dllexport-pr26549.cpp
    clang/test/CodeGenCXX/dllexport.cpp
    clang/test/CodeGenCXX/dllimport-dtor-thunks.cpp
    clang/test/CodeGenCXX/dllimport-members.cpp
    clang/test/CodeGenCXX/dllimport-memptr-global.cpp
    clang/test/CodeGenCXX/dllimport-rtti.cpp
    clang/test/CodeGenCXX/dllimport-runtime-fns.cpp
    clang/test/CodeGenCXX/dllimport.cpp
    clang/test/CodeGenCXX/dso-handle-custom.cpp
    clang/test/CodeGenCXX/dynamic-cast-always-null.cpp
    clang/test/CodeGenCXX/dynamic-cast-hint.cpp
    clang/test/CodeGenCXX/dynamic-cast.cpp
    clang/test/CodeGenCXX/dynamic_cast-no-rtti.cpp
    clang/test/CodeGenCXX/eh-aggregated-inits-unwind.cpp
    clang/test/CodeGenCXX/empty-nontrivially-copyable.cpp
    clang/test/CodeGenCXX/exceptions-cxx-new.cpp
    clang/test/CodeGenCXX/exceptions-seh-filter-uwtable.cpp
    clang/test/CodeGenCXX/exceptions-seh.cpp
    clang/test/CodeGenCXX/ext-int-vector-abi.cpp
    clang/test/CodeGenCXX/fastcall.cpp
    clang/test/CodeGenCXX/float128-declarations.cpp
    clang/test/CodeGenCXX/for-loop-init-ternary-operator-statement.cpp
    clang/test/CodeGenCXX/fp16-mangle-arg-return.cpp
    clang/test/CodeGenCXX/fp16-mangle.cpp
    clang/test/CodeGenCXX/ibm128-declarations.cpp
    clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp
    clang/test/CodeGenCXX/implicit-copy-constructor.cpp
    clang/test/CodeGenCXX/inalloca-overaligned.cpp
    clang/test/CodeGenCXX/inalloca-stmtexpr.cpp
    clang/test/CodeGenCXX/inalloca-vector.cpp
    clang/test/CodeGenCXX/inheriting-constructor-cleanup.cpp
    clang/test/CodeGenCXX/init-priority-attr.cpp
    clang/test/CodeGenCXX/initializer-list-ctor-order.cpp
    clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp
    clang/test/CodeGenCXX/key-function-vtable.cpp
    clang/test/CodeGenCXX/lambda-conversion-op-cc.cpp
    clang/test/CodeGenCXX/lambda-deterministic-captures.cpp
    clang/test/CodeGenCXX/lambda-expressions.cpp
    clang/test/CodeGenCXX/linetable-cleanup.cpp
    clang/test/CodeGenCXX/linetable-eh.cpp
    clang/test/CodeGenCXX/linkage.cpp
    clang/test/CodeGenCXX/m64-ptr.cpp
    clang/test/CodeGenCXX/mangle-abi-tag.cpp
    clang/test/CodeGenCXX/mangle-address-space.cpp
    clang/test/CodeGenCXX/mangle-exprs.cpp
    clang/test/CodeGenCXX/mangle-lambdas.cpp
    clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
    clang/test/CodeGenCXX/mangle-ms-templates-memptrs-2.cpp
    clang/test/CodeGenCXX/mangle-ptr-size-address-space.cpp
    clang/test/CodeGenCXX/mangle-subst-std.cpp
    clang/test/CodeGenCXX/mangle-win-ccs.cpp
    clang/test/CodeGenCXX/mangle-win64-ccs.cpp
    clang/test/CodeGenCXX/mangle.cpp
    clang/test/CodeGenCXX/matrix-type-operators.cpp
    clang/test/CodeGenCXX/member-expr-references-variable.cpp
    clang/test/CodeGenCXX/member-function-pointer-calls.cpp
    clang/test/CodeGenCXX/member-function-pointers.cpp
    clang/test/CodeGenCXX/member-functions.cpp
    clang/test/CodeGenCXX/member-init-assignment.cpp
    clang/test/CodeGenCXX/member-templates.cpp
    clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
    clang/test/CodeGenCXX/microsoft-abi-byval-sret.cpp
    clang/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp
    clang/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp
    clang/test/CodeGenCXX/microsoft-abi-eh-terminate.cpp
    clang/test/CodeGenCXX/microsoft-abi-extern-template.cpp
    clang/test/CodeGenCXX/microsoft-abi-methods.cpp
    clang/test/CodeGenCXX/microsoft-abi-rtti.cpp
    clang/test/CodeGenCXX/microsoft-abi-static-initializers.cpp
    clang/test/CodeGenCXX/microsoft-abi-template-static-init.cpp
    clang/test/CodeGenCXX/microsoft-abi-throw.cpp
    clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp
    clang/test/CodeGenCXX/microsoft-abi-unknown-arch.cpp
    clang/test/CodeGenCXX/microsoft-abi-vbase-dtor.cpp
    clang/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp
    clang/test/CodeGenCXX/microsoft-abi-vmemptr-conflicts.cpp
    clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
    clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
    clang/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp
    clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
    clang/test/CodeGenCXX/microsoft-compatibility.cpp
    clang/test/CodeGenCXX/microsoft-interface.cpp
    clang/test/CodeGenCXX/microsoft-new.cpp
    clang/test/CodeGenCXX/microsoft-uuidof.cpp
    clang/test/CodeGenCXX/mingw-w64-seh-exceptions.cpp
    clang/test/CodeGenCXX/mips-size_t-ptrdiff_t.cpp
    clang/test/CodeGenCXX/ms-constexpr-static-data-member.cpp
    clang/test/CodeGenCXX/ms-inline-asm-fields.cpp
    clang/test/CodeGenCXX/ms-inline-asm-return.cpp
    clang/test/CodeGenCXX/ms-thread_local.cpp
    clang/test/CodeGenCXX/ms-thunks-ehspec.cpp
    clang/test/CodeGenCXX/ms_struct.cpp
    clang/test/CodeGenCXX/msabi-ctor-abstract-vbase.cpp
    clang/test/CodeGenCXX/multi-dim-operator-new.cpp
    clang/test/CodeGenCXX/multi-versioning-internal-linkage.cpp
    clang/test/CodeGenCXX/new-alias.cpp
    clang/test/CodeGenCXX/new-infallible.cpp
    clang/test/CodeGenCXX/no-opt-volatile-memcpy.cpp
    clang/test/CodeGenCXX/no-unique-address-2.cpp
    clang/test/CodeGenCXX/noexcept.cpp
    clang/test/CodeGenCXX/noinline-template.cpp
    clang/test/CodeGenCXX/nrvo.cpp
    clang/test/CodeGenCXX/nullptr.cpp
    clang/test/CodeGenCXX/operator-new.cpp
    clang/test/CodeGenCXX/pass-by-value-noalias.cpp
    clang/test/CodeGenCXX/personality.cpp
    clang/test/CodeGenCXX/pod-member-memcpys.cpp
    clang/test/CodeGenCXX/powerpc-byval.cpp
    clang/test/CodeGenCXX/pr12251.cpp
    clang/test/CodeGenCXX/pr13396.cpp
    clang/test/CodeGenCXX/pr20897.cpp
    clang/test/CodeGenCXX/pr27030.cpp
    clang/test/CodeGenCXX/pr28360.cpp
    clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp
    clang/test/CodeGenCXX/pr45964-decomp-transform.cpp
    clang/test/CodeGenCXX/pr47636.cpp
    clang/test/CodeGenCXX/pragma-loop-safety-imperfectly_nested.cpp
    clang/test/CodeGenCXX/pragma-loop-safety-nested.cpp
    clang/test/CodeGenCXX/pragma-loop-safety-outer.cpp
    clang/test/CodeGenCXX/pragma-loop-safety.cpp
    clang/test/CodeGenCXX/pragma-pack-3.cpp
    clang/test/CodeGenCXX/predefined-expr-sizeof.cpp
    clang/test/CodeGenCXX/ps4-dllstorage-vtable-rtti.cpp
    clang/test/CodeGenCXX/redefine_extname.cpp
    clang/test/CodeGenCXX/reference-cast.cpp
    clang/test/CodeGenCXX/regcall.cpp
    clang/test/CodeGenCXX/regparm.cpp
    clang/test/CodeGenCXX/rtti-mingw64.cpp
    clang/test/CodeGenCXX/rtti-qualfn.cpp
    clang/test/CodeGenCXX/runtime-dllstorage.cpp
    clang/test/CodeGenCXX/runtimecc.cpp
    clang/test/CodeGenCXX/sanitize-dtor-trivial-base.cpp
    clang/test/CodeGenCXX/sanitize-dtor-zero-size-field.cpp
    clang/test/CodeGenCXX/sections.cpp
    clang/test/CodeGenCXX/sizeof-unwind-exception.cpp
    clang/test/CodeGenCXX/skip-vtable-pointer-initialization.cpp
    clang/test/CodeGenCXX/sparcv9-abi.cpp
    clang/test/CodeGenCXX/stack-reuse-miscompile.cpp
    clang/test/CodeGenCXX/static-data-member-single-emission.cpp
    clang/test/CodeGenCXX/static-data-member.cpp
    clang/test/CodeGenCXX/static-destructor.cpp
    clang/test/CodeGenCXX/static-init-3.cpp
    clang/test/CodeGenCXX/static-init-wasm.cpp
    clang/test/CodeGenCXX/static-initializer-branch-weights.cpp
    clang/test/CodeGenCXX/static-local-in-local-class.cpp
    clang/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp
    clang/test/CodeGenCXX/std-byte.cpp
    clang/test/CodeGenCXX/stmtexpr.cpp
    clang/test/CodeGenCXX/switch-case-folding-2.cpp
    clang/test/CodeGenCXX/temp-order.cpp
    clang/test/CodeGenCXX/template-anonymous-types.cpp
    clang/test/CodeGenCXX/template-instantiation.cpp
    clang/test/CodeGenCXX/template-linkage.cpp
    clang/test/CodeGenCXX/thinlto-distributed-type-metadata.cpp
    clang/test/CodeGenCXX/this-nonnull.cpp
    clang/test/CodeGenCXX/thiscall-struct-return.cpp
    clang/test/CodeGenCXX/threadsafe-statics-exceptions.cpp
    clang/test/CodeGenCXX/thunk-returning-memptr.cpp
    clang/test/CodeGenCXX/thunks-ehspec.cpp
    clang/test/CodeGenCXX/tls-init-funcs.cpp
    clang/test/CodeGenCXX/type-cache-3.cpp
    clang/test/CodeGenCXX/type-cache.cpp
    clang/test/CodeGenCXX/typeid.cpp
    clang/test/CodeGenCXX/ubsan-bitfields.cpp
    clang/test/CodeGenCXX/ubsan-function-noexcept.cpp
    clang/test/CodeGenCXX/ubsan-global-alignment.cpp
    clang/test/CodeGenCXX/ubsan-new-checks.cpp
    clang/test/CodeGenCXX/ubsan-nullability-arg.cpp
    clang/test/CodeGenCXX/ubsan-nullability-assign.cpp
    clang/test/CodeGenCXX/ubsan-suppress-checks.cpp
    clang/test/CodeGenCXX/ubsan-type-checks.cpp
    clang/test/CodeGenCXX/ubsan-unreachable.cpp
    clang/test/CodeGenCXX/uncopyable-args.cpp
    clang/test/CodeGenCXX/unknown-anytype.cpp
    clang/test/CodeGenCXX/vararg-conversion-ctor.cpp
    clang/test/CodeGenCXX/vararg-non-pod-ms-compat.cpp
    clang/test/CodeGenCXX/varargs.cpp
    clang/test/CodeGenCXX/vector-splat-conversion.cpp
    clang/test/CodeGenCXX/virt-dtor-gen.cpp
    clang/test/CodeGenCXX/virtual-base-cast.cpp
    clang/test/CodeGenCXX/virtual-base-destructor-call.cpp
    clang/test/CodeGenCXX/virtual-functions-incomplete-types.cpp
    clang/test/CodeGenCXX/virtual-operator-call.cpp
    clang/test/CodeGenCXX/visibility-inlines-hidden.cpp
    clang/test/CodeGenCXX/vla-consruct.cpp
    clang/test/CodeGenCXX/vla.cpp
    clang/test/CodeGenCXX/vtable-align.cpp
    clang/test/CodeGenCXX/vtable-assume-load.cpp
    clang/test/CodeGenCXX/vtable-pointer-initialization.cpp
    clang/test/CodeGenCXX/vtt-layout.cpp
    clang/test/CodeGenCXX/wasm-args-returns.cpp
    clang/test/CodeGenCXX/wasm-eh.cpp
    clang/test/CodeGenCXX/windows-itanium-exceptions.cpp
    clang/test/CodeGenCXX/windows-on-arm-itanium-thread-local.cpp
    clang/test/CodeGenCXX/windows-x86-swiftcall.cpp
    clang/test/CodeGenCXX/x86_32-arguments.cpp
    clang/test/CodeGenCXX/x86_64-arguments-avx.cpp
    clang/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp

Removed: 
    


################################################################################
diff  --git a/clang/test/CodeGenCXX/2009-12-23-MissingSext.cpp b/clang/test/CodeGenCXX/2009-12-23-MissingSext.cpp
index 56b9302e76e80..d1af8f9b8a25c 100644
--- a/clang/test/CodeGenCXX/2009-12-23-MissingSext.cpp
+++ b/clang/test/CodeGenCXX/2009-12-23-MissingSext.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple x86_64-unknown-unknown -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple x86_64-unknown-unknown -emit-llvm -o - | FileCheck %s
 // The store of p.y into the temporary was not
 // getting extended to 32 bits, so uninitialized
 // bits of the temporary were used.  7366161.
@@ -8,11 +8,11 @@ struct foo {
 };
 int bar(struct foo p, int x) {
 // CHECK: bar
-// CHECK: %[[val:.*]] = load i32, i32* {{.*}}
+// CHECK: %[[val:.*]] = load i32, ptr {{.*}}
 // CHECK-NEXT:          ashr i32 %[[val]]
-// CHECK:             = load i32, i32* {{.*}}
-// CHECK:             = load i32, i32* {{.*}}
-// CHECK: %[[val:.*]] = load i32, i32* {{.*}}
+// CHECK:             = load i32, ptr {{.*}}
+// CHECK:             = load i32, ptr {{.*}}
+// CHECK: %[[val:.*]] = load i32, ptr {{.*}}
 // CHECK-NEXT:          ashr i32 %[[val]]
   x = (p.y > x ? x : p.y);
   return x;

diff  --git a/clang/test/CodeGenCXX/2012-03-16-StoreAlign.cpp b/clang/test/CodeGenCXX/2012-03-16-StoreAlign.cpp
index 6d07d2c87b34e..5c2708c9fd0cb 100644
--- a/clang/test/CodeGenCXX/2012-03-16-StoreAlign.cpp
+++ b/clang/test/CodeGenCXX/2012-03-16-StoreAlign.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple x86_64-apple-darwin %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple x86_64-apple-darwin %s | FileCheck %s
 // <rdar://problem/11043589>
 
 struct Length {
@@ -28,7 +28,7 @@ struct Foo {
 };
 
 // CHECK: @_ZZN3Foo19getPageSizeFromNameERK6LengthE10legalWidth = linkonce_odr global %struct.Length zeroinitializer, align 4
-// CHECK: store float %{{.*}}, float* getelementptr inbounds (%struct.Length, %struct.Length* @_ZZN3Foo19getPageSizeFromNameERK6LengthE10legalWidth, i32 0, i32 0), align 4
+// CHECK: store float %{{.*}}, ptr @_ZZN3Foo19getPageSizeFromNameERK6LengthE10legalWidth, align 4
 
 bool bar(Length &b) {
   Foo f;

diff  --git a/clang/test/CodeGenCXX/ARM/exception-alignment.cpp b/clang/test/CodeGenCXX/ARM/exception-alignment.cpp
index 371b42e91f193..3214127082c3e 100644
--- a/clang/test/CodeGenCXX/ARM/exception-alignment.cpp
+++ b/clang/test/CodeGenCXX/ARM/exception-alignment.cpp
@@ -1,13 +1,12 @@
 // Bug: https://bugs.llvm.org/show_bug.cgi?id=42668
 // REQUIRES: arm-registered-target
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple armv8-arm-none-eabi -emit-llvm -target-cpu generic -Os -fcxx-exceptions -o - -x c++ %s | FileCheck --check-prefixes=CHECK,A8 %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple armv8-unknown-linux-android -emit-llvm -target-cpu generic -Os -fcxx-exceptions -o - -x c++ %s | FileCheck --check-prefixes=CHECK,A16 %s
+// RUN: %clang_cc1 -triple armv8-arm-none-eabi -emit-llvm -target-cpu generic -Os -fcxx-exceptions -o - -x c++ %s | FileCheck --check-prefixes=CHECK,A8 %s
+// RUN: %clang_cc1 -triple armv8-unknown-linux-android -emit-llvm -target-cpu generic -Os -fcxx-exceptions -o - -x c++ %s | FileCheck --check-prefixes=CHECK,A16 %s
 
-// CHECK: [[E:%[A-z0-9]+]] = tail call i8* @__cxa_allocate_exception
-// CHECK-NEXT: [[BC:%[A-z0-9]+]] = bitcast i8* [[E]] to <2 x i64>*
-// A8-NEXT: store <2 x i64> <i64 1, i64 2>, <2 x i64>* [[BC]], align 8
-// A16-NEXT: store <2 x i64> <i64 1, i64 2>, <2 x i64>* [[BC]], align 16
+// CHECK: [[E:%[A-z0-9]+]] = tail call ptr @__cxa_allocate_exception
+// A8-NEXT: store <2 x i64> <i64 1, i64 2>, ptr [[E]], align 8
+// A16-NEXT: store <2 x i64> <i64 1, i64 2>, ptr [[E]], align 16
 #include <arm_neon.h>
 
 int main(void) {

diff  --git a/clang/test/CodeGenCXX/PR19955.cpp b/clang/test/CodeGenCXX/PR19955.cpp
index afaf056005f92..808199cd64345 100644
--- a/clang/test/CodeGenCXX/PR19955.cpp
+++ b/clang/test/CodeGenCXX/PR19955.cpp
@@ -1,27 +1,27 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-msvc -fms-extensions -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-msvc -fms-extensions -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s | FileCheck %s --check-prefix X64
+// RUN: %clang_cc1 -triple i686-windows-msvc -fms-extensions -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -fms-extensions -fno-rtti -emit-llvm -std=c++1y -O0 -o - %s | FileCheck %s --check-prefix X64
 
 extern int __declspec(dllimport) var;
 extern void __declspec(dllimport) fun();
 
 extern int *varp;
 int *varp = &var;
-// CHECK-DAG: @"?varp@@3PAHA" = dso_local global i32* null
-// X64-DAG: @"?varp@@3PEAHEA" = dso_local global i32* null
+// CHECK-DAG: @"?varp@@3PAHA" = dso_local global ptr null
+// X64-DAG: @"?varp@@3PEAHEA" = dso_local global ptr null
 
 extern void (*funp)();
 void (*funp)() = &fun;
-// CHECK-DAG: @"?funp@@3P6AXXZA" = dso_local global void ()* null
-// X64-DAG: @"?funp@@3P6AXXZEA" = dso_local global void ()* null
+// CHECK-DAG: @"?funp@@3P6AXXZA" = dso_local global ptr null
+// X64-DAG: @"?funp@@3P6AXXZEA" = dso_local global ptr null
 
 // CHECK-LABEL: @"??__Evarp@@YAXXZ"
-// CHECK-DAG: store i32* @"?var@@3HA", i32** @"?varp@@3PAHA"
+// CHECK-DAG: store ptr @"?var@@3HA", ptr @"?varp@@3PAHA"
 
 // X64-LABEL: @"??__Evarp@@YAXXZ"
-// X64-DAG: store i32* @"?var@@3HA", i32** @"?varp@@3PEAHEA"
+// X64-DAG: store ptr @"?var@@3HA", ptr @"?varp@@3PEAHEA"
 
 // CHECK-LABEL: @"??__Efunp@@YAXXZ"()
-// CHECK-DAG: store void ()* @"?fun@@YAXXZ", void ()** @"?funp@@3P6AXXZA"
+// CHECK-DAG: store ptr @"?fun@@YAXXZ", ptr @"?funp@@3P6AXXZA"
 
 // X64-LABEL: @"??__Efunp@@YAXXZ"()
-// X64-DAG: store void ()* @"?fun@@YAXXZ", void ()** @"?funp@@3P6AXXZEA"
+// X64-DAG: store ptr @"?fun@@YAXXZ", ptr @"?funp@@3P6AXXZEA"

diff  --git a/clang/test/CodeGenCXX/PR26569.cpp b/clang/test/CodeGenCXX/PR26569.cpp
index 5d05752a8d192..3cb4bb23cb812 100644
--- a/clang/test/CodeGenCXX/PR26569.cpp
+++ b/clang/test/CodeGenCXX/PR26569.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-pc-win32 -fms-extensions -emit-llvm -O1 -disable-llvm-passes %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i686-pc-win32 -fms-extensions -emit-llvm -O1 -disable-llvm-passes %s -o - | FileCheck %s
 
 class __declspec(dllimport) A {
   virtual void m_fn1();
@@ -9,12 +9,12 @@ class B : virtual A {};
 extern template class __declspec(dllimport) B<int>;
 class __declspec(dllexport) C : B<int> {};
 
-// CHECK-DAG: @[[VTABLE_C:.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast (%rtti.CompleteObjectLocator* @"??_R4C@@6B@" to i8*), i8* bitcast (void (%class.A*)* @"?m_fn1 at A@@EAEXXZ" to i8*)] }
-// CHECK-DAG: @[[VTABLE_B:.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast (%rtti.CompleteObjectLocator* @"??_R4?$B at H@@6B@" to i8*), i8* bitcast (void (%class.A*)* @"?m_fn1 at A@@EAEXXZ" to i8*)] }, comdat($"??_S?$B at H@@6B@")
-// CHECK-DAG: @[[VTABLE_A:.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast (%rtti.CompleteObjectLocator* @"??_R4A@@6B@" to i8*), i8* bitcast (void (%class.A*)* @"?m_fn1 at A@@EAEXXZ" to i8*)] }, comdat($"??_SA@@6B@")
+// CHECK-DAG: @[[VTABLE_C:.*]] = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4C@@6B@", ptr @"?m_fn1 at A@@EAEXXZ"] }
+// CHECK-DAG: @[[VTABLE_B:.*]] = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4?$B at H@@6B@", ptr @"?m_fn1 at A@@EAEXXZ"] }, comdat($"??_S?$B at H@@6B@")
+// CHECK-DAG: @[[VTABLE_A:.*]] = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4A@@6B@", ptr @"?m_fn1 at A@@EAEXXZ"] }, comdat($"??_SA@@6B@")
 
-// CHECK-DAG: @"??_7C@@6B@" = dllexport unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* @[[VTABLE_C]], i32 0, i32 0, i32 1)
-// CHECK-DAG: @"??_S?$B at H@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* @[[VTABLE_B]], i32 0, i32 0, i32 1)
-// CHECK-DAG: @"??_SA@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* @[[VTABLE_A]], i32 0, i32 0, i32 1)
+// CHECK-DAG: @"??_7C@@6B@" = dllexport unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr @[[VTABLE_C]], i32 0, i32 0, i32 1)
+// CHECK-DAG: @"??_S?$B at H@@6B@" = unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr @[[VTABLE_B]], i32 0, i32 0, i32 1)
+// CHECK-DAG: @"??_SA@@6B@" = unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr @[[VTABLE_A]], i32 0, i32 0, i32 1)
 
 // CHECK-DAG: @"??_8?$B at H@@7B@" = available_externally dllimport unnamed_addr constant [2 x i32] [i32 0, i32 4]

diff  --git a/clang/test/CodeGenCXX/PR28523.cpp b/clang/test/CodeGenCXX/PR28523.cpp
index 7d18e3224da30..3d467ab7dc45a 100644
--- a/clang/test/CodeGenCXX/PR28523.cpp
+++ b/clang/test/CodeGenCXX/PR28523.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -verify -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -verify -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
 // expected-no-diagnostics
 
 template <class F> void parallel_loop(F &&f) { f(0); }
@@ -8,7 +8,7 @@ int main() {
 // CHECK: [[X_ADDR:%.+]] = alloca i32,
   int x;
 // CHECK: getelementptr inbounds
-// CHECK: store i32* [[X_ADDR]], i32** %
+// CHECK: store ptr [[X_ADDR]], ptr %
 // CHECK: call
   parallel_loop([&](auto y) {
 #pragma clang __debug captured

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/child-inheritted-from-parent-in-comdat.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/child-inheritted-from-parent-in-comdat.cpp
index e55fb3f12c123..c3a7a33f1fec4 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/child-inheritted-from-parent-in-comdat.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/child-inheritted-from-parent-in-comdat.cpp
@@ -1,7 +1,7 @@
 // Cross comdat example
 // Parent VTable is in a comdat section.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
 
 // The inline function is emitted in each module with the same comdat
 // CHECK: $_ZTS1A = comdat any
@@ -13,15 +13,15 @@
 // CHECK: $_ZTI1A.rtti_proxy = comdat any
 
 // The VTable for B is emitted here since it has a key function which is defined in this module
-// CHECK: @_ZTV1B.local = private unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8*, i8* }** @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.B*)* dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
+// CHECK: @_ZTV1B.local = private unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
 
 // The VTable for A is emitted here and in a comdat section since it has no key function, and is used in this module when creating an instance of A (in func()).
-// CHECK: @_ZTV1A.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8* }** @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1A), align 4
+// CHECK: @_ZTV1A.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1A), align 4
 
-// CHECK: @_ZTV1B ={{.*}} unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1B.local
-// CHECK: @_ZTV1A = linkonce_odr unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1A.local
+// CHECK: @_ZTV1B ={{.*}} unnamed_addr alias { [3 x i32] }, ptr @_ZTV1B.local
+// CHECK: @_ZTV1A = linkonce_odr unnamed_addr alias { [3 x i32] }, ptr @_ZTV1A.local
 
-// CHECK:      define{{.*}} void @_ZN1B3fooEv(%class.B* {{.*}}%this) unnamed_addr
+// CHECK:      define{{.*}} void @_ZN1B3fooEv(ptr {{.*}}%this) unnamed_addr
 // CHECK-NEXT: entry:
 // CHECK-NEXT:   ret void
 // CHECK-NEXT: }

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/child-vtable-in-comdat.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/child-vtable-in-comdat.cpp
index db40d6509085e..f7d7bc0e94a08 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/child-vtable-in-comdat.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/child-vtable-in-comdat.cpp
@@ -1,7 +1,7 @@
 // Cross comdat example
 // Child VTable is in a comdat section.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm | FileCheck %s
 
 // A comdat is emitted for B but not A
 // CHECK-DAG: $_ZTV1B = comdat any
@@ -11,18 +11,18 @@
 // CHECK-DAG: $_ZTI1A.rtti_proxy = comdat any
 
 // VTable for B is emitted here since we access it when creating an instance of B. The VTable is also linkonce_odr and in its own comdat.
-// CHECK-DAG: @_ZTV1B.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8*, i8* }** @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.B*)* dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1B), align 4
+// CHECK-DAG: @_ZTV1B.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1B), align 4
 
 // The RTTI objects aren’t that important, but it is good to know that they are emitted here since they are used in the vtable for B, and external references are used for RTTI stuff from A.
-// CHECK-DAG: @_ZTVN10__cxxabiv120__si_class_type_infoE = external global i8*
+// CHECK-DAG: @_ZTVN10__cxxabiv120__si_class_type_infoE = external global ptr
 // CHECK-DAG: @_ZTS1B =
 // CHECK-DAG: @_ZTI1A =
 // CHECK-DAG: @_ZTI1B =
-// CHECK-DAG: @_ZTI1B.rtti_proxy = hidden unnamed_addr constant { i8*, i8*, i8* }* @_ZTI1B, comdat
+// CHECK-DAG: @_ZTI1B.rtti_proxy = hidden unnamed_addr constant ptr @_ZTI1B, comdat
 
 // We will emit a vtable for B here, so it does have an alias, but we will not
 // emit one for A.
-// CHECK: @_ZTV1B = linkonce_odr unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1B.local
+// CHECK: @_ZTV1B = linkonce_odr unnamed_addr alias { [3 x i32] }, ptr @_ZTV1B.local
 // CHECK-NOT: @_ZTV1A = {{.*}}alias
 
 class A {

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-1.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-1.cpp
index 3810df04857f4..0d482c353b046 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-1.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-1.cpp
@@ -1,14 +1,14 @@
 // Check the vtable layout for classes with key functions defined in 
diff erent
 // translation units. This TU only manifests the vtable for A.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
 
 #include "cross-tu-header.h"
 
 // CHECK: $_ZTI1A.rtti_proxy = comdat any
 
-// CHECK: @_ZTV1A.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8* }** @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3barEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
-// @_ZTV1A ={{.*}} unnamed_addr alias { [4 x i32] }, { [4 x i32] }* @_ZTV1A.local
+// CHECK: @_ZTV1A.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3barEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
+// @_ZTV1A ={{.*}} unnamed_addr alias { [4 x i32] }, ptr @_ZTV1A.local
 
 void A::foo() {}
 void A_foo(A *a) { a->foo(); }

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-2.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-2.cpp
index 30aef852cad1d..e09ba014bcd42 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-2.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/cross-translation-unit-2.cpp
@@ -1,22 +1,22 @@
 // Check the vtable layout for classes with key functions defined in 
diff erent
 // translation units. This TU manifests the vtable for B.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
 
 #include "cross-tu-header.h"
 
 // CHECK: $_ZTI1B.rtti_proxy = comdat any
 
-// CHECK: @_ZTV1B.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8*, i8* }** @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.B*)* dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3barEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
-// CHECK: @_ZTV1B ={{.*}} unnamed_addr alias { [4 x i32] }, { [4 x i32] }* @_ZTV1B.local
+// CHECK: @_ZTV1B.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3barEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
+// CHECK: @_ZTV1B ={{.*}} unnamed_addr alias { [4 x i32] }, ptr @_ZTV1B.local
 
 // A::bar() is defined outside of the module that defines the vtable for A
-// CHECK:      define{{.*}} void @_ZN1A3barEv(%class.A* {{.*}}%this) unnamed_addr
+// CHECK:      define{{.*}} void @_ZN1A3barEv(ptr {{.*}}%this) unnamed_addr
 // CHECK-NEXT: entry:
 // CHECK-NEXT:   ret void
 // CHECK-NEXT: }
 
-// CHECK:      define{{.*}} void @_ZN1B3fooEv(%class.B* {{.*}}%this) unnamed_addr
+// CHECK:      define{{.*}} void @_ZN1B3fooEv(ptr {{.*}}%this) unnamed_addr
 // CHECK-NEXT: entry:
 // CHECK-NEXT:   ret void
 // CHECK-NEXT: }

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/inheritted-virtual-function.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/inheritted-virtual-function.cpp
index e272bd57a9f00..877d496b09ac9 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/inheritted-virtual-function.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/inheritted-virtual-function.cpp
@@ -1,7 +1,7 @@
 // Check the layout of the vtable for a child class that inherits a virtual
 // function but does not override it.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
 
 class A {
 public:
@@ -9,8 +9,8 @@ class A {
 };
 
 // The VTable for B should look similar to the vtable for A but the component for foo() should point to A::foo() and the component for bar() should point to B::bar().
-// CHECK: @_ZTV1B.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8*, i8* }** @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.B*)* dso_local_equivalent @_ZN1B3barEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
-// CHECK: @_ZTV1B ={{.*}} unnamed_addr alias { [4 x i32] }, { [4 x i32] }* @_ZTV1B.local
+// CHECK: @_ZTV1B.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1B3barEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
+// CHECK: @_ZTV1B ={{.*}} unnamed_addr alias { [4 x i32] }, ptr @_ZTV1B.local
 
 class B : public A {
 public:

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/inline-virtual-function.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/inline-virtual-function.cpp
index 3e381fe6b5cb4..e1af2f36d6dfb 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/inline-virtual-function.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/inline-virtual-function.cpp
@@ -1,14 +1,14 @@
 // The VTable is not in a comdat but the inline methods are.
 // This doesn’t affect the vtable or the stubs we emit.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64 -O1 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables -fhalf-no-semantic-interposition | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64 -O1 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables -fhalf-no-semantic-interposition | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64 -O1 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables -fhalf-no-semantic-interposition | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64 -O1 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables -fhalf-no-semantic-interposition | FileCheck %s
 
 // CHECK: $_ZTI1A.rtti_proxy = comdat any
 
 // The vtable has a key function (A::foo()) so it does not have a comdat
-// CHECK: @_ZTV1A.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8* }** @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3barEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
-// CHECK: @_ZTV1A ={{.*}} unnamed_addr alias { [4 x i32] }, { [4 x i32] }* @_ZTV1A.local
+// CHECK: @_ZTV1A.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3barEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
+// CHECK: @_ZTV1A ={{.*}} unnamed_addr alias { [4 x i32] }, ptr @_ZTV1A.local
 
 class A {
 public:

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/inlined-key-function.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/inlined-key-function.cpp
index 948a3dd636596..c542290de5f71 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/inlined-key-function.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/inlined-key-function.cpp
@@ -1,7 +1,7 @@
 // Inline comdat method definition example.
 // The VTable is in a comdat and defined anywhere the inline definition is.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm | FileCheck %s
 
 // CHECK: $_ZTV1A = comdat any
 // CHECK: $_ZTS1A = comdat any
@@ -9,8 +9,8 @@
 // CHECK: $_ZTI1A.rtti_proxy = comdat any
 
 // The VTable is linkonce_odr and in a comdat here bc it’s key function is inline defined.
-// CHECK: @_ZTV1A.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8* }** @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1A), align 4
-// CHECK: @_ZTV1A = linkonce_odr unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1A.local
+// CHECK: @_ZTV1A.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1A), align 4
+// CHECK: @_ZTV1A = linkonce_odr unnamed_addr alias { [3 x i32] }, ptr @_ZTV1A.local
 
 class A {
 public:

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/member-function-pointer.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/member-function-pointer.cpp
index e379a2d2b242c..24f884a8d23be 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/member-function-pointer.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/member-function-pointer.cpp
@@ -1,32 +1,28 @@
 // Member pointer to virtual function.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -O3 -S -o - -emit-llvm | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O3 -S -o - -emit-llvm | FileCheck %s
 
-// CHECK:      define{{.*}} void @_Z4funcP1AMS_FvvE(%class.A* noundef %a, [2 x i64] %fn.coerce) local_unnamed_addr
+// CHECK:      define{{.*}} void @_Z4funcP1AMS_FvvE(ptr noundef %a, [2 x i64] %fn.coerce) local_unnamed_addr
 // CHECK-NEXT: entry:
 // CHECK-NEXT:   [[fn_ptr:%.+]] = extractvalue [2 x i64] %fn.coerce, 0
 // CHECK-NEXT:   [[adjust:%.+]] = extractvalue [2 x i64] %fn.coerce, 1
-// CHECK-NEXT:   [[this:%.+]] = bitcast %class.A* %a to i8*
-// CHECK-NEXT:   [[this_adj:%.+]] = getelementptr inbounds i8, i8* [[this]], i64 [[adjust]]
+// CHECK-NEXT:   [[this_adj:%.+]] = getelementptr inbounds i8, ptr %a, i64 [[adjust]]
 // CHECK-NEXT:   [[virtbit:%.+]] = and i64 [[fn_ptr]], 1
 // CHECK-NEXT:   [[isvirt:%.+]] = icmp eq i64 [[virtbit]], 0
 // CHECK-NEXT:   br i1 [[isvirt]], label %[[nonvirt:.+]], label %[[virt:.+]]
 // CHECK:      [[virt]]:
 
 // The loading of the virtual function here should be replaced with a llvm.load.relative() call.
-// CHECK-NEXT:   [[this:%.+]] = bitcast i8* [[this_adj]] to i8**
-// CHECK-NEXT:   [[vtable:%.+]] = load i8*, i8** [[this]], align 8
+// CHECK-NEXT:   [[vtable:%.+]] = load ptr, ptr [[this_adj]], align 8
 // CHECK-NEXT:   [[offset:%.+]] = add i64 [[fn_ptr]], -1
-// CHECK-NEXT:   [[ptr:%.+]] = tail call i8* @llvm.load.relative.i64(i8* [[vtable]], i64 [[offset]])
-// CHECK-NEXT:   [[method:%.+]] = bitcast i8* [[ptr]] to void (%class.A*)*
+// CHECK-NEXT:   [[ptr:%.+]] = tail call ptr @llvm.load.relative.i64(ptr [[vtable]], i64 [[offset]])
 // CHECK-NEXT:   br label %[[memptr_end:.+]]
 // CHECK:      [[nonvirt]]:
-// CHECK-NEXT:   [[method2:%.+]] = inttoptr i64 [[fn_ptr]] to void (%class.A*)*
+// CHECK-NEXT:   [[method2:%.+]] = inttoptr i64 [[fn_ptr]] to ptr
 // CHECK-NEXT:   br label %[[memptr_end]]
 // CHECK:      [[memptr_end]]:
-// CHECK-NEXT:   [[method3:%.+]] = phi void (%class.A*)* [ [[method]], %[[virt]] ], [ [[method2]], %[[nonvirt]] ]
-// CHECK-NEXT:   [[a:%.+]] = bitcast i8* [[this_adj]] to %class.A*
-// CHECK-NEXT:   tail call void [[method3]](%class.A* {{[^,]*}} [[a]])
+// CHECK-NEXT:   [[method3:%.+]] = phi ptr [ [[ptr]], %[[virt]] ], [ [[method2]], %[[nonvirt]] ]
+// CHECK-NEXT:   tail call void [[method3]](ptr {{[^,]*}} [[this_adj]])
 // CHECK-NEXT:   ret void
 // CHECK-NEXT: }
 

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/no-alias-when-dso-local.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/no-alias-when-dso-local.cpp
index b42d90d85cee4..b2013b34948ec 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/no-alias-when-dso-local.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/no-alias-when-dso-local.cpp
@@ -1,11 +1,11 @@
 // Check that no alias is emitted when the vtable is already dso_local. This can
 // happen if the class is hidden.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s --check-prefix=DEFAULT-VIS
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm -fvisibility=hidden | FileCheck %s --check-prefix=HIDDEN-VIS
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s --check-prefix=DEFAULT-VIS
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm -fvisibility=hidden | FileCheck %s --check-prefix=HIDDEN-VIS
 
 // DEFAULT-VIS: @_ZTV1A.local = private unnamed_addr constant
-// DEFAULT-VIS: @_ZTV1A ={{.*}} unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1A.local
+// DEFAULT-VIS: @_ZTV1A ={{.*}} unnamed_addr alias { [3 x i32] }, ptr @_ZTV1A.local
 // HIDDEN-VIS-NOT: @_ZTV1A.local
 // HIDDEN-VIS: @_ZTV1A = hidden unnamed_addr constant
 class A {

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/override-pure-virtual-method.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/override-pure-virtual-method.cpp
index 351937c60df06..2ddcf33d14192 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/override-pure-virtual-method.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/override-pure-virtual-method.cpp
@@ -2,14 +2,14 @@
 // We instead emit zero for the pure virtual function component. See PR43094 for
 // details.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
 
-// CHECK: @_ZTV1A.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8* }** @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 0, i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3barEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
+// CHECK: @_ZTV1A.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3barEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
 
-// CHECK: @_ZTV1B.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8*, i8* }** @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.B*)* dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.B*)* dso_local_equivalent @_ZN1B3barEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
+// CHECK: @_ZTV1B.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1B3barEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
 
-// CHECK: @_ZTV1A ={{.*}} unnamed_addr alias { [4 x i32] }, { [4 x i32] }* @_ZTV1A.local
-// CHECK: @_ZTV1B ={{.*}} unnamed_addr alias { [4 x i32] }, { [4 x i32] }* @_ZTV1B.local
+// CHECK: @_ZTV1A ={{.*}} unnamed_addr alias { [4 x i32] }, ptr @_ZTV1A.local
+// CHECK: @_ZTV1B ={{.*}} unnamed_addr alias { [4 x i32] }, ptr @_ZTV1B.local
 
 // CHECK-NOT: declare void @__cxa_pure_virtual() unnamed_addr
 

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/overriden-virtual-function.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/overriden-virtual-function.cpp
index 02340a4bcd102..fe8cd7e63847c 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/overriden-virtual-function.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/overriden-virtual-function.cpp
@@ -1,11 +1,11 @@
 // Check the layout of the vtable for a child class that inherits a virtual
 // function but does override it.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
 
-// CHECK: @_ZTV1B.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8*, i8* }** @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.B*)* dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.B*)* dso_local_equivalent @_ZN1B3barEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [4 x i32] }, { [4 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
+// CHECK: @_ZTV1B.local = private unnamed_addr constant { [4 x i32] } { [4 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1B3barEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [4 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
 
-// CHECK: @_ZTV1B ={{.*}} unnamed_addr alias { [4 x i32] }, { [4 x i32] }* @_ZTV1B.local
+// CHECK: @_ZTV1B ={{.*}} unnamed_addr alias { [4 x i32] }, ptr @_ZTV1B.local
 
 class A {
 public:

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/parent-and-child-in-comdats.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/parent-and-child-in-comdats.cpp
index 42aa0c80f97f4..995510f92dc94 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/parent-and-child-in-comdats.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/parent-and-child-in-comdats.cpp
@@ -1,8 +1,8 @@
 // Cross comdat example
 // Both the parent and child VTablea are in their own comdat sections.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables | FileCheck %s
 
 // Comdats are emitted for both A and B in this module and for their respective implementations of foo().
 // CHECK: $_ZN1A3fooEv = comdat any
@@ -17,18 +17,18 @@
 // CHECK: $_ZTI1B.rtti_proxy = comdat any
 
 // Both the vtables for A and B are emitted and in their own comdats.
-// CHECK: @_ZTV1A.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8* }** @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1A), align 4
-// CHECK: @_ZTV1B.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8*, i8* }** @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.B*)* dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1B), align 4
+// CHECK: @_ZTV1A.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1A), align 4
+// CHECK: @_ZTV1B.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1B.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1B3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1B.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1B), align 4
 
-// CHECK: @_ZTV1A = linkonce_odr unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1A.local
-// CHECK: @_ZTV1B = linkonce_odr unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1B.local
+// CHECK: @_ZTV1A = linkonce_odr unnamed_addr alias { [3 x i32] }, ptr @_ZTV1A.local
+// CHECK: @_ZTV1B = linkonce_odr unnamed_addr alias { [3 x i32] }, ptr @_ZTV1B.local
 
-// CHECK: declare void @_Z5A_fooP1A(%class.A* noundef)
+// CHECK: declare void @_Z5A_fooP1A(ptr noundef)
 
 // The stubs and implementations for foo() are in their own comdat sections.
-// CHECK:      define linkonce_odr void @_ZN1A3fooEv(%class.A* {{.*}}%this) unnamed_addr #{{[0-9]+}} comdat
+// CHECK:      define linkonce_odr void @_ZN1A3fooEv(ptr {{.*}}%this) unnamed_addr #{{[0-9]+}} comdat
 
-// CHECK:      define linkonce_odr void @_ZN1B3fooEv(%class.B* {{.*}}%this) unnamed_addr #{{[0-9]+}} comdat
+// CHECK:      define linkonce_odr void @_ZN1B3fooEv(ptr {{.*}}%this) unnamed_addr #{{[0-9]+}} comdat
 
 class A {
 public:

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/parent-vtable-in-comdat.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/parent-vtable-in-comdat.cpp
index df03617b26ba9..f9e3382c489b4 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/parent-vtable-in-comdat.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/parent-vtable-in-comdat.cpp
@@ -1,8 +1,8 @@
 // Cross comdat example
 // Parent VTable is in a comdat section.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64 -S -o - -emit-llvm -fexperimental-relative-c++-abi-vtables | FileCheck %s
 
 // A::foo() has a comdat since it is an inline function
 // CHECK: $_ZN1A3fooEv = comdat any
@@ -14,14 +14,14 @@
 // CHECK: $_ZTI1A.rtti_proxy = comdat any
 
 // The VTable for A is emitted here and in a comdat section since it has no key function, and is used in this module when creating an instance of A.
-// CHECK: @_ZTV1A.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8* }** @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1A), align 4
-// CHECK: @_ZTVN10__cxxabiv117__class_type_infoE = external global i8*
+// CHECK: @_ZTV1A.local = linkonce_odr hidden unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, comdat($_ZTV1A), align 4
+// CHECK: @_ZTVN10__cxxabiv117__class_type_infoE = external global ptr
 // CHECK: @_ZTS1A = linkonce_odr constant [3 x i8] c"1A\00", comdat, align 1
-// CHECK: @_ZTI1A = linkonce_odr constant { i8*, i8* } { i8* getelementptr inbounds (i8, i8* bitcast (i8** @_ZTVN10__cxxabiv117__class_type_infoE to i8*), i32 8), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1A, i32 0, i32 0) }, comdat, align 8
-// CHECK: @_ZTI1A.rtti_proxy = hidden unnamed_addr constant { i8*, i8* }* @_ZTI1A, comdat
-// CHECK: @_ZTV1A = linkonce_odr unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1A.local
+// CHECK: @_ZTI1A = linkonce_odr constant { ptr, ptr } { ptr getelementptr inbounds (i8, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i32 8), ptr @_ZTS1A }, comdat, align 8
+// CHECK: @_ZTI1A.rtti_proxy = hidden unnamed_addr constant ptr @_ZTI1A, comdat
+// CHECK: @_ZTV1A = linkonce_odr unnamed_addr alias { [3 x i32] }, ptr @_ZTV1A.local
 
-// CHECK:      define linkonce_odr void @_ZN1A3fooEv(%class.A* {{.*}}%this) unnamed_addr #{{[0-9]+}} comdat
+// CHECK:      define linkonce_odr void @_ZN1A3fooEv(ptr {{.*}}%this) unnamed_addr #{{[0-9]+}} comdat
 
 class A {
 public:

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/relative-vtables-flag.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/relative-vtables-flag.cpp
index d2dcf20d61eaf..3dc2b740af0a3 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/relative-vtables-flag.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/relative-vtables-flag.cpp
@@ -3,13 +3,13 @@
 // of a soft incremental rollout. This ABI should only be used if the flag for
 // it is passed on Fuchsia.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck --check-prefix=RELATIVE-ABI %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm -fno-experimental-relative-c++-abi-vtables | FileCheck --check-prefix=DEFAULT-ABI %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck --check-prefix=RELATIVE-ABI %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm -fno-experimental-relative-c++-abi-vtables | FileCheck --check-prefix=DEFAULT-ABI %s
 
 // VTable contains offsets and references to the hidden symbols
-// RELATIVE-ABI: @_ZTV1A.local = private unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8* }** @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
-// RELATIVE-ABI: @_ZTV1A ={{.*}} unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1A.local
-// DEFAULT-ABI: @_ZTV1A ={{.*}} unnamed_addr constant { [3 x i8*] } { [3 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast (void (%class.A*)* @_ZN1A3fooEv to i8*)] }, align 8
+// RELATIVE-ABI: @_ZTV1A.local = private unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
+// RELATIVE-ABI: @_ZTV1A ={{.*}} unnamed_addr alias { [3 x i32] }, ptr @_ZTV1A.local
+// DEFAULT-ABI: @_ZTV1A ={{.*}} unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN1A3fooEv] }, align 8
 
 class A {
 public:

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/simple-vtable-definition.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/simple-vtable-definition.cpp
index dbde7f66e1531..a59d47dc816c0 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/simple-vtable-definition.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/simple-vtable-definition.cpp
@@ -1,6 +1,6 @@
 // Check the layout of the vtable for a normal class.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -O1 -S -o - -emit-llvm -fhalf-no-semantic-interposition | FileCheck %s
 
 // We should be emitting comdats for each of the virtual function RTTI proxies
 // CHECK: $_ZTI1A.rtti_proxy = comdat any
@@ -8,16 +8,16 @@
 // VTable contains offsets and references to the hidden symbols
 // The vtable definition itself is private so we can take relative references to
 // it. The vtable symbol will be exposed through a public alias.
-// CHECK: @_ZTV1A.local = private unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint ({ i8*, i8* }** @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (void (%class.A*)* dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (i32* getelementptr inbounds ({ [3 x i32] }, { [3 x i32] }* @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
-// CHECK: @_ZTVN10__cxxabiv117__class_type_infoE = external global i8*
+// CHECK: @_ZTV1A.local = private unnamed_addr constant { [3 x i32] } { [3 x i32] [i32 0, i32 trunc (i64 sub (i64 ptrtoint (ptr @_ZTI1A.rtti_proxy to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint (ptr dso_local_equivalent @_ZN1A3fooEv to i64), i64 ptrtoint (ptr getelementptr inbounds ({ [3 x i32] }, ptr @_ZTV1A.local, i32 0, i32 0, i32 2) to i64)) to i32)] }, align 4
+// CHECK: @_ZTVN10__cxxabiv117__class_type_infoE = external global ptr
 // CHECK: @_ZTS1A ={{.*}} constant [3 x i8] c"1A\00", align 1
-// CHECK: @_ZTI1A ={{.*}} constant { i8*, i8* } { i8* getelementptr inbounds (i8, i8* bitcast (i8** @_ZTVN10__cxxabiv117__class_type_infoE to i8*), i32 8), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1A, i32 0, i32 0) }, align 8
+// CHECK: @_ZTI1A ={{.*}} constant { ptr, ptr } { ptr getelementptr inbounds (i8, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i32 8), ptr @_ZTS1A }, align 8
 
 // The rtti should be in a comdat
-// CHECK: @_ZTI1A.rtti_proxy = hidden unnamed_addr constant { i8*, i8* }* @_ZTI1A, comdat
+// CHECK: @_ZTI1A.rtti_proxy = hidden unnamed_addr constant ptr @_ZTI1A, comdat
 
 // The vtable symbol is exposed through an alias.
-// @_ZTV1A = dso_local unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1A.local
+// @_ZTV1A = dso_local unnamed_addr alias { [3 x i32] }, ptr @_ZTV1A.local
 
 class A {
 public:

diff  --git a/clang/test/CodeGenCXX/RelativeVTablesABI/vtable-hidden-when-in-comdat.cpp b/clang/test/CodeGenCXX/RelativeVTablesABI/vtable-hidden-when-in-comdat.cpp
index 4124dd83cfe09..1852b0c151d55 100644
--- a/clang/test/CodeGenCXX/RelativeVTablesABI/vtable-hidden-when-in-comdat.cpp
+++ b/clang/test/CodeGenCXX/RelativeVTablesABI/vtable-hidden-when-in-comdat.cpp
@@ -2,10 +2,10 @@
 // is not dso_local. The vtable will need to be hidden and not private so it can
 // be used as acomdat key signature.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm | FileCheck %s
+// RUN: %clang_cc1 %s -triple=aarch64-unknown-fuchsia -S -o - -emit-llvm | FileCheck %s
 
 // CHECK: @_ZTV1B.local = linkonce_odr hidden unnamed_addr constant
-// CHECK: @_ZTV1B = linkonce_odr unnamed_addr alias { [3 x i32] }, { [3 x i32] }* @_ZTV1B.local
+// CHECK: @_ZTV1B = linkonce_odr unnamed_addr alias { [3 x i32] }, ptr @_ZTV1B.local
 
 // The VTable will be in a comdat here since it has no key function.
 class B {

diff  --git a/clang/test/CodeGenCXX/aarch64-cxxabi.cpp b/clang/test/CodeGenCXX/aarch64-cxxabi.cpp
index d005a419354db..812058bc04166 100644
--- a/clang/test/CodeGenCXX/aarch64-cxxabi.cpp
+++ b/clang/test/CodeGenCXX/aarch64-cxxabi.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple arm64-none-linux-gnu -emit-llvm -w -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-none-linux-gnu -emit-llvm -w -o - %s | FileCheck %s
 
 // Check 
diff erences between the generic Itanium ABI, the AArch32 version and
 // the AArch64 version.
@@ -44,8 +44,8 @@ void guard_variables(int a) {
 // CHECK: icmp eq i8 [[GUARDBIT]], 0
 
   // As guards are 64-bit, these helpers should take 64-bit pointers.
-// CHECK: call i32 @__cxa_guard_acquire(i64*
-// CHECK: call void @__cxa_guard_release(i64*
+// CHECK: call i32 @__cxa_guard_acquire(ptr
+// CHECK: call void @__cxa_guard_release(ptr
 }
 
 ////////////////////////////////////////////////////////////////////////////////

diff  --git a/clang/test/CodeGenCXX/address-space-of-this.cpp b/clang/test/CodeGenCXX/address-space-of-this.cpp
index cfa3da09596fe..2de7b4c948edc 100644
--- a/clang/test/CodeGenCXX/address-space-of-this.cpp
+++ b/clang/test/CodeGenCXX/address-space-of-this.cpp
@@ -8,5 +8,5 @@ struct MyType {
   MyType(int i) __attribute__((address_space(10))) : i(i) {}
   int i;
 };
-//CHECK: call void @_ZN6MyTypeC1Ei(%struct.MyType* addrspacecast (%struct.MyType addrspace(10)* @m to %struct.MyType*), i32 123)
+//CHECK: call void @_ZN6MyTypeC1Ei(ptr addrspacecast (ptr addrspace(10) @m to ptr), i32 123)
 MyType __attribute__((address_space(10))) m = 123;

diff  --git a/clang/test/CodeGenCXX/address-space-ref.cpp b/clang/test/CodeGenCXX/address-space-ref.cpp
index ef5f2886726f6..9f2dead9e82ae 100644
--- a/clang/test/CodeGenCXX/address-space-ref.cpp
+++ b/clang/test/CodeGenCXX/address-space-ref.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++11 -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK,NULL-INVALID
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++11 -triple=x86_64-apple-darwin10 -fno-delete-null-pointer-checks -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK,NULL-VALID
+// RUN: %clang_cc1 %s -std=c++11 -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK,NULL-INVALID
+// RUN: %clang_cc1 %s -std=c++11 -triple=x86_64-apple-darwin10 -fno-delete-null-pointer-checks -emit-llvm -o - | FileCheck %s -check-prefixes=CHECK,NULL-VALID
 
 // For a reference to a complete type, output the dereferenceable attribute (in
 // any address space).
@@ -10,7 +10,7 @@ a & foo(a &x, a & y) {
   return x;
 }
 
-// CHECK: define{{.*}} align 4 dereferenceable(4) i32 addrspace(1)* @_Z3fooRU3AS1iS0_(i32 addrspace(1)* noundef align 4 dereferenceable(4) %x, i32 addrspace(1)* noundef align 4 dereferenceable(4) %y)
+// CHECK: define{{.*}} align 4 dereferenceable(4) ptr addrspace(1) @_Z3fooRU3AS1iS0_(ptr addrspace(1) noundef align 4 dereferenceable(4) %x, ptr addrspace(1) noundef align 4 dereferenceable(4) %y)
 
 // For a reference to an incomplete type in an alternate address space, output
 // neither dereferenceable nor nonnull.
@@ -22,7 +22,7 @@ b & bar(b &x, b & y) {
   return x;
 }
 
-// CHECK: define{{.*}} align 1 %class.bc addrspace(1)* @_Z3barRU3AS12bcS1_(%class.bc addrspace(1)* noundef align 1 %x, %class.bc addrspace(1)* noundef align 1 %y)
+// CHECK: define{{.*}} align 1 ptr addrspace(1) @_Z3barRU3AS12bcS1_(ptr addrspace(1) noundef align 1 %x, ptr addrspace(1) noundef align 1 %y)
 
 // For a reference to an incomplete type in addrspace(0), output nonnull.
 
@@ -30,7 +30,7 @@ bc & bar2(bc &x, bc & y) {
   return x;
 }
 
-// NULL-INVALID: define{{.*}} nonnull align 1 %class.bc* @_Z4bar2R2bcS0_(%class.bc* noundef nonnull align 1 %x, %class.bc* noundef nonnull align 1 %y)
-// NULL-VALID: define{{.*}} align 1 %class.bc* @_Z4bar2R2bcS0_(%class.bc* noundef align 1 %x, %class.bc* noundef align 1 %y)
+// NULL-INVALID: define{{.*}} nonnull align 1 ptr @_Z4bar2R2bcS0_(ptr noundef nonnull align 1 %x, ptr noundef nonnull align 1 %y)
+// NULL-VALID: define{{.*}} align 1 ptr @_Z4bar2R2bcS0_(ptr noundef align 1 %x, ptr noundef align 1 %y)
 
 

diff  --git a/clang/test/CodeGenCXX/aix-constructor-attribute.cpp b/clang/test/CodeGenCXX/aix-constructor-attribute.cpp
index 6ff4cf3227330..9f1191278fcd3 100644
--- a/clang/test/CodeGenCXX/aix-constructor-attribute.cpp
+++ b/clang/test/CodeGenCXX/aix-constructor-attribute.cpp
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-ibm-aix-xcoff -x c++ -emit-llvm \
+// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -x c++ -emit-llvm \
 // RUN:     -fno-use-cxa-atexit < %s |\
 // RUN:   FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64-ibm-aix-xcoff -x c++ -emit-llvm \
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -x c++ -emit-llvm \
 // RUN:     -fno-use-cxa-atexit < %s | \
 // RUN:   FileCheck %s
 
-// CHECK: @llvm.global_ctors = appending global [4 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* bitcast (i32 ()* @_Z4foo3v to void ()*), i8* null }, { i32, void ()*, i8* } { i32 180, void ()* bitcast (i32 ()* @_Z4foo2v to void ()*), i8* null }, { i32, void ()*, i8* } { i32 180, void ()* bitcast (i32 ()* @_Z3foov to void ()*), i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I__, i8* null }]
-// CHECK: @llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__D_a, i8* null }]
+// CHECK: @llvm.global_ctors = appending global [4 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_Z4foo3v, ptr null }, { i32, ptr, ptr } { i32 180, ptr @_Z4foo2v, ptr null }, { i32, ptr, ptr } { i32 180, ptr @_Z3foov, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I__, ptr null }]
+// CHECK: @llvm.global_dtors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__D_a, ptr null }]
 
 int foo() __attribute__((constructor(180)));
 int foo2() __attribute__((constructor(180)));

diff  --git a/clang/test/CodeGenCXX/aix-destructor-attribute.cpp b/clang/test/CodeGenCXX/aix-destructor-attribute.cpp
index 610ee778f472b..5ebea7a997c9d 100644
--- a/clang/test/CodeGenCXX/aix-destructor-attribute.cpp
+++ b/clang/test/CodeGenCXX/aix-destructor-attribute.cpp
@@ -1,14 +1,14 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-ibm-aix-xcoff -x c++ -emit-llvm \
+// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -x c++ -emit-llvm \
 // RUN:     -fno-use-cxa-atexit < %s | \
 // RUN:   FileCheck --check-prefix=NO-REGISTER %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64-ibm-aix-xcoff -x c++ -emit-llvm \
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -x c++ -emit-llvm \
 // RUN:     -fno-use-cxa-atexit < %s | \
 // RUN:   FileCheck --check-prefix=NO-REGISTER %s
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-ibm-aix-xcoff -x c++ -emit-llvm \
+// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -x c++ -emit-llvm \
 // RUN:     -fno-use-cxa-atexit -fregister-global-dtors-with-atexit < %s | \
 // RUN:   FileCheck --check-prefix=REGISTER %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64-ibm-aix-xcoff -x c++ -emit-llvm \
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -x c++ -emit-llvm \
 // RUN:     -fno-use-cxa-atexit -fregister-global-dtors-with-atexit < %s | \
 // RUN:   FileCheck --check-prefix=REGISTER %s
 
@@ -33,33 +33,33 @@ int bar3(int a) {
   return a;
 }
 
-// NO-REGISTER: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I__, i8* null }]
-// NO-REGISTER: @llvm.global_dtors = appending global [4 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 100, void ()* bitcast (i32 ()* @_Z3barv to void ()*), i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* bitcast (i32 ()* @_Z4bar2v to void ()*), i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* bitcast (i32 (i32)* @_Z4bar3i to void ()*), i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__D_a, i8* null }]
+// NO-REGISTER: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I__, ptr null }]
+// NO-REGISTER: @llvm.global_dtors = appending global [4 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 100, ptr @_Z3barv, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_Z4bar2v, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_Z4bar3i, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__D_a, ptr null }]
 
-// REGISTER: @llvm.global_ctors = appending global [3 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I__, i8* null }, { i32, void ()*, i8* } { i32 100, void ()* @__GLOBAL_init_100, i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @__GLOBAL_init_65535, i8* null }]
-// REGISTER: @llvm.global_dtors = appending global [3 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__D_a, i8* null }, { i32, void ()*, i8* } { i32 100, void ()* @__GLOBAL_cleanup_100, i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @__GLOBAL_cleanup_65535, i8* null }]
+// REGISTER: @llvm.global_ctors = appending global [3 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I__, ptr null }, { i32, ptr, ptr } { i32 100, ptr @__GLOBAL_init_100, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @__GLOBAL_init_65535, ptr null }]
+// REGISTER: @llvm.global_dtors = appending global [3 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__D_a, ptr null }, { i32, ptr, ptr } { i32 100, ptr @__GLOBAL_cleanup_100, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @__GLOBAL_cleanup_65535, ptr null }]
 
 // REGISTER: define internal void @__GLOBAL_init_100() [[ATTR:#[0-9]+]] {
 // REGISTER: entry:
-// REGISTER:   %0 = call i32 @atexit(void ()* bitcast (i32 ()* @_Z3barv to void ()*))
+// REGISTER:   %0 = call i32 @atexit(ptr @_Z3barv)
 // REGISTER:   ret void
 // REGISTER: }
 
 // REGISTER: define internal void @__GLOBAL_init_65535() [[ATTR:#[0-9]+]] {
 // REGISTER: entry:
-// REGISTER:   %0 = call i32 @atexit(void ()* bitcast (i32 ()* @_Z4bar2v to void ()*))
-// REGISTER:   %1 = call i32 @atexit(void ()* bitcast (i32 (i32)* @_Z4bar3i to void ()*))
+// REGISTER:   %0 = call i32 @atexit(ptr @_Z4bar2v)
+// REGISTER:   %1 = call i32 @atexit(ptr @_Z4bar3i)
 // REGISTER:   ret void
 // REGISTER: }
 
 // REGISTER: define internal void @__GLOBAL_cleanup_100() [[ATTR:#[0-9]+]] {
 // REGISTER: entry:
-// REGISTER:   %0 = call i32 @unatexit(void ()* bitcast (i32 ()* @_Z3barv to void ()*))
+// REGISTER:   %0 = call i32 @unatexit(ptr @_Z3barv)
 // REGISTER:   %needs_destruct = icmp eq i32 %0, 0
 // REGISTER:   br i1 %needs_destruct, label %destruct.call, label %destruct.end
 
 // REGISTER: destruct.call:
-// REGISTER:   call void bitcast (i32 ()* @_Z3barv to void ()*)()
+// REGISTER:   call void @_Z3barv()
 // REGISTER:   br label %destruct.end
 
 // REGISTER: destruct.end:
@@ -68,21 +68,21 @@ int bar3(int a) {
 
 // REGISTER: define internal void @__GLOBAL_cleanup_65535() [[ATTR:#[0-9]+]] {
 // REGISTER: entry:
-// REGISTER:   %0 = call i32 @unatexit(void ()* bitcast (i32 (i32)* @_Z4bar3i to void ()*))
+// REGISTER:   %0 = call i32 @unatexit(ptr @_Z4bar3i)
 // REGISTER:   %needs_destruct = icmp eq i32 %0, 0
 // REGISTER:   br i1 %needs_destruct, label %destruct.call, label %unatexit.call
 
 // REGISTER: destruct.call:
-// REGISTER:   call void bitcast (i32 (i32)* @_Z4bar3i to void ()*)()
+// REGISTER:   call void @_Z4bar3i()
 // REGISTER:   br label %unatexit.call
 
 // REGISTER: unatexit.call:
-// REGISTER:   %1 = call i32 @unatexit(void ()* bitcast (i32 ()* @_Z4bar2v to void ()*))
+// REGISTER:   %1 = call i32 @unatexit(ptr @_Z4bar2v)
 // REGISTER:   %needs_destruct1 = icmp eq i32 %1, 0
 // REGISTER:   br i1 %needs_destruct1, label %destruct.call2, label %destruct.end
 
 // REGISTER: destruct.call2:
-// REGISTER:   call void bitcast (i32 ()* @_Z4bar2v to void ()*)()
+// REGISTER:   call void @_Z4bar2v()
 // REGISTER:   br label %destruct.end
 
 // REGISTER: destruct.end:

diff  --git a/clang/test/CodeGenCXX/aix-static-init-debug-info.cpp b/clang/test/CodeGenCXX/aix-static-init-debug-info.cpp
index 1f8694e5355b2..a35ca27e10d2a 100644
--- a/clang/test/CodeGenCXX/aix-static-init-debug-info.cpp
+++ b/clang/test/CodeGenCXX/aix-static-init-debug-info.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-ibm-aix-xcoff -emit-llvm -x c++ \
+// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -emit-llvm -x c++ \
 // RUN:     -debug-info-kind=limited < %s | \
 // RUN:   FileCheck %s
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64-ibm-aix-xcoff -emit-llvm -x c++ \
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -emit-llvm -x c++ \
 // RUN:     -debug-info-kind=limited  < %s | \
 // RUN:   FileCheck %s
 
@@ -15,20 +15,20 @@ X v;
 
 // CHECK: define internal void @__cxx_global_var_init() [[ATTR:#[0-9]+]] !dbg ![[DBGVAR16:[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN1XC1Ev(%struct.X* {{[^,]*}} @v), !dbg ![[DBGVAR19:[0-9]+]]
-// CHECK:   %0 = call i32 @atexit(void ()* @__dtor_v) [[ATTR:#[0-9]+]], !dbg ![[DBGVAR19b:[0-9]+]]
+// CHECK:   call void @_ZN1XC1Ev(ptr {{[^,]*}} @v), !dbg ![[DBGVAR19:[0-9]+]]
+// CHECK:   %0 = call i32 @atexit(ptr @__dtor_v) [[ATTR:#[0-9]+]], !dbg ![[DBGVAR19b:[0-9]+]]
 // CHECK:   ret void, !dbg ![[DBGVAR19]]
 // CHECK: }
 
 // CHECK: define internal void @__dtor_v() [[ATTR:#[0-9]+]] !dbg ![[DBGVAR20:[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN1XD1Ev(%struct.X* @v), !dbg ![[DBGVAR21b:[0-9]+]]
+// CHECK:   call void @_ZN1XD1Ev(ptr @v), !dbg ![[DBGVAR21b:[0-9]+]]
 // CHECK:   ret void, !dbg ![[DBGVAR21:[0-9]+]]
 // CHECK: }
 
 // CHECK: define internal void @__finalize_v() [[ATTR:#[0-9]+]] !dbg ![[DBGVAR22:[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @unatexit(void ()* @__dtor_v) [[ATTR:#[0-9]+]], !dbg ![[DBGVAR24:[0-9]+]]
+// CHECK:   %0 = call i32 @unatexit(ptr @__dtor_v) [[ATTR:#[0-9]+]], !dbg ![[DBGVAR24:[0-9]+]]
 // CHECK:   %needs_destruct = icmp eq i32 %0, 0, !dbg ![[DBGVAR24]]
 // CHECK:   br i1 %needs_destruct, label %destruct.call, label %destruct.end, !dbg ![[DBGVAR24]]
 

diff  --git a/clang/test/CodeGenCXX/aix-static-init-temp-spec-and-inline-var.cpp b/clang/test/CodeGenCXX/aix-static-init-temp-spec-and-inline-var.cpp
index fea32983a72db..5dba204ba6402 100644
--- a/clang/test/CodeGenCXX/aix-static-init-temp-spec-and-inline-var.cpp
+++ b/clang/test/CodeGenCXX/aix-static-init-temp-spec-and-inline-var.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-ibm-aix-xcoff -S -emit-llvm -x c++ \
+// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -S -emit-llvm -x c++ \
 // RUN:     -std=c++2a < %s | \
 // RUN:   FileCheck --check-prefixes=CHECK,CHECK32 %s
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64-ibm-aix-xcoff -S -emit-llvm -x c++ \
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -S -emit-llvm -x c++ \
 // RUN:     -std=c++2a < %s | \
 // RUN:   FileCheck --check-prefixes=CHECK,CHECK64 %s
 
@@ -47,26 +47,26 @@ A<int> A<int>::instance = bar();
 // CHECK: @_ZGVN5test12t2E = linkonce_odr global i64 0, align 8
 // CHECK: @_ZGVN5test21AIvE8instanceE = weak_odr global i64 0, align 8
 // CHECK: @_ZGVN5test12t1IiEE = linkonce_odr global i64 0, align 8
-// CHECK: @llvm.global_ctors = appending global [4 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__cxx_global_var_init.1, i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @__cxx_global_var_init.2, i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @__cxx_global_var_init.4, i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I__, i8* null }]
-// CHECK: @llvm.global_dtors = appending global [4 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__finalize__ZN5test12t2E, i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @__finalize__ZN5test21AIvE8instanceE, i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @__finalize__ZN5test12t1IiEE, i8* null }, { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__D_a, i8* null }]
+// CHECK: @llvm.global_ctors = appending global [4 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @__cxx_global_var_init.1, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @__cxx_global_var_init.2, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @__cxx_global_var_init.4, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I__, ptr null }]
+// CHECK: @llvm.global_dtors = appending global [4 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @__finalize__ZN5test12t2E, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @__finalize__ZN5test21AIvE8instanceE, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @__finalize__ZN5test12t1IiEE, ptr null }, { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__D_a, ptr null }]
 
 // CHECK: define internal void @__cxx_global_var_init() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK32: call void @_ZN5test15Test1C1Ei(%"struct.test1::Test1"* noundef{{[^,]*}} @_ZN5test12t0E, i32 noundef 2)
-// CHECK64: call void @_ZN5test15Test1C1Ei(%"struct.test1::Test1"* noundef{{[^,]*}} @_ZN5test12t0E, i32 noundef signext 2)
-// CHECK:   %0 = call i32 @atexit(void ()* @__dtor__ZN5test12t0E)
+// CHECK32: call void @_ZN5test15Test1C1Ei(ptr noundef{{[^,]*}} @_ZN5test12t0E, i32 noundef 2)
+// CHECK64: call void @_ZN5test15Test1C1Ei(ptr noundef{{[^,]*}} @_ZN5test12t0E, i32 noundef signext 2)
+// CHECK:   %0 = call i32 @atexit(ptr @__dtor__ZN5test12t0E)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__dtor__ZN5test12t0E() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test15Test1D1Ev(%"struct.test1::Test1"* @_ZN5test12t0E)
+// CHECK:   call void @_ZN5test15Test1D1Ev(ptr @_ZN5test12t0E)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__finalize__ZN5test12t0E() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @unatexit(void ()* @__dtor__ZN5test12t0E)
+// CHECK:   %0 = call i32 @unatexit(ptr @__dtor__ZN5test12t0E)
 // CHECK:   %needs_destruct = icmp eq i32 %0, 0
 // CHECK:   br i1 %needs_destruct, label %destruct.call, label %destruct.end
 
@@ -80,20 +80,20 @@ A<int> A<int>::instance = bar();
 
 // CHECK: define internal void @__cxx_global_var_init.1() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = load atomic i8, i8* bitcast (i64* @_ZGVN5test12t2E to i8*) acquire, align 8
+// CHECK:   %0 = load atomic i8, ptr @_ZGVN5test12t2E acquire, align 8
 // CHECK:   %guard.uninitialized = icmp eq i8 %0, 0
 // CHECK:   br i1 %guard.uninitialized, label %init.check, label %init.end
 
 // CHECK: init.check:
-// CHECK:   %1 = call i32 @__cxa_guard_acquire(i64* @_ZGVN5test12t2E)
+// CHECK:   %1 = call i32 @__cxa_guard_acquire(ptr @_ZGVN5test12t2E)
 // CHECK:   %tobool = icmp ne i32 %1, 0
 // CHECK:   br i1 %tobool, label %init, label %init.end
 
 // CHECK: init:
-// CHECK32: call void @_ZN5test15Test1C1Ei(%"struct.test1::Test1"* noundef{{[^,]*}} @_ZN5test12t2E, i32 noundef 2)
-// CHECK64: call void @_ZN5test15Test1C1Ei(%"struct.test1::Test1"* noundef{{[^,]*}} @_ZN5test12t2E, i32 noundef signext 2)
-// CHECK:   %2 = call i32 @atexit(void ()* @__dtor__ZN5test12t2E)
-// CHECK:   call void @__cxa_guard_release(i64* @_ZGVN5test12t2E)
+// CHECK32: call void @_ZN5test15Test1C1Ei(ptr noundef{{[^,]*}} @_ZN5test12t2E, i32 noundef 2)
+// CHECK64: call void @_ZN5test15Test1C1Ei(ptr noundef{{[^,]*}} @_ZN5test12t2E, i32 noundef signext 2)
+// CHECK:   %2 = call i32 @atexit(ptr @__dtor__ZN5test12t2E)
+// CHECK:   call void @__cxa_guard_release(ptr @_ZGVN5test12t2E)
 // CHECK:   br label %init.end
 
 // CHECK: init.end:
@@ -102,13 +102,13 @@ A<int> A<int>::instance = bar();
 
 // CHECK: define internal void @__dtor__ZN5test12t2E() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test15Test1D1Ev(%"struct.test1::Test1"* @_ZN5test12t2E)
+// CHECK:   call void @_ZN5test15Test1D1Ev(ptr @_ZN5test12t2E)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__finalize__ZN5test12t2E() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @unatexit(void ()* @__dtor__ZN5test12t2E)
+// CHECK:   %0 = call i32 @unatexit(ptr @__dtor__ZN5test12t2E)
 // CHECK:   %needs_destruct = icmp eq i32 %0, 0
 // CHECK:   br i1 %needs_destruct, label %destruct.call, label %destruct.end
 
@@ -122,14 +122,14 @@ A<int> A<int>::instance = bar();
 
 // CHECK: define internal void @__cxx_global_var_init.2() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = load i8, i8* bitcast (i64* @_ZGVN5test21AIvE8instanceE to i8*), align 8
+// CHECK:   %0 = load i8, ptr @_ZGVN5test21AIvE8instanceE, align 8
 // CHECK:   %guard.uninitialized = icmp eq i8 %0, 0
 // CHECK:   br i1 %guard.uninitialized, label %init.check, label %init.end
 
 // CHECK: init.check:
-// CHECK:   call void @_ZN5test21AIvEC1Ev(%"struct.test2::A"* {{[^,]*}} @_ZN5test21AIvE8instanceE)
-// CHECK:   %1 = call i32 @atexit(void ()* @__dtor__ZN5test21AIvE8instanceE)
-// CHECK:   store i8 1, i8* bitcast (i64* @_ZGVN5test21AIvE8instanceE to i8*), align 8
+// CHECK:   call void @_ZN5test21AIvEC1Ev(ptr {{[^,]*}} @_ZN5test21AIvE8instanceE)
+// CHECK:   %1 = call i32 @atexit(ptr @__dtor__ZN5test21AIvE8instanceE)
+// CHECK:   store i8 1, ptr @_ZGVN5test21AIvE8instanceE, align 8
 // CHECK:   br label %init.end
 
 // CHECK: init.end:
@@ -138,13 +138,13 @@ A<int> A<int>::instance = bar();
 
 // CHECK: define internal void @__dtor__ZN5test21AIvE8instanceE() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test21AIvED1Ev(%"struct.test2::A"* @_ZN5test21AIvE8instanceE)
+// CHECK:   call void @_ZN5test21AIvED1Ev(ptr @_ZN5test21AIvE8instanceE)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__finalize__ZN5test21AIvE8instanceE() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @unatexit(void ()* @__dtor__ZN5test21AIvE8instanceE)
+// CHECK:   %0 = call i32 @unatexit(ptr @__dtor__ZN5test21AIvE8instanceE)
 // CHECK:   %needs_destruct = icmp eq i32 %0, 0
 // CHECK:   br i1 %needs_destruct, label %destruct.call, label %destruct.end
 
@@ -158,20 +158,20 @@ A<int> A<int>::instance = bar();
 
 // CHECK: define internal void @__cxx_global_var_init.3() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %call = call noundef nonnull align 1 dereferenceable(1) %"struct.test2::A.0"* @_ZN5test23barEv()
-// CHECK:   %0 = call i32 @atexit(void ()* @__dtor__ZN5test21AIiE8instanceE)
+// CHECK:   %call = call noundef nonnull align 1 dereferenceable(1) ptr @_ZN5test23barEv()
+// CHECK:   %0 = call i32 @atexit(ptr @__dtor__ZN5test21AIiE8instanceE)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__dtor__ZN5test21AIiE8instanceE() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test21AIiED1Ev(%"struct.test2::A.0"* @_ZN5test21AIiE8instanceE)
+// CHECK:   call void @_ZN5test21AIiED1Ev(ptr @_ZN5test21AIiE8instanceE)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__finalize__ZN5test21AIiE8instanceE() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @unatexit(void ()* @__dtor__ZN5test21AIiE8instanceE)
+// CHECK:   %0 = call i32 @unatexit(ptr @__dtor__ZN5test21AIiE8instanceE)
 // CHECK:   %needs_destruct = icmp eq i32 %0, 0
 // CHECK:   br i1 %needs_destruct, label %destruct.call, label %destruct.end
 
@@ -185,15 +185,15 @@ A<int> A<int>::instance = bar();
 
 // CHECK: define internal void @__cxx_global_var_init.4() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = load i8, i8* bitcast (i64* @_ZGVN5test12t1IiEE to i8*), align 8
+// CHECK:   %0 = load i8, ptr @_ZGVN5test12t1IiEE, align 8
 // CHECK:   %guard.uninitialized = icmp eq i8 %0, 0
 // CHECK:   br i1 %guard.uninitialized, label %init.check, label %init.end
 
 // CHECK: init.check:
-// CHECK32: call void @_ZN5test15Test1C1Ei(%"struct.test1::Test1"* {{[^,]*}} @_ZN5test12t1IiEE, i32 noundef 2)
-// CHECK64: call void @_ZN5test15Test1C1Ei(%"struct.test1::Test1"* {{[^,]*}} @_ZN5test12t1IiEE, i32 noundef signext 2)
-// CHECK:   %1 = call i32 @atexit(void ()* @__dtor__ZN5test12t1IiEE)
-// CHECK:   store i8 1, i8* bitcast (i64* @_ZGVN5test12t1IiEE to i8*), align 8
+// CHECK32: call void @_ZN5test15Test1C1Ei(ptr {{[^,]*}} @_ZN5test12t1IiEE, i32 noundef 2)
+// CHECK64: call void @_ZN5test15Test1C1Ei(ptr {{[^,]*}} @_ZN5test12t1IiEE, i32 noundef signext 2)
+// CHECK:   %1 = call i32 @atexit(ptr @__dtor__ZN5test12t1IiEE)
+// CHECK:   store i8 1, ptr @_ZGVN5test12t1IiEE, align 8
 // CHECK:   br label %init.end
 
 // CHECK: init.end:
@@ -202,13 +202,13 @@ A<int> A<int>::instance = bar();
 
 // CHECK: define internal void @__dtor__ZN5test12t1IiEE() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test15Test1D1Ev(%"struct.test1::Test1"* @_ZN5test12t1IiEE)
+// CHECK:   call void @_ZN5test15Test1D1Ev(ptr @_ZN5test12t1IiEE)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__finalize__ZN5test12t1IiEE() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @unatexit(void ()* @__dtor__ZN5test12t1IiEE)
+// CHECK:   %0 = call i32 @unatexit(ptr @__dtor__ZN5test12t1IiEE)
 // CHECK:   %needs_destruct = icmp eq i32 %0, 0
 // CHECK:   br i1 %needs_destruct, label %destruct.call, label %destruct.end
 

diff  --git a/clang/test/CodeGenCXX/aix-static-init.cpp b/clang/test/CodeGenCXX/aix-static-init.cpp
index 40f2fb9ab2cc9..1a42fd1af212c 100644
--- a/clang/test/CodeGenCXX/aix-static-init.cpp
+++ b/clang/test/CodeGenCXX/aix-static-init.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-ibm-aix-xcoff -S -emit-llvm -x c++ \
+// RUN: %clang_cc1 -triple powerpc-ibm-aix-xcoff -S -emit-llvm -x c++ \
 // RUN:     -std=c++2a < %s | \
 // RUN:   FileCheck --check-prefixes=CHECK,CHECK32 %s
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64-ibm-aix-xcoff -S -emit-llvm -x c++ \
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix-xcoff -S -emit-llvm -x c++ \
 // RUN:     -std=c++2a < %s | \
 // RUN:   FileCheck --check-prefixes=CHECK,CHECK64 %s
 
@@ -39,27 +39,27 @@ namespace test4 {
 } // namespace test4
 
 // CHECK: @_ZGVZN5test41fEvE11staticLocal = internal global i64 0, align 8
-// CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I__, i8* null }]
-// CHECK: @llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__D_a, i8* null }]
+// CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I__, ptr null }]
+// CHECK: @llvm.global_dtors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__D_a, ptr null }]
 
 // CHECK: define internal void @__cxx_global_var_init() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test15Test1C1Ev(%"struct.test1::Test1"* {{[^,]*}} @_ZN5test12t1E)
-// CHECK:   %0 = call i32 @atexit(void ()* @__dtor__ZN5test12t1E)
+// CHECK:   call void @_ZN5test15Test1C1Ev(ptr {{[^,]*}} @_ZN5test12t1E)
+// CHECK:   %0 = call i32 @atexit(ptr @__dtor__ZN5test12t1E)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__dtor__ZN5test12t1E() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test15Test1D1Ev(%"struct.test1::Test1"* @_ZN5test12t1E)
+// CHECK:   call void @_ZN5test15Test1D1Ev(ptr @_ZN5test12t1E)
 // CHECK:   ret void
 // CHECK: }
 
-// CHECK: declare i32 @atexit(void ()*)
+// CHECK: declare i32 @atexit(ptr)
 
 // CHECK: define internal void @__finalize__ZN5test12t1E() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @unatexit(void ()* @__dtor__ZN5test12t1E)
+// CHECK:   %0 = call i32 @unatexit(ptr @__dtor__ZN5test12t1E)
 // CHECK:   %needs_destruct = icmp eq i32 %0, 0
 // CHECK:   br i1 %needs_destruct, label %destruct.call, label %destruct.end
 
@@ -71,24 +71,24 @@ namespace test4 {
 // CHECK:   ret void
 // CHECK: }
 
-// CHECK: declare i32 @unatexit(void ()*)
+// CHECK: declare i32 @unatexit(ptr)
 
 // CHECK: define internal void @__cxx_global_var_init.1() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test15Test1C1Ev(%"struct.test1::Test1"* {{[^,]*}} @_ZN5test12t2E)
-// CHECK:   %0 = call i32 @atexit(void ()* @__dtor__ZN5test12t2E)
+// CHECK:   call void @_ZN5test15Test1C1Ev(ptr {{[^,]*}} @_ZN5test12t2E)
+// CHECK:   %0 = call i32 @atexit(ptr @__dtor__ZN5test12t2E)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__dtor__ZN5test12t2E() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test15Test1D1Ev(%"struct.test1::Test1"* @_ZN5test12t2E)
+// CHECK:   call void @_ZN5test15Test1D1Ev(ptr @_ZN5test12t2E)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__finalize__ZN5test12t2E() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @unatexit(void ()* @__dtor__ZN5test12t2E)
+// CHECK:   %0 = call i32 @unatexit(ptr @__dtor__ZN5test12t2E)
 // CHECK:   %needs_destruct = icmp eq i32 %0, 0
 // CHECK:   br i1 %needs_destruct, label %destruct.call, label %destruct.end
 
@@ -104,25 +104,25 @@ namespace test4 {
 // CHECK: entry:
 // CHECK32: %call = call noundef i32 @_ZN5test23fooEv()
 // CHECK64: %call = call noundef signext i32 @_ZN5test23fooEv()
-// CHECK:   store i32 %call, i32* @_ZN5test21xE
+// CHECK:   store i32 %call, ptr @_ZN5test21xE
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__cxx_global_var_init.3() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @atexit(void ()* @__dtor__ZN5test31tE)
+// CHECK:   %0 = call i32 @atexit(ptr @__dtor__ZN5test31tE)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__dtor__ZN5test31tE() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test35Test3D1Ev(%"struct.test3::Test3"* @_ZN5test31tE)
+// CHECK:   call void @_ZN5test35Test3D1Ev(ptr @_ZN5test31tE)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__finalize__ZN5test31tE() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @unatexit(void ()* @__dtor__ZN5test31tE)
+// CHECK:   %0 = call i32 @unatexit(ptr @__dtor__ZN5test31tE)
 // CHECK:   %needs_destruct = icmp eq i32 %0, 0
 // CHECK:   br i1 %needs_destruct, label %destruct.call, label %destruct.end
 
@@ -136,19 +136,19 @@ namespace test4 {
 
 // CHECK: define void @_ZN5test41fEv() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = load atomic i8, i8* bitcast (i64* @_ZGVZN5test41fEvE11staticLocal to i8*) acquire, align 8
+// CHECK:   %0 = load atomic i8, ptr @_ZGVZN5test41fEvE11staticLocal acquire, align 8
 // CHECK:   %guard.uninitialized = icmp eq i8 %0, 0
 // CHECK:   br i1 %guard.uninitialized, label %init.check, label %init.end
 
 // CHECK: init.check:
-// CHECK:   %1 = call i32 @__cxa_guard_acquire(i64* @_ZGVZN5test41fEvE11staticLocal)
+// CHECK:   %1 = call i32 @__cxa_guard_acquire(ptr @_ZGVZN5test41fEvE11staticLocal)
 // CHECK:   %tobool = icmp ne i32 %1, 0
 // CHECK:   br i1 %tobool, label %init, label %init.end
 
 // CHECK: init:
-// CHECK:   call void @_ZN5test45Test4C1Ev(%"struct.test4::Test4"* {{[^,]*}} @_ZZN5test41fEvE11staticLocal)
-// CHECK:   %2 = call i32 @atexit(void ()* @__dtor__ZZN5test41fEvE11staticLocal)
-// CHECK:   call void @__cxa_guard_release(i64* @_ZGVZN5test41fEvE11staticLocal)
+// CHECK:   call void @_ZN5test45Test4C1Ev(ptr {{[^,]*}} @_ZZN5test41fEvE11staticLocal)
+// CHECK:   %2 = call i32 @atexit(ptr @__dtor__ZZN5test41fEvE11staticLocal)
+// CHECK:   call void @__cxa_guard_release(ptr @_ZGVZN5test41fEvE11staticLocal)
 // CHECK:   br label %init.end
 
 // CHECK: init.end:
@@ -157,13 +157,13 @@ namespace test4 {
 
 // CHECK: define internal void @__dtor__ZZN5test41fEvE11staticLocal() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   call void @_ZN5test45Test4D1Ev(%"struct.test4::Test4"* @_ZZN5test41fEvE11staticLocal)
+// CHECK:   call void @_ZN5test45Test4D1Ev(ptr @_ZZN5test41fEvE11staticLocal)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define internal void @__finalize__ZZN5test41fEvE11staticLocal() [[ATTR:#[0-9]+]] {
 // CHECK: entry:
-// CHECK:   %0 = call i32 @unatexit(void ()* @__dtor__ZZN5test41fEvE11staticLocal)
+// CHECK:   %0 = call i32 @unatexit(ptr @__dtor__ZZN5test41fEvE11staticLocal)
 // CHECK:   %needs_destruct = icmp eq i32 %0, 0
 // CHECK:   br i1 %needs_destruct, label %destruct.call, label %destruct.end
 

diff  --git a/clang/test/CodeGenCXX/align-avx-complete-objects.cpp b/clang/test/CodeGenCXX/align-avx-complete-objects.cpp
index 2f8a09b6fbe5f..5afdfec8b80e7 100644
--- a/clang/test/CodeGenCXX/align-avx-complete-objects.cpp
+++ b/clang/test/CodeGenCXX/align-avx-complete-objects.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %std_cxx11-14 %s -O0 -triple=x86_64-apple-darwin -target-feature +avx2 -fmax-type-align=16 -emit-llvm -o - -Werror | FileCheck %s --check-prefixes=CHECK,PRE17
-// RUN: %clang_cc1 -no-opaque-pointers %std_cxx17- %s -O0 -triple=x86_64-apple-darwin -target-feature +avx2 -fmax-type-align=16 -emit-llvm -o - -Werror | FileCheck %s --check-prefixes=CHECK,CXX17
+// RUN: %clang_cc1 %std_cxx11-14 %s -O0 -triple=x86_64-apple-darwin -target-feature +avx2 -fmax-type-align=16 -emit-llvm -o - -Werror | FileCheck %s --check-prefixes=CHECK,PRE17
+// RUN: %clang_cc1 %std_cxx17- %s -O0 -triple=x86_64-apple-darwin -target-feature +avx2 -fmax-type-align=16 -emit-llvm -o - -Werror | FileCheck %s --check-prefixes=CHECK,CXX17
 // rdar://16254558
 
 typedef float AVX2Float __attribute__((__vector_size__(32)));
@@ -17,18 +17,17 @@ float TestAlign(void)
 }
 
 // CHECK: [[R:%.*]] = alloca <8 x float>, align 32
-// PRE17-NEXT:  [[CALL:%.*]] = call noalias noundef nonnull i8* @_Znwm(i64 noundef 32)
-// CXX17-NEXT:  [[CALL:%.*]] = call noalias noundef nonnull align 32 i8* @_ZnwmSt11align_val_t(i64 noundef 32, i64 noundef 32)
-// CHECK-NEXT:  [[ZERO:%.*]] = bitcast i8* [[CALL]] to <8 x float>*
-// CHECK-NEXT:  store <8 x float>* [[ZERO]], <8 x float>** [[P:%.*]], align 8
-// CHECK-NEXT:  [[ONE:%.*]] = load <8 x float>*, <8 x float>** [[P]], align 8
-// CHECK-NEXT:  [[TWO:%.*]] = load volatile <8 x float>, <8 x float>* [[ONE]], align 16
-// CHECK-NEXT:  [[THREE:%.*]] = load <8 x float>*, <8 x float>** [[P]], align 8
-// CHECK-NEXT:  store volatile <8 x float> [[TWO]], <8 x float>* [[THREE]], align 16
-// CHECK-NEXT:  [[FOUR:%.*]] = load <8 x float>*, <8 x float>** [[P]], align 8
-// CHECK-NEXT:  [[FIVE:%.*]] = load volatile <8 x float>, <8 x float>* [[FOUR]], align 16
-// CHECK-NEXT:  store <8 x float> [[FIVE]], <8 x float>* [[R]], align 32
-// CHECK-NEXT:  [[SIX:%.*]] = load <8 x float>, <8 x float>* [[R]], align 32
+// PRE17-NEXT:  [[CALL:%.*]] = call noalias noundef nonnull ptr @_Znwm(i64 noundef 32)
+// CXX17-NEXT:  [[CALL:%.*]] = call noalias noundef nonnull align 32 ptr @_ZnwmSt11align_val_t(i64 noundef 32, i64 noundef 32)
+// CHECK-NEXT:  store ptr [[CALL]], ptr [[P:%.*]], align 8
+// CHECK-NEXT:  [[ONE:%.*]] = load ptr, ptr [[P]], align 8
+// CHECK-NEXT:  [[TWO:%.*]] = load volatile <8 x float>, ptr [[ONE]], align 16
+// CHECK-NEXT:  [[THREE:%.*]] = load ptr, ptr [[P]], align 8
+// CHECK-NEXT:  store volatile <8 x float> [[TWO]], ptr [[THREE]], align 16
+// CHECK-NEXT:  [[FOUR:%.*]] = load ptr, ptr [[P]], align 8
+// CHECK-NEXT:  [[FIVE:%.*]] = load volatile <8 x float>, ptr [[FOUR]], align 16
+// CHECK-NEXT:  store <8 x float> [[FIVE]], ptr [[R]], align 32
+// CHECK-NEXT:  [[SIX:%.*]] = load <8 x float>, ptr [[R]], align 32
 // CHECK-NEXT:  [[VECEXT:%.*]] = extractelement <8 x float> [[SIX]], i32 0
 // CHECK-NEXT:  ret float [[VECEXT]]
 
@@ -50,17 +49,16 @@ float TestAlign2(void)
 }
 
 // CHECK: [[R:%.*]] = alloca <8 x float>, align 32
-// PRE17-NEXT:  [[CALL:%.*]] = call noalias noundef nonnull i8* @_Znwm(i64 noundef 32)
-// CXX17-NEXT:  [[CALL:%.*]] = call noalias noundef nonnull align 32 i8* @_ZnwmSt11align_val_t(i64 noundef 32, i64 noundef 32)
-// CHECK-NEXT:  [[ZERO:%.*]] = bitcast i8* [[CALL]] to <8 x float>*
-// CHECK-NEXT:  store <8 x float>* [[ZERO]], <8 x float>** [[P:%.*]], align 8
-// CHECK-NEXT:  [[ONE:%.*]] = load <8 x float>*, <8 x float>** [[P]], align 8
-// CHECK-NEXT:  [[TWO:%.*]] = load volatile <8 x float>, <8 x float>* [[ONE]], align 32
-// CHECK-NEXT:  [[THREE:%.*]] = load <8 x float>*, <8 x float>** [[P]], align 8
-// CHECK-NEXT:  store volatile <8 x float> [[TWO]], <8 x float>* [[THREE]], align 32
-// CHECK-NEXT:  [[FOUR:%.*]] = load <8 x float>*, <8 x float>** [[P]], align 8
-// CHECK-NEXT:  [[FIVE:%.*]] = load volatile <8 x float>, <8 x float>* [[FOUR]], align 32
-// CHECK-NEXT:  store <8 x float> [[FIVE]], <8 x float>* [[R]], align 32
-// CHECK-NEXT:  [[SIX:%.*]] = load <8 x float>, <8 x float>* [[R]], align 32
+// PRE17-NEXT:  [[CALL:%.*]] = call noalias noundef nonnull ptr @_Znwm(i64 noundef 32)
+// CXX17-NEXT:  [[CALL:%.*]] = call noalias noundef nonnull align 32 ptr @_ZnwmSt11align_val_t(i64 noundef 32, i64 noundef 32)
+// CHECK-NEXT:  store ptr [[CALL]], ptr [[P:%.*]], align 8
+// CHECK-NEXT:  [[ONE:%.*]] = load ptr, ptr [[P]], align 8
+// CHECK-NEXT:  [[TWO:%.*]] = load volatile <8 x float>, ptr [[ONE]], align 32
+// CHECK-NEXT:  [[THREE:%.*]] = load ptr, ptr [[P]], align 8
+// CHECK-NEXT:  store volatile <8 x float> [[TWO]], ptr [[THREE]], align 32
+// CHECK-NEXT:  [[FOUR:%.*]] = load ptr, ptr [[P]], align 8
+// CHECK-NEXT:  [[FIVE:%.*]] = load volatile <8 x float>, ptr [[FOUR]], align 32
+// CHECK-NEXT:  store <8 x float> [[FIVE]], ptr [[R]], align 32
+// CHECK-NEXT:  [[SIX:%.*]] = load <8 x float>, ptr [[R]], align 32
 // CHECK-NEXT:  [[VECEXT:%.*]] = extractelement <8 x float> [[SIX]], i32 0
 // CHECK-NEXT:  ret float [[VECEXT]]

diff  --git a/clang/test/CodeGenCXX/amdgcn-string-literal.cpp b/clang/test/CodeGenCXX/amdgcn-string-literal.cpp
index 36e0f27e872aa..a26fc051882a4 100644
--- a/clang/test/CodeGenCXX/amdgcn-string-literal.cpp
+++ b/clang/test/CodeGenCXX/amdgcn-string-literal.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple amdgcn-amd-amdhsa -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -emit-llvm %s -o - | FileCheck %s
 
 // CHECK: @.str = private unnamed_addr addrspace(4) constant [6 x i8] c"g_str\00", align 1
-// CHECK: @g_str ={{.*}} addrspace(1) global i8* addrspacecast (i8 addrspace(4)* getelementptr inbounds ([6 x i8], [6 x i8] addrspace(4)* @.str, i32 0, i32 0) to i8*), align 8
+// CHECK: @g_str ={{.*}} addrspace(1) global ptr addrspacecast (ptr addrspace(4) @.str to ptr), align 8
 // CHECK: @g_array ={{.*}} addrspace(1) global [8 x i8] c"g_array\00", align 1
 // CHECK: @.str.1 = private unnamed_addr addrspace(4) constant [6 x i8] c"l_str\00", align 1
 // CHECK: @__const._Z1fv.l_array = private unnamed_addr addrspace(4) constant [8 x i8] c"l_array\00", align 1
@@ -15,7 +15,7 @@ void g(const char* p);
 void f() {
   const char* l_str = "l_str";
 
-  // CHECK: call void @llvm.memcpy.p0i8.p4i8.i64
+  // CHECK: call void @llvm.memcpy.p0.p4.i64
   char l_array[] = "l_array";
 
   g(g_str);

diff  --git a/clang/test/CodeGenCXX/amdgcn_declspec_get.cpp b/clang/test/CodeGenCXX/amdgcn_declspec_get.cpp
index f35aca725615d..0ce88014eafd2 100644
--- a/clang/test/CodeGenCXX/amdgcn_declspec_get.cpp
+++ b/clang/test/CodeGenCXX/amdgcn_declspec_get.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple amdgcn-amd-amdhsa -emit-llvm -O3 -fdeclspec \
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -emit-llvm -O3 -fdeclspec \
 // RUN:     -disable-llvm-passes -o - %s | FileCheck %s
 
 int get_x();
@@ -14,13 +14,11 @@ extern const A a;
 
 // CHECK-LABEL: define{{.*}} void @_Z4testv()
 // CHECK:  %i = alloca i32, align 4, addrspace(5)
-// CHECK:  %[[ii:.*]] = addrspacecast i32 addrspace(5)* %i to i32*
-// CHECK:  %[[cast:.*]] = bitcast i32 addrspace(5)* %i to i8 addrspace(5)*
-// CHECK:  call void @llvm.lifetime.start.p5i8(i64 4, i8 addrspace(5)* %[[cast]])
+// CHECK:  %[[ii:.*]] = addrspacecast ptr addrspace(5) %i to ptr
+// CHECK:  call void @llvm.lifetime.start.p5(i64 4, ptr addrspace(5) %i)
 // CHECK:  %call = call noundef i32 @_ZN1A6_get_xEv()
-// CHECK:  store i32 %call, i32* %[[ii]]
-// CHECK:  %[[cast2:.*]] = bitcast i32 addrspace(5)* %i to i8 addrspace(5)*
-// CHECK:  call void @llvm.lifetime.end.p5i8(i64 4, i8 addrspace(5)* %[[cast2]])
+// CHECK:  store i32 %call, ptr %[[ii]]
+// CHECK:  call void @llvm.lifetime.end.p5(i64 4, ptr addrspace(5) %i)
 void test()
 {
   int i = a.x;

diff  --git a/clang/test/CodeGenCXX/amdgpu-kernel-arg-pointer-type.cpp b/clang/test/CodeGenCXX/amdgpu-kernel-arg-pointer-type.cpp
index 90a9366ac9a20..c8fb12315d0ee 100644
--- a/clang/test/CodeGenCXX/amdgpu-kernel-arg-pointer-type.cpp
+++ b/clang/test/CodeGenCXX/amdgpu-kernel-arg-pointer-type.cpp
@@ -1,32 +1,32 @@
 // REQUIRES: amdgpu-registered-target
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple amdgcn-amd-amdhsa -emit-llvm %s -o - | FileCheck --check-prefixes=COMMON,CHECK %s
+// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -emit-llvm %s -o - | FileCheck --check-prefixes=COMMON,CHECK %s
 
 // Derived from CodeGenCUDA/amdgpu-kernel-arg-pointer-type.cu by deleting references to HOST
 // The original test passes the result through opt O2, but that seems to introduce invalid
 // addrspace casts which are not being fixed as part of the present change.
 
-// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel1Pi(i32* {{.*}} %x)
-// CHECK-NOT: ={{.*}} addrspacecast [[TYPE:.*]] addrspace(1)* %{{.*}} to [[TYPE]]*
+// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel1Pi(ptr {{.*}} %x)
+// CHECK-NOT: ={{.*}} addrspacecast [[TYPE:.*]] addrspace(1)* %{{.*}} to ptr
 __attribute__((amdgpu_kernel)) void kernel1(int *x) {
   x[0]++;
 }
 
-// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel2Ri(i32* {{.*}} nonnull align 4 dereferenceable(4) %x)
-// CHECK-NOT: ={{.*}} addrspacecast [[TYPE:.*]] addrspace(1)* %{{.*}} to [[TYPE]]*
+// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel2Ri(ptr {{.*}} nonnull align 4 dereferenceable(4) %x)
+// CHECK-NOT: ={{.*}} addrspacecast [[TYPE:.*]] addrspace(1)* %{{.*}} to ptr
 __attribute__((amdgpu_kernel)) void kernel2(int &x) {
   x++;
 }
 
-// CHECK-LABEL: define{{.*}} amdgpu_kernel void  @_Z7kernel3PU3AS2iPU3AS1i(i32 addrspace(2)*{{.*}} %x, i32 addrspace(1)*{{.*}} %y)
-// CHECK-NOT: ={{.*}} addrspacecast [[TYPE:.*]] addrspace(1)* %{{.*}} to [[TYPE]]*
+// CHECK-LABEL: define{{.*}} amdgpu_kernel void  @_Z7kernel3PU3AS2iPU3AS1i(ptr addrspace(2){{.*}} %x, ptr addrspace(1){{.*}} %y)
+// CHECK-NOT: ={{.*}} addrspacecast [[TYPE:.*]] addrspace(1)* %{{.*}} to ptr
 __attribute__((amdgpu_kernel)) void kernel3(__attribute__((address_space(2))) int *x,
                                             __attribute__((address_space(1))) int *y) {
   y[0] = x[0];
 }
 
-// COMMON-LABEL: define{{.*}} void @_Z4funcPi(i32*{{.*}} %x)
-// CHECK-NOT: ={{.*}} addrspacecast [[TYPE:.*]] addrspace(1)* %{{.*}} to [[TYPE]]*
+// COMMON-LABEL: define{{.*}} void @_Z4funcPi(ptr{{.*}} %x)
+// CHECK-NOT: ={{.*}} addrspacecast [[TYPE:.*]] addrspace(1)* %{{.*}} to ptr
 __attribute__((amdgpu_kernel)) void func(int *x) {
   x[0]++;
 }
@@ -40,13 +40,13 @@ struct S {
 // assume they are global pointers.
 //
 
-// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel41S(%struct.S addrspace(4)*{{.*}} byref(%struct.S) align 8 %0)
+// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel41S(ptr addrspace(4){{.*}} byref(%struct.S) align 8 %0)
 __attribute__((amdgpu_kernel)) void kernel4(struct S s) {
   s.x[0]++;
   s.y[0] += 1.f;
 }
 
-// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel5P1S(%struct.S* {{.*}} %s)
+// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel5P1S(ptr {{.*}} %s)
 __attribute__((amdgpu_kernel)) void kernel5(struct S *s) {
   s->x[0]++;
   s->y[0] += 1.f;
@@ -59,14 +59,14 @@ struct T {
 // by-val). However, the enhanced address inferring pass should be able to
 // assume they are global pointers.
 //
-// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel61T(%struct.T addrspace(4)*{{.*}} byref(%struct.T) align 8 %0)
+// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel61T(ptr addrspace(4){{.*}} byref(%struct.T) align 8 %0)
 __attribute__((amdgpu_kernel)) void kernel6(struct T t) {
   t.x[0][0] += 1.f;
   t.x[1][0] += 2.f;
 }
 
 // Check that coerced pointers retain the noalias attribute when qualified with __restrict.
-// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel7Pi(i32* noalias{{.*}} %x)
+// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel7Pi(ptr noalias{{.*}} %x)
 __attribute__((amdgpu_kernel)) void kernel7(int *__restrict x) {
   x[0]++;
 }
@@ -75,8 +75,8 @@ __attribute__((amdgpu_kernel)) void kernel7(int *__restrict x) {
 struct SS {
   float *x;
 };
-// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel82SS(float* %a.coerce)
-// CHECK-NOT: ={{.*}} addrspacecast [[TYPE:.*]] addrspace(1)* %{{.*}} to [[TYPE]]*
+// COMMON-LABEL: define{{.*}} amdgpu_kernel void @_Z7kernel82SS(ptr %a.coerce)
+// CHECK-NOT: ={{.*}} addrspacecast [[TYPE:.*]] addrspace(1)* %{{.*}} to ptr
 __attribute__((amdgpu_kernel)) void kernel8(struct SS a) {
   *a.x += 3.f;
 }

diff  --git a/clang/test/CodeGenCXX/apple-kext-indirect-call-2.cpp b/clang/test/CodeGenCXX/apple-kext-indirect-call-2.cpp
index ed25df1790262..125cb699a8971 100644
--- a/clang/test/CodeGenCXX/apple-kext-indirect-call-2.cpp
+++ b/clang/test/CodeGenCXX/apple-kext-indirect-call-2.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -emit-llvm -o - %s | FileCheck %s
 
-// CHECK: @_ZTV1A ={{.*}} unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* null, i8* bitcast (i8* (%struct.A*)* @_ZNK1A3abcEv to i8*), i8* null] }
-// CHECK: @_ZTV4Base ={{.*}} unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* null, i8* bitcast (i8* (%struct.Base*)* @_ZNK4Base3abcEv to i8*), i8* null] }
-// CHECK: @_ZTV8Derived2 ={{.*}} unnamed_addr constant { [5 x i8*] } { [5 x i8*] [i8* null, i8* null, i8* null, i8* bitcast (i8* (%struct.Derived2*)* @_ZNK8Derived23efgEv to i8*), i8* null] }
-// CHECK: @_ZTV2D2 ={{.*}} unnamed_addr constant { [5 x i8*] } { [5 x i8*] [i8* null, i8* null, i8* null, i8* bitcast (i8* (%struct.D2*)* @_ZNK2D23abcEv to i8*), i8* null] }
+// CHECK: @_ZTV1A ={{.*}} unnamed_addr constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr null, ptr @_ZNK1A3abcEv, ptr null] }
+// CHECK: @_ZTV4Base ={{.*}} unnamed_addr constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr null, ptr @_ZNK4Base3abcEv, ptr null] }
+// CHECK: @_ZTV8Derived2 ={{.*}} unnamed_addr constant { [5 x ptr] } { [5 x ptr] [ptr null, ptr null, ptr null, ptr @_ZNK8Derived23efgEv, ptr null] }
+// CHECK: @_ZTV2D2 ={{.*}} unnamed_addr constant { [5 x ptr] } { [5 x ptr] [ptr null, ptr null, ptr null, ptr @_ZNK2D23abcEv, ptr null] }
 
 struct A {
   virtual const char* abc(void) const;
@@ -18,8 +18,8 @@ struct B : virtual A {
 void B::VF() {}
 
 void FUNC(B* p) {
-// CHECK: [[T1:%.*]] = load i8* (%struct.A*)*, i8* (%struct.A*)** getelementptr inbounds (i8* (%struct.A*)*, i8* (%struct.A*)** bitcast ({ [4 x i8*] }* @_ZTV1A to i8* (%struct.A*)**), i64 2)
-// CHECK-NEXT:  [[T2:%.*]] = call noundef i8* [[T1]]
+// CHECK: [[T1:%.*]] = load ptr, ptr getelementptr inbounds (ptr, ptr @_ZTV1A, i64 2)
+// CHECK-NEXT:  [[T2:%.*]] = call noundef ptr [[T1]]
   const char* c = p->A::abc();
 }
 
@@ -33,8 +33,8 @@ struct Derived : public Base {
 };
 
 void FUNC1(Derived* p) {
-// CHECK: [[U1:%.*]] = load i8* (%struct.Base*)*, i8* (%struct.Base*)** getelementptr inbounds (i8* (%struct.Base*)*, i8* (%struct.Base*)** bitcast ({ [4 x i8*] }* @_ZTV4Base to i8* (%struct.Base*)**), i64 2)
-// CHECK-NEXT:  [[U2:%.*]] = call noundef i8* [[U1]]
+// CHECK: [[U1:%.*]] = load ptr, ptr getelementptr inbounds (ptr, ptr @_ZTV4Base, i64 2)
+// CHECK-NEXT:  [[U2:%.*]] = call noundef ptr [[U1]]
   char* c = p->Base::abc();
 }
 
@@ -49,8 +49,8 @@ struct Derived2 : virtual Base2 {
 char* Derived2::efg(void) const { return 0; }
 
 void FUNC2(Derived2* p) {
-// CHECK: [[V1:%.*]] = load i8* (%struct.Derived2*)*, i8* (%struct.Derived2*)** getelementptr inbounds (i8* (%struct.Derived2*)*, i8* (%struct.Derived2*)** bitcast ({ [5 x i8*] }* @_ZTV8Derived2 to i8* (%struct.Derived2*)**), i64 3)
-// CHECK-NEXT:  [[V2:%.*]] = call noundef i8* [[V1]]
+// CHECK: [[V1:%.*]] = load ptr, ptr getelementptr inbounds (ptr, ptr @_ZTV8Derived2, i64 3)
+// CHECK-NEXT:  [[V2:%.*]] = call noundef ptr [[V1]]
   char* c = p->Derived2::efg();
 }
 
@@ -70,8 +70,8 @@ struct Sub : D1, D2 {
 char* D2::abc(void) const { return 0; }
 
 void FUNC3(Sub* p) {
-// CHECK: [[W1:%.*]] = load i8* (%struct.D2*)*, i8* (%struct.D2*)** getelementptr inbounds (i8* (%struct.D2*)*, i8* (%struct.D2*)** bitcast ({ [5 x i8*] }* @_ZTV2D2 to i8* (%struct.D2*)**), i64 3)
-// CHECK-NEXT:  [[W2:%.*]] = call noundef i8* [[W1]]
+// CHECK: [[W1:%.*]] = load ptr, ptr getelementptr inbounds (ptr, ptr @_ZTV2D2, i64 3)
+// CHECK-NEXT:  [[W2:%.*]] = call noundef ptr [[W1]]
   char* c = p->D2::abc();
 }
 

diff  --git a/clang/test/CodeGenCXX/apple-kext-indirect-call.cpp b/clang/test/CodeGenCXX/apple-kext-indirect-call.cpp
index 7ac4f547226dd..31afa0c669107 100644
--- a/clang/test/CodeGenCXX/apple-kext-indirect-call.cpp
+++ b/clang/test/CodeGenCXX/apple-kext-indirect-call.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -fapple-kext -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -emit-llvm -o - %s | FileCheck %s
 
-// CHECK: @_ZTV5TemplIiE = internal unnamed_addr constant { [5 x i8*] } { [5 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI5TemplIiE to i8*), i8* bitcast (void (%struct.Templ*)* @_ZN5TemplIiE1fEv to i8*), i8* bitcast (void (%struct.Templ*)* @_ZN5TemplIiE1gEv to i8*), i8* null] }
+// CHECK: @_ZTV5TemplIiE = internal unnamed_addr constant { [5 x ptr] } { [5 x ptr] [ptr null, ptr @_ZTI5TemplIiE, ptr @_ZN5TemplIiE1fEv, ptr @_ZN5TemplIiE1gEv, ptr null] }
 
 struct Base { 
   virtual void abc(void) const; 
@@ -12,7 +12,7 @@ void FUNC(Base* p) {
   p->Base::abc();
 }
 
-// CHECK: getelementptr inbounds (void (%struct.Base*)*, void (%struct.Base*)** bitcast ({ [4 x i8*] }* @_ZTV4Base to void (%struct.Base*)**), i64 2)
+// CHECK: getelementptr inbounds (ptr, ptr @_ZTV4Base, i64 2)
 // CHECK-NOT: call void @_ZNK4Base3abcEv
 
 template<class T>
@@ -37,6 +37,6 @@ void f(SubTempl<int>* t) {
   t->Templ::f();
 }
 
-// CHECK: getelementptr inbounds (void (%struct.Templ*)*, void (%struct.Templ*)** bitcast ({ [5 x i8*] }* @_ZTV5TemplIiE to void (%struct.Templ*)**), i64 2)
-// CHECK: define internal void @_ZN5TemplIiE1fEv(%struct.Templ* {{[^,]*}} %this)
-// CHECK: define internal void @_ZN5TemplIiE1gEv(%struct.Templ* {{[^,]*}} %this)
+// CHECK: getelementptr inbounds (ptr, ptr @_ZTV5TemplIiE, i64 2)
+// CHECK: define internal void @_ZN5TemplIiE1fEv(ptr {{[^,]*}} %this)
+// CHECK: define internal void @_ZN5TemplIiE1gEv(ptr {{[^,]*}} %this)

diff  --git a/clang/test/CodeGenCXX/apple-kext-indirect-virtual-dtor-call.cpp b/clang/test/CodeGenCXX/apple-kext-indirect-virtual-dtor-call.cpp
index 187779e6768ee..67542294037a8 100644
--- a/clang/test/CodeGenCXX/apple-kext-indirect-virtual-dtor-call.cpp
+++ b/clang/test/CodeGenCXX/apple-kext-indirect-virtual-dtor-call.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -disable-O0-optnone -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -disable-O0-optnone -emit-llvm -o - %s | FileCheck %s
 
-// CHECK: @_ZTV5TemplIiE = internal unnamed_addr constant { [7 x i8*] } { [7 x i8*] [i8* null, i8* null, i8* bitcast (void (%struct.Templ*)* @_ZN5TemplIiED1Ev to i8*), i8* bitcast (void (%struct.Templ*)* @_ZN5TemplIiED0Ev to i8*), i8* bitcast (void (%struct.Templ*)* @_ZN5TemplIiE1fEv to i8*), i8* bitcast (void (%struct.Templ*)* @_ZN5TemplIiE1gEv to i8*), i8* null] }
+// CHECK: @_ZTV5TemplIiE = internal unnamed_addr constant { [7 x ptr] } { [7 x ptr] [ptr null, ptr null, ptr @_ZN5TemplIiED1Ev, ptr @_ZN5TemplIiED0Ev, ptr @_ZN5TemplIiE1fEv, ptr @_ZN5TemplIiE1gEv, ptr null] }
 
 struct B1 { 
   virtual ~B1(); 
@@ -12,11 +12,11 @@ void DELETE(B1 *pb1) {
   pb1->B1::~B1();
 }
 // CHECK-LABEL: define{{.*}} void @_ZN2B1D0Ev
-// CHECK: [[T1:%.*]] = load void (%struct.B1*)*, void (%struct.B1*)** getelementptr inbounds (void (%struct.B1*)*, void (%struct.B1*)** bitcast ({ [5 x i8*] }* @_ZTV2B1 to void (%struct.B1*)**), i64 2)
-// CHECK-NEXT: call void [[T1]](%struct.B1* {{[^,]*}} [[T2:%.*]])
+// CHECK: [[T1:%.*]] = load ptr, ptr getelementptr inbounds (ptr, ptr @_ZTV2B1, i64 2)
+// CHECK-NEXT: call void [[T1]](ptr {{[^,]*}} [[T2:%.*]])
 // CHECK-LABEL: define{{.*}} void @_Z6DELETEP2B1
-// CHECK: [[T3:%.*]] = load void (%struct.B1*)*, void (%struct.B1*)** getelementptr inbounds (void (%struct.B1*)*, void (%struct.B1*)** bitcast ({ [5 x i8*] }* @_ZTV2B1 to void (%struct.B1*)**), i64 2)
-// CHECK-NEXT:  call void [[T3]](%struct.B1* {{[^,]*}} [[T4:%.*]])
+// CHECK: [[T3:%.*]] = load ptr, ptr getelementptr inbounds (ptr, ptr @_ZTV2B1, i64 2)
+// CHECK-NEXT:  call void [[T3]](ptr {{[^,]*}} [[T4:%.*]])
 
 template<class T>
 struct Templ {
@@ -42,7 +42,7 @@ void f(SubTempl<int>* t) {
   t->Templ::~Templ();
 }
 
-// CHECK: getelementptr inbounds (void (%struct.Templ*)*, void (%struct.Templ*)** bitcast ({ [7 x i8*] }* @_ZTV5TemplIiE to void (%struct.Templ*)**), i64 2)
-// CHECK: declare void @_ZN5TemplIiED0Ev(%struct.Templ* {{[^,]*}})
-// CHECK: define internal void @_ZN5TemplIiE1fEv(%struct.Templ* {{[^,]*}} %this)
-// CHECK: define internal void @_ZN5TemplIiE1gEv(%struct.Templ* {{[^,]*}} %this)
+// CHECK: getelementptr inbounds (ptr, ptr @_ZTV5TemplIiE, i64 2)
+// CHECK: declare void @_ZN5TemplIiED0Ev(ptr {{[^,]*}})
+// CHECK: define internal void @_ZN5TemplIiE1fEv(ptr {{[^,]*}} %this)
+// CHECK: define internal void @_ZN5TemplIiE1gEv(ptr {{[^,]*}} %this)

diff  --git a/clang/test/CodeGenCXX/apple-kext.cpp b/clang/test/CodeGenCXX/apple-kext.cpp
index 4deb6f6c88070..a3007e5a49e2c 100644
--- a/clang/test/CodeGenCXX/apple-kext.cpp
+++ b/clang/test/CodeGenCXX/apple-kext.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -fno-use-cxa-atexit -fapple-kext -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fno-use-cxa-atexit -fapple-kext -emit-llvm -o - %s | FileCheck %s
 
 // CHECK: @_ZN5test01aE ={{.*}} global [[A:%.*]] zeroinitializer
-// CHECK: @llvm.global_ctors = appending global {{.*}} { i32 65535, void ()* [[CTOR0:@.*]], i8* null }
-// CHECK: @llvm.global_dtors = appending global {{.*}} { i32 65535, void ()* [[DTOR0:@.*]], i8* null }
+// CHECK: @llvm.global_ctors = appending global {{.*}} { i32 65535, ptr [[CTOR0:@.*]], ptr null }
+// CHECK: @llvm.global_dtors = appending global {{.*}} { i32 65535, ptr [[DTOR0:@.*]], ptr null }
 
 // Check that the base destructor is marked as always_inline when generating
 // code for kext.
@@ -29,7 +29,7 @@ namespace test0 {
   A a;
 }
 // CHECK:    define internal void [[CTOR0_:@.*]]()
-// CHECK:      call void @_ZN5test01AC1Ev([[A]]* {{[^,]*}} @_ZN5test01aE)
+// CHECK:      call void @_ZN5test01AC1Ev(ptr {{[^,]*}} @_ZN5test01aE)
 // CHECK-NEXT: ret void
 
 // CHECK:    define internal void [[CTOR0]]()
@@ -37,7 +37,7 @@ namespace test0 {
 // CHECK-NEXT: ret void
 
 // CHECK:    define internal void [[DTOR0]]()
-// CHECK:      call void @_ZN5test01AD1Ev([[A]]* @_ZN5test01aE)
+// CHECK:      call void @_ZN5test01AD1Ev(ptr @_ZN5test01aE)
 // CHECK-NEXT: ret void
 
 // CHECK: attributes #[[ATTR0]] = { alwaysinline nounwind {{.*}} }

diff  --git a/clang/test/CodeGenCXX/arm-cc.cpp b/clang/test/CodeGenCXX/arm-cc.cpp
index 0be0cd1ce058c..967d10096f72b 100644
--- a/clang/test/CodeGenCXX/arm-cc.cpp
+++ b/clang/test/CodeGenCXX/arm-cc.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=arm-unknown-linux-gnueabi -target-abi aapcs -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=arm-unknown-linux-gnueabi -target-abi aapcs -emit-llvm -o - | FileCheck %s
 
 class SMLoc {
  const char *Ptr;
@@ -16,5 +16,5 @@ void baz() {
   zed(a);
 }
 
-// CHECK: declare void @_Z3fooPv(%class.SMLoc* sret(%class.SMLoc) align 4, i8* noundef)
-// CHECK: declare void @_Z3zed5SMLoc(%class.SMLoc* noundef)
+// CHECK: declare void @_Z3fooPv(ptr sret(%class.SMLoc) align 4, ptr noundef)
+// CHECK: declare void @_Z3zed5SMLoc(ptr noundef)

diff  --git a/clang/test/CodeGenCXX/arm64-constructor-return.cpp b/clang/test/CodeGenCXX/arm64-constructor-return.cpp
index 453d3788a38ae..54d6cfcff8bd3 100644
--- a/clang/test/CodeGenCXX/arm64-constructor-return.cpp
+++ b/clang/test/CodeGenCXX/arm64-constructor-return.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=arm64-apple-ios7.0.0 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=arm64-apple-ios7.0.0 -emit-llvm -o - | FileCheck %s
 // rdar://12162905
 
 struct S {
@@ -10,10 +10,10 @@ S::S() {
   iField = 1;
 };
 
-// CHECK: %struct.S* @_ZN1SC2Ev(%struct.S* {{[^,]*}} %this)
+// CHECK: ptr @_ZN1SC2Ev(ptr {{[^,]*}} %this)
 
-// CHECK: %struct.S* @_ZN1SC1Ev(%struct.S* {{[^,]*}} returned align 4 dereferenceable(4) %this)
-// CHECK: [[THISADDR:%[a-zA-Z0-9.]+]] = alloca %struct.S*
-// CHECK: store %struct.S* %this, %struct.S** [[THISADDR]]
-// CHECK: [[THIS1:%.*]] = load %struct.S*, %struct.S** [[THISADDR]]
-// CHECK: ret %struct.S* [[THIS1]]
+// CHECK: ptr @_ZN1SC1Ev(ptr {{[^,]*}} returned align 4 dereferenceable(4) %this)
+// CHECK: [[THISADDR:%[a-zA-Z0-9.]+]] = alloca ptr
+// CHECK: store ptr %this, ptr [[THISADDR]]
+// CHECK: [[THIS1:%.*]] = load ptr, ptr [[THISADDR]]
+// CHECK: ret ptr [[THIS1]]

diff  --git a/clang/test/CodeGenCXX/arm64-empty-struct.cpp b/clang/test/CodeGenCXX/arm64-empty-struct.cpp
index a509a42f7ce39..c6009056f228e 100644
--- a/clang/test/CodeGenCXX/arm64-empty-struct.cpp
+++ b/clang/test/CodeGenCXX/arm64-empty-struct.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-ios -target-abi darwinpcs -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-apple-ios -target-abi darwinpcs -emit-llvm -o - %s | FileCheck %s
 struct Empty {};
 
 Empty emptyvar;
@@ -9,18 +9,17 @@ int take_args(int a, ...) {
 // CHECK: call void @llvm.va_start
 
   emptyvar = __builtin_va_arg(l, Empty);
-// CHECK: load i8*, i8**
+// CHECK: load ptr, ptr
 // CHECK-NOT: getelementptr
-// CHECK: [[EMPTY_PTR:%[a-zA-Z0-9._]+]] = bitcast i8* {{%[a-zA-Z0-9._]+}} to %struct.Empty*
 
   // It's conceivable that EMPTY_PTR may not actually be a valid pointer
   // (e.g. it's at the very bottom of the stack and the next page is
   // invalid). This doesn't matter provided it's never loaded (there's no
   // well-defined way to tell), but it becomes a problem if we do try to use it.
-// CHECK-NOT: load %struct.Empty, %struct.Empty* [[EMPTY_PTR]]
+// CHECK-NOT: load %struct.Empty, ptr {{%[a-zA-Z0-9._]+}}
 
   int i = __builtin_va_arg(l, int);
-// CHECK: va_arg i8** {{%[a-zA-Z0-9._]+}}, i32
+// CHECK: va_arg ptr {{%[a-zA-Z0-9._]+}}, i32
 
   __builtin_va_end(l);
   return i;

diff  --git a/clang/test/CodeGenCXX/assign-construct-memcpy.cpp b/clang/test/CodeGenCXX/assign-construct-memcpy.cpp
index d67d68d650702..7d6c5d76107da 100644
--- a/clang/test/CodeGenCXX/assign-construct-memcpy.cpp
+++ b/clang/test/CodeGenCXX/assign-construct-memcpy.cpp
@@ -1,5 +1,5 @@
-/// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin12 -emit-llvm -o - -std=c++11 %s -DPOD | FileCheck %s -check-prefix=CHECK-POD
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin12 -emit-llvm -o - -std=c++11 %s | FileCheck %s -check-prefix=CHECK-NONPOD
+/// RUN: %clang_cc1 -triple x86_64-apple-darwin12 -emit-llvm -o - -std=c++11 %s -DPOD | FileCheck %s -check-prefix=CHECK-POD
+// RUN: %clang_cc1 -triple x86_64-apple-darwin12 -emit-llvm -o - -std=c++11 %s | FileCheck %s -check-prefix=CHECK-NONPOD
 
 // Declare the reserved placement operators.
 typedef __typeof__(sizeof(0)) size_t;
@@ -23,47 +23,47 @@ struct foo {
 foo *test1(void *f, const foo &x) {
   return new (f) foo(x);
 // CHECK-POD: test1
-// CHECK-POD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
+// CHECK-POD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
 
 // CHECK-NONPOD: test1
-// CHECK-NONPOD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
+// CHECK-NONPOD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
 }
 
 foo *test2(const foo &x) {
   return new foo(x);
 // CHECK-POD: test2
-// CHECK-POD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 16 {{.*}} align 8 {{.*}}i64 24
+// CHECK-POD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 16 {{.*}} align 8 {{.*}}i64 24
 
 // CHECK-NONPOD: test2
-// CHECK-NONPOD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 16 {{.*}} align 8 {{.*}}i64 24
+// CHECK-NONPOD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 16 {{.*}} align 8 {{.*}}i64 24
 }
 
 foo test3(const foo &x) {
   foo f = x;
   return f;
 // CHECK-POD: test3
-// CHECK-POD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
+// CHECK-POD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
 
 // CHECK-NONPOD: test3
-// CHECK-NONPOD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
+// CHECK-NONPOD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
 }
 
 foo *test4(foo &&x) {
   return new foo(x);
 // CHECK-POD: test4
-// CHECK-POD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 16 {{.*}} align 8 {{.*}}i64 24
+// CHECK-POD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 16 {{.*}} align 8 {{.*}}i64 24
 
 // CHECK-NONPOD: test4
-// CHECK-NONPOD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 16 {{.*}} align 8 {{.*}}i64 24
+// CHECK-NONPOD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 16 {{.*}} align 8 {{.*}}i64 24
 }
 
 void test5(foo &f, const foo &x) {
   f = x;
 // CHECK-POD: test5
-// CHECK-POD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
+// CHECK-POD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
 
 // CHECK-NONPOD: test5
-// CHECK-NONPOD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 17
+// CHECK-NONPOD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 17
 }
 
 extern foo globtest;
@@ -71,10 +71,10 @@ extern foo globtest;
 void test6(foo &&x) {
   globtest = move(x);
 // CHECK-POD: test6
-// CHECK-POD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
+// CHECK-POD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
 
 // CHECK-NONPOD: test6
-// CHECK-NONPOD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 17
+// CHECK-NONPOD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 17
 }
 
 void byval(foo f);
@@ -82,8 +82,8 @@ void byval(foo f);
 void test7(const foo &x) {
   byval(x);
 // CHECK-POD: test7
-// CHECK-POD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
+// CHECK-POD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
 
 // CHECK-NONPOD: test7
-// CHECK-NONPOD: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
+// CHECK-NONPOD: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 24
 }

diff  --git a/clang/test/CodeGenCXX/atomic-dllexport.cpp b/clang/test/CodeGenCXX/atomic-dllexport.cpp
index d66f150e31ca7..be96f132a948d 100644
--- a/clang/test/CodeGenCXX/atomic-dllexport.cpp
+++ b/clang/test/CodeGenCXX/atomic-dllexport.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-msvc -emit-llvm -std=c++11 -fms-extensions -O0 -o - %s | FileCheck --check-prefix=M32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-msvc -emit-llvm -std=c++11 -fms-extensions -O0 -o - %s | FileCheck --check-prefix=M64 %s
+// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++11 -fms-extensions -O0 -o - %s | FileCheck --check-prefix=M32 %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -std=c++11 -fms-extensions -O0 -o - %s | FileCheck --check-prefix=M64 %s
 
 struct __declspec(dllexport) SomeStruct {
   // Copy assignment operator should be produced, and exported:
-  // M32: define weak_odr dso_local dllexport x86_thiscallcc noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.SomeStruct* @"??4SomeStruct@@QAEAAU0 at ABU0@@Z"
-  // M64: define weak_odr dso_local dllexport                noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.SomeStruct* @"??4SomeStruct@@QEAAAEAU0 at AEBU0@@Z"
+  // M32: define weak_odr dso_local dllexport x86_thiscallcc noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4SomeStruct@@QAEAAU0 at ABU0@@Z"
+  // M64: define weak_odr dso_local dllexport                noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4SomeStruct@@QEAAAEAU0 at AEBU0@@Z"
   _Atomic(int) mData;
 };

diff  --git a/clang/test/CodeGenCXX/atomic-inline.cpp b/clang/test/CodeGenCXX/atomic-inline.cpp
index 56663961c8c74..701bbd57b485c 100644
--- a/clang/test/CodeGenCXX/atomic-inline.cpp
+++ b/clang/test/CodeGenCXX/atomic-inline.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++11 -emit-llvm -o - -triple=x86_64-linux-gnu | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++11 -emit-llvm -o - -triple=x86_64-linux-gnu -target-cpu core2 | FileCheck %s --check-prefix=CORE2
+// RUN: %clang_cc1 %s -std=c++11 -emit-llvm -o - -triple=x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 %s -std=c++11 -emit-llvm -o - -triple=x86_64-linux-gnu -target-cpu core2 | FileCheck %s --check-prefix=CORE2
 // Check the atomic code generation for cpu targets w/wo cx16 support.
 
 struct alignas(8) AM8 {
@@ -28,9 +28,9 @@ void store8() {
 bool cmpxchg8() {
   AM8 am;
   // CHECK-LABEL: @_Z8cmpxchg8v
-  // CHECK: cmpxchg i64* {{.*}} monotonic, align 8
+  // CHECK: cmpxchg ptr {{.*}} monotonic, align 8
   // CORE2-LABEL: @_Z8cmpxchg8v
-  // CORE2: cmpxchg i64* {{.*}} monotonic, align 8
+  // CORE2: cmpxchg ptr {{.*}} monotonic, align 8
   return __atomic_compare_exchange(&m8, &s8, &am, 0, 0, 0);
 }
 
@@ -63,6 +63,6 @@ bool cmpxchg16() {
   // CHECK-LABEL: @_Z9cmpxchg16v
   // CHECK: call noundef zeroext i1 @__atomic_compare_exchange
   // CORE2-LABEL: @_Z9cmpxchg16v
-  // CORE2: cmpxchg i128* {{.*}} monotonic monotonic, align 16
+  // CORE2: cmpxchg ptr {{.*}} monotonic monotonic, align 16
   return __atomic_compare_exchange(&m16, &s16, &am, 0, 0, 0);
 }

diff  --git a/clang/test/CodeGenCXX/atomic.cpp b/clang/test/CodeGenCXX/atomic.cpp
index ed2161bdced67..fb584c1e8f435 100644
--- a/clang/test/CodeGenCXX/atomic.cpp
+++ b/clang/test/CodeGenCXX/atomic.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=i686-apple-darwin9 | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-apple-darwin9 | FileCheck %s
 
 namespace PR11411 {
   template<typename _Tp> struct Ptr {
@@ -9,7 +9,7 @@ namespace PR11411 {
   // CHECK-NOT: ret
   template<typename _Tp> inline void Ptr<_Tp>::f() {
     int* _refcount;
-    // CHECK: atomicrmw add i32* {{.*}} seq_cst, align 4
+    // CHECK: atomicrmw add ptr {{.*}} seq_cst, align 4
     __sync_fetch_and_add(_refcount, 1);
     // CHECK-NEXT: ret void
   }

diff  --git a/clang/test/CodeGenCXX/atomicinit.cpp b/clang/test/CodeGenCXX/atomicinit.cpp
index 894396f456a67..275710975e078 100644
--- a/clang/test/CodeGenCXX/atomicinit.cpp
+++ b/clang/test/CodeGenCXX/atomicinit.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fno-inline-functions %s -emit-llvm -O1 -o - -triple=i686-apple-darwin9 -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -fno-inline-functions %s -emit-llvm -O1 -o - -triple=i686-apple-darwin9 -std=c++11 | FileCheck %s
 
 // CHECK-DAG: @PR22043 ={{.*}} local_unnamed_addr global i32 0, align 4
 typedef _Atomic(int) AtomicInt;
@@ -65,15 +65,15 @@ namespace PR18097 {
     };
 
     // CHECK-LABEL: define {{.*}} @__cxx_global_var_init
-    // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* noundef {{[^,]*}} @_ZN7PR180977dynamic1aE, i32 noundef 1)
+    // CHECK: call void @_ZN7PR180977dynamic1XC1Ei(ptr noundef {{[^,]*}} @_ZN7PR180977dynamic1aE, i32 noundef 1)
     _Atomic(X) a = X(1);
 
     // CHECK-LABEL: define {{.*}} @__cxx_global_var_init
-    // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* noundef {{[^,]*}} @_ZN7PR180977dynamic1bE, i32 noundef 2)
+    // CHECK: call void @_ZN7PR180977dynamic1XC1Ei(ptr noundef {{[^,]*}} @_ZN7PR180977dynamic1bE, i32 noundef 2)
     _Atomic(X) b(X(2));
 
     // CHECK-LABEL: define {{.*}} @__cxx_global_var_init
-    // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* noundef {{[^,]*}} @_ZN7PR180977dynamic1cE, i32 noundef 3)
+    // CHECK: call void @_ZN7PR180977dynamic1XC1Ei(ptr noundef {{[^,]*}} @_ZN7PR180977dynamic1cE, i32 noundef 3)
     _Atomic(X) c{X(3)};
 
     struct Y {
@@ -81,8 +81,8 @@ namespace PR18097 {
       _Atomic(int) b;
     };
     // CHECK-LABEL: define {{.*}} @__cxx_global_var_init
-    // CHECK: call void @_ZN7PR180977dynamic1XC1Ei({{.*}}* {{[^,]*}} getelementptr inbounds ({{.*}}, {{.*}}* @_ZN7PR180977dynamic1yE, i32 0, i32 0), i32 noundef 4)
-    // CHECK: store i32 5, i32* getelementptr inbounds ({{.*}}, {{.*}}* @_ZN7PR180977dynamic1yE, i32 0, i32 1)
+    // CHECK: call void @_ZN7PR180977dynamic1XC1Ei(ptr {{[^,]*}} @_ZN7PR180977dynamic1yE, i32 noundef 4)
+    // CHECK: store i32 5, ptr getelementptr inbounds ({{.*}}, ptr @_ZN7PR180977dynamic1yE, i32 0, i32 1)
     Y y = { X(4), 5 };
   }
 

diff  --git a/clang/test/CodeGenCXX/attr-annotate.cpp b/clang/test/CodeGenCXX/attr-annotate.cpp
index bbbe46f6bdcc4..dfe88b63049c5 100644
--- a/clang/test/CodeGenCXX/attr-annotate.cpp
+++ b/clang/test/CodeGenCXX/attr-annotate.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -S -emit-llvm -triple x86_64-unknown-linux-gnu -o - | FileCheck %s
+// RUN: %clang_cc1 %s -S -emit-llvm -triple x86_64-unknown-linux-gnu -o - | FileCheck %s
 
 //CHECK: @[[STR1:.*]] = private unnamed_addr constant [{{.*}} x i8] c"{{.*}}attr-annotate.cpp\00", section "llvm.metadata"
 //CHECK: @[[STR2:.*]] = private unnamed_addr constant [4 x i8] c"abc\00", align 1
 //CHECK: @[[STR:.*]] = private unnamed_addr constant [5 x i8] c"test\00", section "llvm.metadata"
-//CHECK: @[[ARGS:.*]] = private unnamed_addr constant { i32, i8*, i32 } { i32 9, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @[[STR2:.*]], i32 0, i32 0), i32 8 }, section "llvm.metadata"
-//CHECK: @[[ARGS2:.*]] = private unnamed_addr constant { %struct.Struct } { %struct.Struct { i32* getelementptr inbounds ([2 x i32], [2 x i32]* @_ZN1AIjLj9EE2SVE, i32 0, i32 0), i32* bitcast (i8* getelementptr (i8, i8* bitcast ([2 x i32]* @_ZN1AIjLj9EE2SVE to i8*), i64 4) to i32*) } }, section "llvm.metadata"
-//CHECK: @llvm.global.annotations = appending global [2 x { i8*, i8*, i8*, i32, i8* }] [{ i8*, i8*, i8*, i32, i8* } { i8* bitcast (void (%struct.A*)* @_ZN1AIjLj9EE4testILi8EEEvv to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @[[STR:.*]], i32 0, i32 0), i8* getelementptr inbounds ([{{.*}} x i8], [{{.*}} x i8]* @[[STR1:.*]], i32 0, i32 0), i32 {{.*}}, i8* bitcast ({ i32, i8*, i32 }* @[[ARGS:.*]] to i8*) }, { i8*, i8*, i8*, i32, i8* } { i8* bitcast (void (%struct.A*)* @_ZN1AIjLj9EE5test2Ev to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i32 0, i32 0), i8* getelementptr inbounds ([{{.*}} x i8], [{{.*}} x i8]* @.str.1, i32 0, i32 0), i32 24, i8* bitcast ({ %struct.Struct }* @[[ARGS2]] to i8*) }]
+//CHECK: @[[ARGS:.*]] = private unnamed_addr constant { i32, ptr, i32 } { i32 9, ptr @[[STR2:.*]], i32 8 }, section "llvm.metadata"
+//CHECK: @[[ARGS2:.*]] = private unnamed_addr constant { %struct.Struct } { %struct.Struct { ptr @_ZN1AIjLj9EE2SVE, ptr getelementptr (i8, ptr @_ZN1AIjLj9EE2SVE, i64 4) } }, section "llvm.metadata"
+//CHECK: @llvm.global.annotations = appending global [2 x { ptr, ptr, ptr, i32, ptr }] [{ ptr, ptr, ptr, i32, ptr } { ptr @_ZN1AIjLj9EE4testILi8EEEvv, ptr @[[STR:.*]], ptr @[[STR1:.*]], i32 {{.*}}, ptr @[[ARGS:.*]] }, { ptr, ptr, ptr, i32, ptr } { ptr @_ZN1AIjLj9EE5test2Ev, ptr @.str.6, ptr @.str.1, i32 24, ptr @[[ARGS2]] }]
 
 constexpr const char* str() {
   return "abc";
@@ -44,27 +44,20 @@ static B<int long, -1>::foo<unsigned, 9> gf;
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[ARGC_ADDR:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    [[ARGV_ADDR:%.*]] = alloca i8**, align 8
+// CHECK-NEXT:    [[ARGV_ADDR:%.*]] = alloca ptr, align 8
 // CHECK-NEXT:    [[F:%.*]] = alloca %"struct.B<int, 7>::foo", align 4
-// CHECK-NEXT:    store i32 0, i32* [[RETVAL]], align 4
-// CHECK-NEXT:    store i32 [[ARGC:%.*]], i32* [[ARGC_ADDR]], align 4
-// CHECK-NEXT:    store i8** [[ARGV:%.*]], i8*** [[ARGV_ADDR]], align 8
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
-// CHECK-NEXT:    [[V:%.*]] = getelementptr inbounds %"struct.B<int, 7>::foo", %"struct.B<int, 7>::foo"* [[F]], i32 0, i32 0
-// CHECK-NEXT:    [[TMP1:%.*]] = bitcast i32* [[V]] to i8*
-// CHECK-NEXT:    [[TMP2:%.*]] = call i8* @llvm.ptr.annotation.p0i8(i8* [[TMP1]], i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([{{.*}} x i8], [{{.*}} x i8]* @.str.1, i32 0, i32 0), i32 {{.*}}, i8* bitcast ({ i8*, i32, i32 }* @.args to i8*))
-// CHECK-NEXT:    [[TMP3:%.*]] = bitcast i8* [[TMP2]] to i32*
-// CHECK-NEXT:    [[TMP4:%.*]] = bitcast i32* [[TMP3]] to i8*
-// CHECK-NEXT:    [[TMP5:%.*]] = call i8* @llvm.ptr.annotation.p0i8(i8* [[TMP4]], i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([{{.*}} x i8], [{{.*}} x i8]* @.str.1, i32 0, i32 0), i32 {{.*}}, i8* bitcast ({ i32 }* @.args.4 to i8*))
-// CHECK-NEXT:    [[TMP6:%.*]] = bitcast i8* [[TMP5]] to i32*
-// CHECK-NEXT:    store i32 [[TMP0]], i32* [[TMP6]], align 4
-// CHECK-NEXT:    [[TMP7:%.*]] = load i32, i32* [[ARGC_ADDR]], align 4
-// CHECK-NEXT:    [[TMP8:%.*]] = call i8* @llvm.ptr.annotation.p0i8(i8* bitcast (%"struct.B<long, -1>::foo"* @_ZL2gf to i8*), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([{{.*}} x i8], [{{.*}} x i8]* @.str.1, i32 0, i32 0), i32 {{.*}}, i8* bitcast ({ i8*, i32, i64 }* @.args.5 to i8*))
-// CHECK-NEXT:    [[TMP9:%.*]] = bitcast i8* [[TMP8]] to i32*
-// CHECK-NEXT:    [[TMP10:%.*]] = bitcast i32* [[TMP9]] to i8*
-// CHECK-NEXT:    [[TMP11:%.*]] = call i8* @llvm.ptr.annotation.p0i8(i8* [[TMP10]], i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i32 0, i32 0), i8* getelementptr inbounds ([{{.*}} x i8], [{{.*}} x i8]* @.str.1, i32 0, i32 0), i32 {{.*}}, i8* bitcast ({ i32 }* @.args.4 to i8*))
-// CHECK-NEXT:    [[TMP12:%.*]] = bitcast i8* [[TMP11]] to i32*
-// CHECK-NEXT:    store i32 [[TMP7]], i32* [[TMP12]], align 4
+// CHECK-NEXT:    store i32 0, ptr [[RETVAL]], align 4
+// CHECK-NEXT:    store i32 [[ARGC:%.*]], ptr [[ARGC_ADDR]], align 4
+// CHECK-NEXT:    store ptr [[ARGV:%.*]], ptr [[ARGV_ADDR]], align 8
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[ARGC_ADDR]], align 4
+// CHECK-NEXT:    [[V:%.*]] = getelementptr inbounds %"struct.B<int, 7>::foo", ptr [[F]], i32 0, i32 0
+// CHECK-NEXT:    [[TMP2:%.*]] = call ptr @llvm.ptr.annotation.p0(ptr [[V]], ptr @.str, ptr @.str.1, i32 {{.*}}, ptr @.args)
+// CHECK-NEXT:    [[TMP5:%.*]] = call ptr @llvm.ptr.annotation.p0(ptr [[TMP2]], ptr @.str.3, ptr @.str.1, i32 {{.*}}, ptr @.args.4)
+// CHECK-NEXT:    store i32 [[TMP0]], ptr [[TMP5]], align 4
+// CHECK-NEXT:    [[TMP7:%.*]] = load i32, ptr [[ARGC_ADDR]], align 4
+// CHECK-NEXT:    [[TMP8:%.*]] = call ptr @llvm.ptr.annotation.p0(ptr @_ZL2gf, ptr @.str, ptr @.str.1, i32 {{.*}}, ptr @.args.5)
+// CHECK-NEXT:    [[TMP11:%.*]] = call ptr @llvm.ptr.annotation.p0(ptr [[TMP8]], ptr @.str.3, ptr @.str.1, i32 {{.*}}, ptr @.args.4)
+// CHECK-NEXT:    store i32 [[TMP7]], ptr [[TMP11]], align 4
 // CHECK-NEXT:    ret i32 0
 //
 int main(int argc, char **argv) {

diff  --git a/clang/test/CodeGenCXX/attr-annotate2.cpp b/clang/test/CodeGenCXX/attr-annotate2.cpp
index 6e7997455c6b2..fc6f699590f8b 100644
--- a/clang/test/CodeGenCXX/attr-annotate2.cpp
+++ b/clang/test/CodeGenCXX/attr-annotate2.cpp
@@ -1,5 +1,5 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
-// RUN: %clang_cc1 -no-opaque-pointers %s -S -emit-llvm -triple x86_64-unknown-linux-gnu -o - | FileCheck %s
+// RUN: %clang_cc1 %s -S -emit-llvm -triple x86_64-unknown-linux-gnu -o - | FileCheck %s
 
 // CHECK: @[[STR:.*]] = private unnamed_addr constant [45 x i8] c"_Generic selection expression should be fine\00", section "llvm.metadata"
 // CHECK-NEXT: @[[FILENAME:.*]] = private unnamed_addr constant {{.*}}, section "llvm.metadata"
@@ -9,10 +9,9 @@
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[N:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[J:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store i32 10, i32* [[N]], align 4
-// CHECK-NEXT:    [[J1:%.*]] = bitcast i32* [[J]] to i8*
-// CHECK-NEXT:    call void @llvm.var.annotation(i8* [[J1]], i8* getelementptr inbounds ([45 x i8], [45 x i8]* @[[STR]], i32 0, i32 0), i8* getelementptr inbounds ([{{[0-9]+}} x i8], [{{[0-9]+}} x i8]* @[[FILENAME]], i32 0, i32 0), i32 {{.*}}, i8* bitcast ({ i32 }* @[[ARGS]] to i8*))
-// CHECK-NEXT:    store i32 0, i32* [[J]], align 4
+// CHECK-NEXT:    store i32 10, ptr [[N]], align 4
+// CHECK-NEXT:    call void @llvm.var.annotation(ptr [[J]], ptr @[[STR]], ptr @[[FILENAME]], i32 {{.*}}, ptr @[[ARGS]])
+// CHECK-NEXT:    store i32 0, ptr [[J]], align 4
 // CHECK-NEXT:    ret void
 //
 void f() {

diff  --git a/clang/test/CodeGenCXX/attr-cpuspecific-outoflinedefs.cpp b/clang/test/CodeGenCXX/attr-cpuspecific-outoflinedefs.cpp
index e9e4546f5036a..ef2498bd7e14c 100644
--- a/clang/test/CodeGenCXX/attr-cpuspecific-outoflinedefs.cpp
+++ b/clang/test/CodeGenCXX/attr-cpuspecific-outoflinedefs.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-pc -fms-compatibility -emit-llvm -o - %s | FileCheck %s --check-prefix=WINDOWS
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=LINUX
+// RUN: %clang_cc1 -triple x86_64-windows-pc -fms-compatibility -emit-llvm -o - %s | FileCheck %s --check-prefix=WINDOWS
 
 struct OutOfLineDefs {
   int foo(int);
@@ -38,60 +38,60 @@ OutOfLineDefs::foo(int, int, int) {
 }
 
 // IFunc definitions, Linux only.
-// LINUX: @_ZN13OutOfLineDefs3fooEi = weak_odr alias i32 (%struct.OutOfLineDefs*, i32), i32 (%struct.OutOfLineDefs*, i32)* @_ZN13OutOfLineDefs3fooEi.ifunc
-// LINUX: @_ZN13OutOfLineDefs3fooEii = weak_odr alias i32 (%struct.OutOfLineDefs*, i32, i32), i32 (%struct.OutOfLineDefs*, i32, i32)* @_ZN13OutOfLineDefs3fooEii.ifunc
-// LINUX: @_ZN13OutOfLineDefs3fooEiii = weak_odr alias i32 (%struct.OutOfLineDefs*, i32, i32, i32), i32 (%struct.OutOfLineDefs*, i32, i32, i32)* @_ZN13OutOfLineDefs3fooEiii.ifunc
+// LINUX: @_ZN13OutOfLineDefs3fooEi = weak_odr alias i32 (ptr, i32), ptr @_ZN13OutOfLineDefs3fooEi.ifunc
+// LINUX: @_ZN13OutOfLineDefs3fooEii = weak_odr alias i32 (ptr, i32, i32), ptr @_ZN13OutOfLineDefs3fooEii.ifunc
+// LINUX: @_ZN13OutOfLineDefs3fooEiii = weak_odr alias i32 (ptr, i32, i32, i32), ptr @_ZN13OutOfLineDefs3fooEiii.ifunc
 
-// LINUX: @_ZN13OutOfLineDefs3fooEi.ifunc = weak_odr ifunc i32 (%struct.OutOfLineDefs*, i32), i32 (%struct.OutOfLineDefs*, i32)* ()* @_ZN13OutOfLineDefs3fooEi.resolver
-// LINUX: @_ZN13OutOfLineDefs3fooEii.ifunc = weak_odr ifunc i32 (%struct.OutOfLineDefs*, i32, i32), i32 (%struct.OutOfLineDefs*, i32, i32)* ()* @_ZN13OutOfLineDefs3fooEii.resolver
-// LINUX: @_ZN13OutOfLineDefs3fooEiii.ifunc = weak_odr ifunc i32 (%struct.OutOfLineDefs*, i32, i32, i32), i32 (%struct.OutOfLineDefs*, i32, i32, i32)* ()* @_ZN13OutOfLineDefs3fooEiii.resolver
+// LINUX: @_ZN13OutOfLineDefs3fooEi.ifunc = weak_odr ifunc i32 (ptr, i32), ptr @_ZN13OutOfLineDefs3fooEi.resolver
+// LINUX: @_ZN13OutOfLineDefs3fooEii.ifunc = weak_odr ifunc i32 (ptr, i32, i32), ptr @_ZN13OutOfLineDefs3fooEii.resolver
+// LINUX: @_ZN13OutOfLineDefs3fooEiii.ifunc = weak_odr ifunc i32 (ptr, i32, i32, i32), ptr @_ZN13OutOfLineDefs3fooEiii.resolver
 
 // Arity 1 version:
 // LINUX: define dso_local noundef i32 @_ZN13OutOfLineDefs3fooEi.O
 // LINUX: define dso_local noundef i32 @_ZN13OutOfLineDefs3fooEi.S
-// LINUX: define weak_odr i32 (%struct.OutOfLineDefs*, i32)* @_ZN13OutOfLineDefs3fooEi.resolver()
-// LINUX: ret i32 (%struct.OutOfLineDefs*, i32)* @_ZN13OutOfLineDefs3fooEi.S
-// LINUX: ret i32 (%struct.OutOfLineDefs*, i32)* @_ZN13OutOfLineDefs3fooEi.O
+// LINUX: define weak_odr ptr @_ZN13OutOfLineDefs3fooEi.resolver()
+// LINUX: ret ptr @_ZN13OutOfLineDefs3fooEi.S
+// LINUX: ret ptr @_ZN13OutOfLineDefs3fooEi.O
 // LINUX: call void @llvm.trap
 
 // WINDOWS: define dso_local noundef i32 @"?foo at OutOfLineDefs@@QEAAHH at Z.O"
 // WINDOWS: define dso_local noundef i32 @"?foo at OutOfLineDefs@@QEAAHH at Z.S"
-// WINDOWS: define weak_odr dso_local i32 @"?foo at OutOfLineDefs@@QEAAHH at Z"(%struct.OutOfLineDefs* %0, i32 %1)
-// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHH at Z.S"(%struct.OutOfLineDefs* %0, i32 %1)
-// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHH at Z.O"(%struct.OutOfLineDefs* %0, i32 %1)
+// WINDOWS: define weak_odr dso_local i32 @"?foo at OutOfLineDefs@@QEAAHH at Z"(ptr %0, i32 %1)
+// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHH at Z.S"(ptr %0, i32 %1)
+// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHH at Z.O"(ptr %0, i32 %1)
 // WINDOWS: call void @llvm.trap
 
 // Arity 2 version:
 // LINUX: define dso_local noundef i32 @_ZN13OutOfLineDefs3fooEii.O
 // LINUX: define dso_local noundef i32 @_ZN13OutOfLineDefs3fooEii.S
-// LINUX: define weak_odr i32 (%struct.OutOfLineDefs*, i32, i32)* @_ZN13OutOfLineDefs3fooEii.resolver()
-// LINUX: ret i32 (%struct.OutOfLineDefs*, i32, i32)* @_ZN13OutOfLineDefs3fooEii.S
-// LINUX: ret i32 (%struct.OutOfLineDefs*, i32, i32)* @_ZN13OutOfLineDefs3fooEii.O
+// LINUX: define weak_odr ptr @_ZN13OutOfLineDefs3fooEii.resolver()
+// LINUX: ret ptr @_ZN13OutOfLineDefs3fooEii.S
+// LINUX: ret ptr @_ZN13OutOfLineDefs3fooEii.O
 // LINUX: call void @llvm.trap
 
 // WINDOWS: define dso_local noundef i32 @"?foo at OutOfLineDefs@@QEAAHHH at Z.O"
 // WINDOWS: define dso_local noundef i32 @"?foo at OutOfLineDefs@@QEAAHHH at Z.S"
-// WINDOWS: define weak_odr dso_local i32 @"?foo at OutOfLineDefs@@QEAAHHH at Z"(%struct.OutOfLineDefs* %0, i32 %1, i32 %2)
-// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHHH at Z.S"(%struct.OutOfLineDefs* %0, i32 %1, i32 %2)
-// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHHH at Z.O"(%struct.OutOfLineDefs* %0, i32 %1, i32 %2)
+// WINDOWS: define weak_odr dso_local i32 @"?foo at OutOfLineDefs@@QEAAHHH at Z"(ptr %0, i32 %1, i32 %2)
+// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHHH at Z.S"(ptr %0, i32 %1, i32 %2)
+// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHHH at Z.O"(ptr %0, i32 %1, i32 %2)
 // WINDOWS: call void @llvm.trap
 
 // Arity 3 version:
 // LINUX: define dso_local noundef i32 @_ZN13OutOfLineDefs3fooEiii.S
 // LINUX: define dso_local noundef i32 @_ZN13OutOfLineDefs3fooEiii.R
-// LINUX: define weak_odr i32 (%struct.OutOfLineDefs*, i32, i32, i32)* @_ZN13OutOfLineDefs3fooEiii.resolver()
-// LINUX: ret i32 (%struct.OutOfLineDefs*, i32, i32, i32)* @_ZN13OutOfLineDefs3fooEiii.R
-// LINUX: ret i32 (%struct.OutOfLineDefs*, i32, i32, i32)* @_ZN13OutOfLineDefs3fooEiii.S
-// LINUX: ret i32 (%struct.OutOfLineDefs*, i32, i32, i32)* @_ZN13OutOfLineDefs3fooEiii.O
+// LINUX: define weak_odr ptr @_ZN13OutOfLineDefs3fooEiii.resolver()
+// LINUX: ret ptr @_ZN13OutOfLineDefs3fooEiii.R
+// LINUX: ret ptr @_ZN13OutOfLineDefs3fooEiii.S
+// LINUX: ret ptr @_ZN13OutOfLineDefs3fooEiii.O
 // LINUX: call void @llvm.trap
 // LINUX: define linkonce_odr noundef i32 @_ZN13OutOfLineDefs3fooEiii.O
 
 // WINDOWS: define dso_local noundef i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z.S"
 // WINDOWS: define dso_local noundef i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z.R"
-// WINDOWS: define weak_odr dso_local i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z"(%struct.OutOfLineDefs* %0, i32 %1, i32 %2, i32 %3)
-// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z.R"(%struct.OutOfLineDefs* %0, i32 %1, i32 %2, i32 %3)
-// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z.S"(%struct.OutOfLineDefs* %0, i32 %1, i32 %2, i32 %3)
-// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z.O"(%struct.OutOfLineDefs* %0, i32 %1, i32 %2, i32 %3)
+// WINDOWS: define weak_odr dso_local i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z"(ptr %0, i32 %1, i32 %2, i32 %3)
+// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z.R"(ptr %0, i32 %1, i32 %2, i32 %3)
+// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z.S"(ptr %0, i32 %1, i32 %2, i32 %3)
+// WINDOWS: musttail call i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z.O"(ptr %0, i32 %1, i32 %2, i32 %3)
 // WINDOWS: call void @llvm.trap
 // WINDOWS: define linkonce_odr dso_local noundef i32 @"?foo at OutOfLineDefs@@QEAAHHHH at Z.O"
 

diff  --git a/clang/test/CodeGenCXX/attr-cpuspecific.cpp b/clang/test/CodeGenCXX/attr-cpuspecific.cpp
index cf7274ab78307..60cba6da01754 100644
--- a/clang/test/CodeGenCXX/attr-cpuspecific.cpp
+++ b/clang/test/CodeGenCXX/attr-cpuspecific.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-pc -fms-compatibility -emit-llvm -o - %s | FileCheck %s --check-prefix=WINDOWS
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s --check-prefix=LINUX
+// RUN: %clang_cc1 -triple x86_64-windows-pc -fms-compatibility -emit-llvm -o - %s | FileCheck %s --check-prefix=WINDOWS
 
 struct S {
   __attribute__((cpu_specific(atom)))
@@ -13,16 +13,16 @@ void foo() {
   s.Func();
 }
 
-// LINUX: @_ZN1S4FuncEv = weak_odr alias void (%struct.S*), void (%struct.S*)* @_ZN1S4FuncEv.ifunc
-// LINUX: @_ZN1S4FuncEv.ifunc = weak_odr ifunc void (%struct.S*), void (%struct.S*)* ()* @_ZN1S4FuncEv.resolver
-// LINUX: define weak_odr void (%struct.S*)* @_ZN1S4FuncEv.resolver
-// LINUX: ret void (%struct.S*)* @_ZN1S4FuncEv.S
-// LINUX: ret void (%struct.S*)* @_ZN1S4FuncEv.O
+// LINUX: @_ZN1S4FuncEv = weak_odr alias void (ptr), ptr @_ZN1S4FuncEv.ifunc
+// LINUX: @_ZN1S4FuncEv.ifunc = weak_odr ifunc void (ptr), ptr @_ZN1S4FuncEv.resolver
+// LINUX: define weak_odr ptr @_ZN1S4FuncEv.resolver
+// LINUX: ret ptr @_ZN1S4FuncEv.S
+// LINUX: ret ptr @_ZN1S4FuncEv.O
 // LINUX: declare void @_ZN1S4FuncEv.S
 // LINUX: define linkonce_odr void @_ZN1S4FuncEv.O
 
-// WINDOWS: define weak_odr dso_local void @"?Func at S@@QEAAXXZ"(%struct.S* %0) comdat
-// WINDOWS: musttail call void @"?Func at S@@QEAAXXZ.S"(%struct.S* %0)
-// WINDOWS: musttail call void @"?Func at S@@QEAAXXZ.O"(%struct.S* %0)
+// WINDOWS: define weak_odr dso_local void @"?Func at S@@QEAAXXZ"(ptr %0) comdat
+// WINDOWS: musttail call void @"?Func at S@@QEAAXXZ.S"(ptr %0)
+// WINDOWS: musttail call void @"?Func at S@@QEAAXXZ.O"(ptr %0)
 // WINDOWS: declare dso_local void @"?Func at S@@QEAAXXZ.S"
 // WINDOWS: define linkonce_odr dso_local void @"?Func at S@@QEAAXXZ.O"

diff  --git a/clang/test/CodeGenCXX/attr-disable-tail-calls.cpp b/clang/test/CodeGenCXX/attr-disable-tail-calls.cpp
index 920947c92fe23..a45d9e6f881fa 100644
--- a/clang/test/CodeGenCXX/attr-disable-tail-calls.cpp
+++ b/clang/test/CodeGenCXX/attr-disable-tail-calls.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
 
 class B {
 public:
@@ -23,12 +23,12 @@ int foo1() {
   return t;
 }
 
-// CHECK: define linkonce_odr noundef i32 @_ZN1B2m3Ev(%class.B* {{[^,]*}} %this) [[ATTRFALSE:#[0-9]+]]
-// CHECK: declare noundef i32 @_ZN1B2m4Ev(%class.B* {{[^,]*}}) [[ATTRTRUE0:#[0-9]+]]
-// CHECK: define linkonce_odr noundef i32 @_ZN1B2m1Ev(%class.B* {{[^,]*}} %this) unnamed_addr [[ATTRTRUE1:#[0-9]+]]
-// CHECK: define linkonce_odr noundef i32 @_ZN1B2m2Ev(%class.B* {{[^,]*}} %this) unnamed_addr [[ATTRFALSE:#[0-9]+]]
-// CHECK: define linkonce_odr noundef i32 @_ZN1D2m1Ev(%class.D* {{[^,]*}} %this) unnamed_addr [[ATTRFALSE:#[0-9]+]]
-// CHECK: define linkonce_odr noundef i32 @_ZN1D2m2Ev(%class.D* {{[^,]*}} %this) unnamed_addr [[ATTRTRUE1:#[0-9]+]]
+// CHECK: define linkonce_odr noundef i32 @_ZN1B2m3Ev(ptr {{[^,]*}} %this) [[ATTRFALSE:#[0-9]+]]
+// CHECK: declare noundef i32 @_ZN1B2m4Ev(ptr {{[^,]*}}) [[ATTRTRUE0:#[0-9]+]]
+// CHECK: define linkonce_odr noundef i32 @_ZN1B2m1Ev(ptr {{[^,]*}} %this) unnamed_addr [[ATTRTRUE1:#[0-9]+]]
+// CHECK: define linkonce_odr noundef i32 @_ZN1B2m2Ev(ptr {{[^,]*}} %this) unnamed_addr [[ATTRFALSE:#[0-9]+]]
+// CHECK: define linkonce_odr noundef i32 @_ZN1D2m1Ev(ptr {{[^,]*}} %this) unnamed_addr [[ATTRFALSE:#[0-9]+]]
+// CHECK: define linkonce_odr noundef i32 @_ZN1D2m2Ev(ptr {{[^,]*}} %this) unnamed_addr [[ATTRTRUE1:#[0-9]+]]
 
 // CHECK-NOT: attributes [[ATTRFALSE]] = { {{.*}}"disable-tail-calls"="false"{{.*}} }
 // CHECK: attributes [[ATTRTRUE0]] = { {{.*}}"disable-tail-calls"="true"{{.*}} }

diff  --git a/clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp b/clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp
index ed276686a92a5..412edd6d3edc0 100644
--- a/clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp
+++ b/clang/test/CodeGenCXX/attr-likelihood-iteration-stmt.cpp
@@ -1,21 +1,21 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
-// RUN: %clang_cc1 -no-opaque-pointers -O1 -disable-llvm-passes -emit-llvm %s -o - -triple=x86_64-linux-gnu -verify
-// RUN: %clang_cc1 -no-opaque-pointers -O1 -disable-llvm-passes -emit-llvm %s -o - -triple=x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -O1 -disable-llvm-passes -emit-llvm %s -o - -triple=x86_64-linux-gnu -verify
+// RUN: %clang_cc1 -O1 -disable-llvm-passes -emit-llvm %s -o - -triple=x86_64-linux-gnu | FileCheck %s
 
 // CHECK-LABEL: @_Z2wli(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[E_ADDR:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store i32 [[E:%.*]], i32* [[E_ADDR]], align 4, !tbaa [[TBAA2:![0-9]+]]
+// CHECK-NEXT:    store i32 [[E:%.*]], ptr [[E_ADDR]], align 4, !tbaa [[TBAA2:![0-9]+]]
 // CHECK-NEXT:    br label [[WHILE_COND:%.*]]
 // CHECK:       while.cond:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0
 // CHECK-NEXT:    [[TOBOOL_EXPVAL:%.*]] = call i1 @llvm.expect.i1(i1 [[TOBOOL]], i1 true)
 // CHECK-NEXT:    br i1 [[TOBOOL_EXPVAL]], label [[WHILE_BODY:%.*]], label [[WHILE_END:%.*]]
 // CHECK:       while.body:
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP1]], 1
-// CHECK-NEXT:    store i32 [[INC]], i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[INC]], ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[WHILE_COND]], !llvm.loop [[LOOP6:![0-9]+]]
 // CHECK:       while.end:
 // CHECK-NEXT:    ret void
@@ -27,17 +27,17 @@ void wl(int e){
 // CHECK-LABEL: @_Z2wui(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[E_ADDR:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store i32 [[E:%.*]], i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[E:%.*]], ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[WHILE_COND:%.*]]
 // CHECK:       while.cond:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[TMP0]], 0
 // CHECK-NEXT:    [[TOBOOL_EXPVAL:%.*]] = call i1 @llvm.expect.i1(i1 [[TOBOOL]], i1 false)
 // CHECK-NEXT:    br i1 [[TOBOOL_EXPVAL]], label [[WHILE_BODY:%.*]], label [[WHILE_END:%.*]]
 // CHECK:       while.body:
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP1]], 1
-// CHECK-NEXT:    store i32 [[INC]], i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[INC]], ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[WHILE_COND]], !llvm.loop [[LOOP9:![0-9]+]]
 // CHECK:       while.end:
 // CHECK-NEXT:    ret void
@@ -49,12 +49,12 @@ void wu(int e){
 // CHECK-LABEL: @_Z15w_branch_elidedj(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[E_ADDR:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store i32 [[E:%.*]], i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[E:%.*]], ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[WHILE_BODY:%.*]]
 // CHECK:       while.body:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[INC:%.*]] = add i32 [[TMP0]], 1
-// CHECK-NEXT:    store i32 [[INC]], i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[INC]], ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[WHILE_BODY]], !llvm.loop [[LOOP10:![0-9]+]]
 //
 void w_branch_elided(unsigned e){
@@ -67,27 +67,25 @@ void w_branch_elided(unsigned e){
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[E_ADDR:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store i32 [[E:%.*]], i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast i32* [[I]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 4, i8* [[TMP0]]) #[[ATTR4:[0-9]+]]
-// CHECK-NEXT:    store i32 0, i32* [[I]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[E:%.*]], ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR4:[0-9]+]]
+// CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[FOR_COND:%.*]]
 // CHECK:       for.cond:
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* [[I]], align 4, !tbaa [[TBAA2]]
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr [[I]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[TMP1]], [[TMP2]]
 // CHECK-NEXT:    [[CMP_EXPVAL:%.*]] = call i1 @llvm.expect.i1(i1 [[CMP]], i1 true)
 // CHECK-NEXT:    br i1 [[CMP_EXPVAL]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
 // CHECK:       for.cond.cleanup:
-// CHECK-NEXT:    [[TMP3:%.*]] = bitcast i32* [[I]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 4, i8* [[TMP3]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[FOR_END:%.*]]
 // CHECK:       for.body:
 // CHECK-NEXT:    br label [[FOR_INC:%.*]]
 // CHECK:       for.inc:
-// CHECK-NEXT:    [[TMP4:%.*]] = load i32, i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[INC:%.*]] = add i32 [[TMP4]], 1
-// CHECK-NEXT:    store i32 [[INC]], i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[INC]], ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP11:![0-9]+]]
 // CHECK:       for.end:
 // CHECK-NEXT:    ret void
@@ -101,27 +99,25 @@ void fl(unsigned e)
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[E_ADDR:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store i32 [[E:%.*]], i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast i32* [[I]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 4, i8* [[TMP0]]) #[[ATTR4]]
-// CHECK-NEXT:    store i32 0, i32* [[I]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[E:%.*]], ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR4]]
+// CHECK-NEXT:    store i32 0, ptr [[I]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[FOR_COND:%.*]]
 // CHECK:       for.cond:
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* [[I]], align 4, !tbaa [[TBAA2]]
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr [[I]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32 [[TMP1]], [[TMP2]]
 // CHECK-NEXT:    [[CMP_EXPVAL:%.*]] = call i1 @llvm.expect.i1(i1 [[CMP]], i1 false)
 // CHECK-NEXT:    br i1 [[CMP_EXPVAL]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
 // CHECK:       for.cond.cleanup:
-// CHECK-NEXT:    [[TMP3:%.*]] = bitcast i32* [[I]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 4, i8* [[TMP3]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[FOR_END:%.*]]
 // CHECK:       for.body:
 // CHECK-NEXT:    br label [[FOR_INC:%.*]]
 // CHECK:       for.inc:
-// CHECK-NEXT:    [[TMP4:%.*]] = load i32, i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP4]], 1
-// CHECK-NEXT:    store i32 [[INC]], i32* [[E_ADDR]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[INC]], ptr [[E_ADDR]], align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP12:![0-9]+]]
 // CHECK:       for.end:
 // CHECK-NEXT:    ret void
@@ -144,55 +140,47 @@ void f_branch_elided()
 
 // CHECK-LABEL: @_Z3frlOA4_i(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[E_ADDR:%.*]] = alloca [4 x i32]*, align 8
-// CHECK-NEXT:    [[__RANGE1:%.*]] = alloca [4 x i32]*, align 8
-// CHECK-NEXT:    [[__BEGIN1:%.*]] = alloca i32*, align 8
-// CHECK-NEXT:    [[__END1:%.*]] = alloca i32*, align 8
+// CHECK-NEXT:    [[E_ADDR:%.*]] = alloca ptr, align 8
+// CHECK-NEXT:    [[__RANGE1:%.*]] = alloca ptr, align 8
+// CHECK-NEXT:    [[__BEGIN1:%.*]] = alloca ptr, align 8
+// CHECK-NEXT:    [[__END1:%.*]] = alloca ptr, align 8
 // CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store [4 x i32]* [[E:%.*]], [4 x i32]** [[E_ADDR]], align 8, !tbaa [[TBAA14:![0-9]+]]
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast [4 x i32]** [[__RANGE1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 8, i8* [[TMP0]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP1:%.*]] = load [4 x i32]*, [4 x i32]** [[E_ADDR]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    store [4 x i32]* [[TMP1]], [4 x i32]** [[__RANGE1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[TMP2:%.*]] = bitcast i32** [[__BEGIN1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 8, i8* [[TMP2]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP3:%.*]] = load [4 x i32]*, [4 x i32]** [[__RANGE1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[ARRAYDECAY:%.*]] = getelementptr inbounds [4 x i32], [4 x i32]* [[TMP3]], i64 0, i64 0
-// CHECK-NEXT:    store i32* [[ARRAYDECAY]], i32** [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[TMP4:%.*]] = bitcast i32** [[__END1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 8, i8* [[TMP4]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP5:%.*]] = load [4 x i32]*, [4 x i32]** [[__RANGE1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[ARRAYDECAY1:%.*]] = getelementptr inbounds [4 x i32], [4 x i32]* [[TMP5]], i64 0, i64 0
-// CHECK-NEXT:    [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[ARRAYDECAY1]], i64 4
-// CHECK-NEXT:    store i32* [[ADD_PTR]], i32** [[__END1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    store ptr [[E:%.*]], ptr [[E_ADDR]], align 8, !tbaa [[TBAA14:![0-9]+]]
+// CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 8, ptr [[__RANGE1]]) #[[ATTR4]]
+// CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[E_ADDR]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    store ptr [[TMP1]], ptr [[__RANGE1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 8, ptr [[__BEGIN1]]) #[[ATTR4]]
+// CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[__RANGE1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[ARRAYDECAY:%.*]] = getelementptr inbounds [4 x i32], ptr [[TMP3]], i64 0, i64 0
+// CHECK-NEXT:    store ptr [[ARRAYDECAY]], ptr [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 8, ptr [[__END1]]) #[[ATTR4]]
+// CHECK-NEXT:    [[TMP5:%.*]] = load ptr, ptr [[__RANGE1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[ARRAYDECAY1:%.*]] = getelementptr inbounds [4 x i32], ptr [[TMP5]], i64 0, i64 0
+// CHECK-NEXT:    [[ADD_PTR:%.*]] = getelementptr inbounds i32, ptr [[ARRAYDECAY1]], i64 4
+// CHECK-NEXT:    store ptr [[ADD_PTR]], ptr [[__END1]], align 8, !tbaa [[TBAA14]]
 // CHECK-NEXT:    br label [[FOR_COND:%.*]]
 // CHECK:       for.cond:
-// CHECK-NEXT:    [[TMP6:%.*]] = load i32*, i32** [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[TMP7:%.*]] = load i32*, i32** [[__END1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32* [[TMP6]], [[TMP7]]
+// CHECK-NEXT:    [[TMP6:%.*]] = load ptr, ptr [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[TMP7:%.*]] = load ptr, ptr [[__END1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[CMP:%.*]] = icmp ne ptr [[TMP6]], [[TMP7]]
 // CHECK-NEXT:    [[CMP_EXPVAL:%.*]] = call i1 @llvm.expect.i1(i1 [[CMP]], i1 true)
 // CHECK-NEXT:    br i1 [[CMP_EXPVAL]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
 // CHECK:       for.cond.cleanup:
-// CHECK-NEXT:    [[TMP8:%.*]] = bitcast i32** [[__END1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 8, i8* [[TMP8]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP9:%.*]] = bitcast i32** [[__BEGIN1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 8, i8* [[TMP9]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP10:%.*]] = bitcast [4 x i32]** [[__RANGE1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 8, i8* [[TMP10]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 8, ptr [[__END1]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 8, ptr [[__BEGIN1]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 8, ptr [[__RANGE1]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[FOR_END:%.*]]
 // CHECK:       for.body:
-// CHECK-NEXT:    [[TMP11:%.*]] = bitcast i32* [[I]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 4, i8* [[TMP11]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP12:%.*]] = load i32*, i32** [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4, !tbaa [[TBAA2]]
-// CHECK-NEXT:    store i32 [[TMP13]], i32* [[I]], align 4, !tbaa [[TBAA2]]
-// CHECK-NEXT:    [[TMP14:%.*]] = bitcast i32* [[I]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 4, i8* [[TMP14]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR4]]
+// CHECK-NEXT:    [[TMP12:%.*]] = load ptr, ptr [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[TMP13]], ptr [[I]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[FOR_INC:%.*]]
 // CHECK:       for.inc:
-// CHECK-NEXT:    [[TMP15:%.*]] = load i32*, i32** [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[INCDEC_PTR:%.*]] = getelementptr inbounds i32, i32* [[TMP15]], i32 1
-// CHECK-NEXT:    store i32* [[INCDEC_PTR]], i32** [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[TMP15:%.*]] = load ptr, ptr [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[INCDEC_PTR:%.*]] = getelementptr inbounds i32, ptr [[TMP15]], i32 1
+// CHECK-NEXT:    store ptr [[INCDEC_PTR]], ptr [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
 // CHECK-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP16:![0-9]+]]
 // CHECK:       for.end:
 // CHECK-NEXT:    ret void
@@ -204,55 +192,47 @@ void frl(int (&&e) [4])
 
 // CHECK-LABEL: @_Z3fruOA4_i(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[E_ADDR:%.*]] = alloca [4 x i32]*, align 8
-// CHECK-NEXT:    [[__RANGE1:%.*]] = alloca [4 x i32]*, align 8
-// CHECK-NEXT:    [[__BEGIN1:%.*]] = alloca i32*, align 8
-// CHECK-NEXT:    [[__END1:%.*]] = alloca i32*, align 8
+// CHECK-NEXT:    [[E_ADDR:%.*]] = alloca ptr, align 8
+// CHECK-NEXT:    [[__RANGE1:%.*]] = alloca ptr, align 8
+// CHECK-NEXT:    [[__BEGIN1:%.*]] = alloca ptr, align 8
+// CHECK-NEXT:    [[__END1:%.*]] = alloca ptr, align 8
 // CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store [4 x i32]* [[E:%.*]], [4 x i32]** [[E_ADDR]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast [4 x i32]** [[__RANGE1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 8, i8* [[TMP0]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP1:%.*]] = load [4 x i32]*, [4 x i32]** [[E_ADDR]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    store [4 x i32]* [[TMP1]], [4 x i32]** [[__RANGE1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[TMP2:%.*]] = bitcast i32** [[__BEGIN1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 8, i8* [[TMP2]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP3:%.*]] = load [4 x i32]*, [4 x i32]** [[__RANGE1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[ARRAYDECAY:%.*]] = getelementptr inbounds [4 x i32], [4 x i32]* [[TMP3]], i64 0, i64 0
-// CHECK-NEXT:    store i32* [[ARRAYDECAY]], i32** [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[TMP4:%.*]] = bitcast i32** [[__END1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 8, i8* [[TMP4]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP5:%.*]] = load [4 x i32]*, [4 x i32]** [[__RANGE1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[ARRAYDECAY1:%.*]] = getelementptr inbounds [4 x i32], [4 x i32]* [[TMP5]], i64 0, i64 0
-// CHECK-NEXT:    [[ADD_PTR:%.*]] = getelementptr inbounds i32, i32* [[ARRAYDECAY1]], i64 4
-// CHECK-NEXT:    store i32* [[ADD_PTR]], i32** [[__END1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    store ptr [[E:%.*]], ptr [[E_ADDR]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 8, ptr [[__RANGE1]]) #[[ATTR4]]
+// CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[E_ADDR]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    store ptr [[TMP1]], ptr [[__RANGE1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 8, ptr [[__BEGIN1]]) #[[ATTR4]]
+// CHECK-NEXT:    [[TMP3:%.*]] = load ptr, ptr [[__RANGE1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[ARRAYDECAY:%.*]] = getelementptr inbounds [4 x i32], ptr [[TMP3]], i64 0, i64 0
+// CHECK-NEXT:    store ptr [[ARRAYDECAY]], ptr [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 8, ptr [[__END1]]) #[[ATTR4]]
+// CHECK-NEXT:    [[TMP5:%.*]] = load ptr, ptr [[__RANGE1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[ARRAYDECAY1:%.*]] = getelementptr inbounds [4 x i32], ptr [[TMP5]], i64 0, i64 0
+// CHECK-NEXT:    [[ADD_PTR:%.*]] = getelementptr inbounds i32, ptr [[ARRAYDECAY1]], i64 4
+// CHECK-NEXT:    store ptr [[ADD_PTR]], ptr [[__END1]], align 8, !tbaa [[TBAA14]]
 // CHECK-NEXT:    br label [[FOR_COND:%.*]]
 // CHECK:       for.cond:
-// CHECK-NEXT:    [[TMP6:%.*]] = load i32*, i32** [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[TMP7:%.*]] = load i32*, i32** [[__END1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[CMP:%.*]] = icmp ne i32* [[TMP6]], [[TMP7]]
+// CHECK-NEXT:    [[TMP6:%.*]] = load ptr, ptr [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[TMP7:%.*]] = load ptr, ptr [[__END1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[CMP:%.*]] = icmp ne ptr [[TMP6]], [[TMP7]]
 // CHECK-NEXT:    [[CMP_EXPVAL:%.*]] = call i1 @llvm.expect.i1(i1 [[CMP]], i1 false)
 // CHECK-NEXT:    br i1 [[CMP_EXPVAL]], label [[FOR_BODY:%.*]], label [[FOR_COND_CLEANUP:%.*]]
 // CHECK:       for.cond.cleanup:
-// CHECK-NEXT:    [[TMP8:%.*]] = bitcast i32** [[__END1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 8, i8* [[TMP8]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP9:%.*]] = bitcast i32** [[__BEGIN1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 8, i8* [[TMP9]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP10:%.*]] = bitcast [4 x i32]** [[__RANGE1]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 8, i8* [[TMP10]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 8, ptr [[__END1]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 8, ptr [[__BEGIN1]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 8, ptr [[__RANGE1]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[FOR_END:%.*]]
 // CHECK:       for.body:
-// CHECK-NEXT:    [[TMP11:%.*]] = bitcast i32* [[I]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.start.p0i8(i64 4, i8* [[TMP11]]) #[[ATTR4]]
-// CHECK-NEXT:    [[TMP12:%.*]] = load i32*, i32** [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[TMP13:%.*]] = load i32, i32* [[TMP12]], align 4, !tbaa [[TBAA2]]
-// CHECK-NEXT:    store i32 [[TMP13]], i32* [[I]], align 4, !tbaa [[TBAA2]]
-// CHECK-NEXT:    [[TMP14:%.*]] = bitcast i32* [[I]] to i8*
-// CHECK-NEXT:    call void @llvm.lifetime.end.p0i8(i64 4, i8* [[TMP14]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @llvm.lifetime.start.p0(i64 4, ptr [[I]]) #[[ATTR4]]
+// CHECK-NEXT:    [[TMP12:%.*]] = load ptr, ptr [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[TMP13:%.*]] = load i32, ptr [[TMP12]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store i32 [[TMP13]], ptr [[I]], align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    call void @llvm.lifetime.end.p0(i64 4, ptr [[I]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[FOR_INC:%.*]]
 // CHECK:       for.inc:
-// CHECK-NEXT:    [[TMP15:%.*]] = load i32*, i32** [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
-// CHECK-NEXT:    [[INCDEC_PTR:%.*]] = getelementptr inbounds i32, i32* [[TMP15]], i32 1
-// CHECK-NEXT:    store i32* [[INCDEC_PTR]], i32** [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[TMP15:%.*]] = load ptr, ptr [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
+// CHECK-NEXT:    [[INCDEC_PTR:%.*]] = getelementptr inbounds i32, ptr [[TMP15]], i32 1
+// CHECK-NEXT:    store ptr [[INCDEC_PTR]], ptr [[__BEGIN1]], align 8, !tbaa [[TBAA14]]
 // CHECK-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP17:![0-9]+]]
 // CHECK:       for.end:
 // CHECK-NEXT:    ret void

diff  --git a/clang/test/CodeGenCXX/attr-likelihood-switch-branch-weights.cpp b/clang/test/CodeGenCXX/attr-likelihood-switch-branch-weights.cpp
index 8d22a20c9bba0..328d1bcc76208 100644
--- a/clang/test/CodeGenCXX/attr-likelihood-switch-branch-weights.cpp
+++ b/clang/test/CodeGenCXX/attr-likelihood-switch-branch-weights.cpp
@@ -1,11 +1,11 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
-// RUN: %clang_cc1 -no-opaque-pointers -O1 -disable-llvm-passes -emit-llvm %s -o - -triple=x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -O1 -disable-llvm-passes -emit-llvm %s -o - -triple=x86_64-linux-gnu | FileCheck %s
 
 extern volatile int i;
 
 // CHECK-LABEL: @_Z8OneCaseLv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2:![0-9]+]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2:![0-9]+]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_EPILOG:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_EPILOG]]
 // CHECK-NEXT:    ], !prof !6
@@ -20,14 +20,14 @@ void OneCaseL() {
 
 // CHECK-LABEL: @_Z8OneCaseUv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_EPILOG:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_BB:%.*]]
 // CHECK-NEXT:    ], !prof !7
 // CHECK:       sw.bb:
-// CHECK-NEXT:    [[TMP1:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP1:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP1]], 1
-// CHECK-NEXT:    store volatile i32 [[INC]], i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store volatile i32 [[INC]], ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[SW_EPILOG]]
 // CHECK:       sw.epilog:
 // CHECK-NEXT:    ret void
@@ -40,7 +40,7 @@ void OneCaseU() {
 
 // CHECK-LABEL: @_Z10TwoCasesLNv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_EPILOG:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_EPILOG]]
 // CHECK-NEXT:    i32 2, label [[SW_EPILOG]]
@@ -57,7 +57,7 @@ void TwoCasesLN() {
 
 // CHECK-LABEL: @_Z10TwoCasesUNv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_EPILOG:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_EPILOG]]
 // CHECK-NEXT:    i32 2, label [[SW_EPILOG]]
@@ -74,7 +74,7 @@ void TwoCasesUN() {
 
 // CHECK-LABEL: @_Z10TwoCasesLUv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_EPILOG:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_EPILOG]]
 // CHECK-NEXT:    i32 2, label [[SW_EPILOG]]
@@ -91,7 +91,7 @@ void TwoCasesLU() {
 
 // CHECK-LABEL: @_Z20CasesFallthroughNNLNv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_EPILOG:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_BB:%.*]]
 // CHECK-NEXT:    i32 2, label [[SW_BB]]
@@ -116,7 +116,7 @@ void CasesFallthroughNNLN() {
 
 // CHECK-LABEL: @_Z20CasesFallthroughNNUNv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_EPILOG:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_BB:%.*]]
 // CHECK-NEXT:    i32 2, label [[SW_BB]]
@@ -141,7 +141,7 @@ void CasesFallthroughNNUN() {
 
 // CHECK-LABEL: @_Z28CasesFallthroughRangeSmallLNv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_EPILOG:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_BB:%.*]]
 // CHECK-NEXT:    i32 2, label [[SW_BB]]
@@ -153,9 +153,9 @@ void CasesFallthroughNNUN() {
 // CHECK-NEXT:    i32 104, label [[SW_BB2]]
 // CHECK-NEXT:    ], !prof !13
 // CHECK:       sw.bb:
-// CHECK-NEXT:    [[TMP1:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP1:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP1]], 1
-// CHECK-NEXT:    store volatile i32 [[INC]], i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store volatile i32 [[INC]], ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[SW_BB1]]
 // CHECK:       sw.bb1:
 // CHECK-NEXT:    br label [[SW_BB2]]
@@ -175,7 +175,7 @@ void CasesFallthroughRangeSmallLN() {
 
 // CHECK-LABEL: @_Z28CasesFallthroughRangeSmallUNv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_EPILOG:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_BB:%.*]]
 // CHECK-NEXT:    i32 2, label [[SW_BB]]
@@ -187,9 +187,9 @@ void CasesFallthroughRangeSmallLN() {
 // CHECK-NEXT:    i32 104, label [[SW_BB2]]
 // CHECK-NEXT:    ], !prof !14
 // CHECK:       sw.bb:
-// CHECK-NEXT:    [[TMP1:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP1:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP1]], 1
-// CHECK-NEXT:    store volatile i32 [[INC]], i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    store volatile i32 [[INC]], ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    br label [[SW_BB1]]
 // CHECK:       sw.bb1:
 // CHECK-NEXT:    br label [[SW_BB2]]
@@ -209,7 +209,7 @@ void CasesFallthroughRangeSmallUN() {
 
 // CHECK-LABEL: @_Z29CasesFallthroughRangeLargeLLNv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_CASERANGE:%.*]] [
 // CHECK-NEXT:    i32 1003, label [[SW_BB1:%.*]]
 // CHECK-NEXT:    i32 104, label [[SW_BB1]]
@@ -236,7 +236,7 @@ void CasesFallthroughRangeLargeLLN() {
 
 // CHECK-LABEL: @_Z29CasesFallthroughRangeLargeUUNv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_CASERANGE:%.*]] [
 // CHECK-NEXT:    i32 1003, label [[SW_BB1:%.*]]
 // CHECK-NEXT:    i32 104, label [[SW_BB1]]
@@ -263,7 +263,7 @@ void CasesFallthroughRangeLargeUUN() {
 
 // CHECK-LABEL: @_Z15OneCaseDefaultLv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_DEFAULT:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_EPILOG:%.*]]
 // CHECK-NEXT:    ], !prof !15
@@ -281,7 +281,7 @@ void OneCaseDefaultL() {
 
 // CHECK-LABEL: @_Z15OneCaseDefaultUv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_DEFAULT:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_EPILOG:%.*]]
 // CHECK-NEXT:    ], !prof !16
@@ -299,7 +299,7 @@ void OneCaseDefaultU() {
 
 // CHECK-LABEL: @_Z18TwoCasesDefaultLNLv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_DEFAULT:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_EPILOG:%.*]]
 // CHECK-NEXT:    i32 2, label [[SW_EPILOG]]
@@ -319,7 +319,7 @@ void TwoCasesDefaultLNL() {
 
 // CHECK-LABEL: @_Z18TwoCasesDefaultLNNv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_DEFAULT:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_EPILOG:%.*]]
 // CHECK-NEXT:    i32 2, label [[SW_EPILOG]]
@@ -339,7 +339,7 @@ void TwoCasesDefaultLNN() {
 
 // CHECK-LABEL: @_Z18TwoCasesDefaultLNUv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, i32* @i, align 4, !tbaa [[TBAA2]]
+// CHECK-NEXT:    [[TMP0:%.*]] = load volatile i32, ptr @i, align 4, !tbaa [[TBAA2]]
 // CHECK-NEXT:    switch i32 [[TMP0]], label [[SW_DEFAULT:%.*]] [
 // CHECK-NEXT:    i32 1, label [[SW_EPILOG:%.*]]
 // CHECK-NEXT:    i32 2, label [[SW_EPILOG]]

diff  --git a/clang/test/CodeGenCXX/attr-mustprogress.cpp b/clang/test/CodeGenCXX/attr-mustprogress.cpp
index 4dac0a4b93b0d..843f5460426cc 100644
--- a/clang/test/CodeGenCXX/attr-mustprogress.cpp
+++ b/clang/test/CodeGenCXX/attr-mustprogress.cpp
@@ -1,22 +1,22 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++98 -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
+// RUN: %clang_cc1 -std=c++98 -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
+// RUN: %clang_cc1 -std=c++11 -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
+// RUN: %clang_cc1 -std=c++14 -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
+// RUN: %clang_cc1 -std=c++17 -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
+// RUN: %clang_cc1 -std=c++20 -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
 
 // Check -ffinite-loops option in combination with various standard versions.
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++98 -ffinite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=FINITE %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -ffinite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -ffinite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -ffinite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -ffinite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
+// RUN: %clang_cc1 -std=c++98 -ffinite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=FINITE %s
+// RUN: %clang_cc1 -std=c++11 -ffinite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
+// RUN: %clang_cc1 -std=c++14 -ffinite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
+// RUN: %clang_cc1 -std=c++17 -ffinite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
+// RUN: %clang_cc1 -std=c++20 -ffinite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX11 %s
 
 // Check -fno-finite-loops option in combination with various standard versions.
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++98 -fno-finite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fno-finite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -fno-finite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -fno-finite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -fno-finite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
+// RUN: %clang_cc1 -std=c++98 -fno-finite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
+// RUN: %clang_cc1 -std=c++11 -fno-finite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
+// RUN: %clang_cc1 -std=c++14 -fno-finite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
+// RUN: %clang_cc1 -std=c++17 -fno-finite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
+// RUN: %clang_cc1 -std=c++20 -fno-finite-loops -triple=x86_64-unknown-linux-gnu -S -emit-llvm %s -o - | FileCheck --check-prefix=CHECK --check-prefix=CXX98 %s
 
 int a = 0;
 int b = 0;
@@ -64,8 +64,8 @@ void f1() {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    br label %for.cond
 // CHECK:       for.cond:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* @a, align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* @b, align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @a, align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr @b, align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]
 // CHECK-NEXT:    br i1 [[CMP]], label %for.body, label %for.end
 // CHECK:       for.body:
@@ -95,8 +95,8 @@ void f2() {
 // CHECK:       for.end:
 // CHECK-NEXT:    br label %for.cond1
 // CHECK:       for.cond1:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* @a, align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* @b, align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @a, align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr @b, align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]
 // CHECK-NEXT:    br i1 [[CMP]], label %for.body2, label %for.end3
 // CHECK:       for.body2:
@@ -120,8 +120,8 @@ void F() {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    br label %for.cond
 // CHECK:       for.cond:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* @a, align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* @b, align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @a, align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr @b, align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]
 // CHECK-NEXT:    br i1 [[CMP]], label %for.body, label %for.end
 // CHECK:       for.body:
@@ -169,8 +169,8 @@ void w1() {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    br label %while.cond
 // CHECK:       while.cond:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* @a, align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* @b, align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @a, align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr @b, align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]
 // CHECK-NEXT:    br i1 [[CMP]], label %while.body, label %while.end
 // CHECK:       while.body:
@@ -192,8 +192,8 @@ void w2() {
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    br label %while.cond
 // CHECK:       while.cond:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* @a, align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* @b, align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @a, align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr @b, align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]
 // CHECK-NEXT:    br i1 [[CMP]], label %while.body, label %while.end
 // CHECK:       while.body:
@@ -262,8 +262,8 @@ void d1() {
 // CHECK:       do.body:
 // CHECK-NEXT:    br label %do.cond
 // CHECK:       do.cond:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* @a, align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* @b, align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @a, align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr @b, align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]
 // CXX98-NOT:     br {{.*}}, !llvm.loop
 // CXX11-NEXT:    br i1 [[CMP]], label %do.body, label %do.end, !llvm.loop [[LOOP14:!.*]]
@@ -294,8 +294,8 @@ void d2() {
 // CHECK:       do.body1:
 // CHECK-NEXT:    br label %do.cond2
 // CHECK:       do.cond2:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* @a, align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* @b, align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @a, align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr @b, align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]
 // CXX98-NOT:     br {{.*}}, !llvm.loop
 // CXX11-NEXT:    br i1 [[CMP]], label %do.body1, label %do.end3, !llvm.loop [[LOOP16:!.*]]
@@ -321,8 +321,8 @@ void D() {
 // CHECK:       do.body:
 // CHECK-NEXT:    br label %do.cond
 // CHECK:       do.cond:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* @a, align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* @b, align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr @a, align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr @b, align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP0]], [[TMP1]]
 // CXX98-NOT:     br {{.*}}, !llvm.loop
 // CXX11-NEXT:    br i1 [[CMP]], label %do.body, label %do.end, !llvm.loop [[LOOP17:!.*]]

diff  --git a/clang/test/CodeGenCXX/attr-notail.cpp b/clang/test/CodeGenCXX/attr-notail.cpp
index 233ed2a56873f..cde7036869f99 100644
--- a/clang/test/CodeGenCXX/attr-notail.cpp
+++ b/clang/test/CodeGenCXX/attr-notail.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
 
 class Class1 {
 public:
@@ -24,8 +24,8 @@ int foo1(int a, Class1 *c1, Class2 &c2) {
 }
 
 // CHECK-LABEL: define{{.*}} i32 @_Z4foo1iP6Class1R6Class2(
-// CHECK: %{{[a-z0-9]+}} = notail call noundef i32 @_ZN6Class12m1Ev(%class.Class1*
-// CHECK: %{{[a-z0-9]+}} = notail call noundef i32 %{{[0-9]+}}(%class.Class1*
-// CHECK-NOT: %{{[a-z0-9]+}} = notail call noundef i32 %{{[0-9]+}}(%class.Class1*
-// CHECK: %{{[a-z0-9]+}} = notail call noundef i32 %{{[0-9]+}}(%class.Class2* 
-// CHECK: %{{[a-z0-9]+}} = call noundef i32 @_ZN6Class12m2Ev(%class.Class1*
+// CHECK: %{{[a-z0-9]+}} = notail call noundef i32 @_ZN6Class12m1Ev(ptr
+// CHECK: %{{[a-z0-9]+}} = notail call noundef i32 %{{[0-9]+}}(ptr
+// CHECK-NOT: %{{[a-z0-9]+}} = notail call noundef i32 %{{[0-9]+}}(ptr
+// CHECK: %{{[a-z0-9]+}} = notail call noundef i32 %{{[0-9]+}}(ptr 
+// CHECK: %{{[a-z0-9]+}} = call noundef i32 @_ZN6Class12m2Ev(ptr

diff  --git a/clang/test/CodeGenCXX/attr-retain.cpp b/clang/test/CodeGenCXX/attr-retain.cpp
index 3210ff08e0d8f..3a56576d81632 100644
--- a/clang/test/CodeGenCXX/attr-retain.cpp
+++ b/clang/test/CodeGenCXX/attr-retain.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64 -Werror %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple x86_64 -Werror %s -o - | FileCheck %s
 
-// CHECK:      @llvm.used = appending global [7 x i8*]
+// CHECK:      @llvm.used = appending global [7 x ptr]
 // CHECK-SAME:   @_ZN2X0C2Ev
 // CHECK-SAME:   @_ZN2X0C1Ev
 // CHECK-SAME:   @_ZN2X0D2Ev

diff  --git a/clang/test/CodeGenCXX/attr-target-mv-
diff -ns.cpp b/clang/test/CodeGenCXX/attr-target-mv-
diff -ns.cpp
index 002b95ecee8af..1157450835bda 100644
--- a/clang/test/CodeGenCXX/attr-target-mv-
diff -ns.cpp
+++ b/clang/test/CodeGenCXX/attr-target-mv-
diff -ns.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
 // Test ensures that this properly 
diff erentiates between types in 
diff erent
 // namespaces.
 int __attribute__((target("sse4.2"))) foo(int) { return 0; }
@@ -18,8 +18,8 @@ int bar() {
   return foo(1) + ns::foo(2);
 }
 
-// LINUX: @_Z3fooi.ifunc = weak_odr ifunc i32 (i32), i32 (i32)* ()* @_Z3fooi.resolver
-// LINUX: @_ZN2ns3fooEi.ifunc = weak_odr ifunc i32 (i32), i32 (i32)* ()* @_ZN2ns3fooEi.resolver
+// LINUX: @_Z3fooi.ifunc = weak_odr ifunc i32 (i32), ptr @_Z3fooi.resolver
+// LINUX: @_ZN2ns3fooEi.ifunc = weak_odr ifunc i32 (i32), ptr @_ZN2ns3fooEi.resolver
 
 // LINUX: define{{.*}} i32 @_Z3fooi.sse4.2(i32 noundef %0)
 // LINUX: ret i32 0
@@ -57,11 +57,11 @@ int bar() {
 // WINDOWS: call noundef i32 @"?foo@@YAHH at Z.resolver"(i32 noundef 1)
 // WINDOWS: call noundef i32 @"?foo at ns@@YAHH at Z.resolver"(i32 noundef 2)
 
-// LINUX: define weak_odr i32 (i32)* @_Z3fooi.resolver() comdat
-// LINUX: ret i32 (i32)* @_Z3fooi.arch_sandybridge
-// LINUX: ret i32 (i32)* @_Z3fooi.arch_ivybridge
-// LINUX: ret i32 (i32)* @_Z3fooi.sse4.2
-// LINUX: ret i32 (i32)* @_Z3fooi
+// LINUX: define weak_odr ptr @_Z3fooi.resolver() comdat
+// LINUX: ret ptr @_Z3fooi.arch_sandybridge
+// LINUX: ret ptr @_Z3fooi.arch_ivybridge
+// LINUX: ret ptr @_Z3fooi.sse4.2
+// LINUX: ret ptr @_Z3fooi
 
 // WINDOWS: define weak_odr dso_local i32 @"?foo@@YAHH at Z.resolver"(i32 %0) comdat
 // WINDOWS: call i32 @"?foo@@YAHH at Z.arch_sandybridge"(i32 %0)
@@ -69,11 +69,11 @@ int bar() {
 // WINDOWS: call i32 @"?foo@@YAHH at Z.sse4.2"(i32 %0)
 // WINDOWS: call i32 @"?foo@@YAHH at Z"(i32 %0)
 
-// LINUX: define weak_odr i32 (i32)* @_ZN2ns3fooEi.resolver() comdat
-// LINUX: ret i32 (i32)* @_ZN2ns3fooEi.arch_sandybridge
-// LINUX: ret i32 (i32)* @_ZN2ns3fooEi.arch_ivybridge
-// LINUX: ret i32 (i32)* @_ZN2ns3fooEi.sse4.2
-// LINUX: ret i32 (i32)* @_ZN2ns3fooEi
+// LINUX: define weak_odr ptr @_ZN2ns3fooEi.resolver() comdat
+// LINUX: ret ptr @_ZN2ns3fooEi.arch_sandybridge
+// LINUX: ret ptr @_ZN2ns3fooEi.arch_ivybridge
+// LINUX: ret ptr @_ZN2ns3fooEi.sse4.2
+// LINUX: ret ptr @_ZN2ns3fooEi
 
 // WINDOWS: define weak_odr dso_local i32 @"?foo at ns@@YAHH at Z.resolver"(i32 %0) comdat
 // WINDOWS: call i32 @"?foo at ns@@YAHH at Z.arch_sandybridge"(i32 %0)

diff  --git a/clang/test/CodeGenCXX/attr-target-mv-func-ptrs.cpp b/clang/test/CodeGenCXX/attr-target-mv-func-ptrs.cpp
index a4247342a7823..690f44ceb58be 100644
--- a/clang/test/CodeGenCXX/attr-target-mv-func-ptrs.cpp
+++ b/clang/test/CodeGenCXX/attr-target-mv-func-ptrs.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
 void temp();
 void temp(int);
 using FP = void(*)(int);
@@ -37,18 +37,18 @@ int bar() {
 
 // LINUX: define{{.*}} i32 @_Z3barv()
 // Store to Free of ifunc
-// LINUX: store i32 (i32)* @_Z3fooi.ifunc
+// LINUX: store ptr @_Z3fooi.ifunc
 // Store to Member of ifunc
-// LINUX: store { i64, i64 } { i64 ptrtoint (i32 (%struct.S*, i32)* @_ZN1S3fooEi.ifunc to i64), i64 0 }, { i64, i64 }* [[MEMBER:%[a-z]+]]
+// LINUX: store { i64, i64 } { i64 ptrtoint (ptr @_ZN1S3fooEi.ifunc to i64), i64 0 }, ptr [[MEMBER:%[a-z]+]]
 
 // Call to 'f' with the ifunc
-// LINUX: call void @_Z1fPFiiEM1SFiiE(i32 (i32)* noundef @_Z3fooi.ifunc
+// LINUX: call void @_Z1fPFiiEM1SFiiE(ptr noundef @_Z3fooi.ifunc
 
 // WINDOWS: define dso_local noundef i32 @"?bar@@YAHXZ"()
 // Store to Free
-// WINDOWS: store i32 (i32)* @"?foo@@YAHH at Z.resolver", i32 (i32)**
+// WINDOWS: store ptr @"?foo@@YAHH at Z.resolver", ptr
 // Store to Member
-// WINDOWS: store i8* bitcast (i32 (%struct.S*, i32)* @"?foo at S@@QEAAHH at Z.resolver" to i8*), i8**
+// WINDOWS: store ptr @"?foo at S@@QEAAHH at Z.resolver", ptr
 
 // Call to 'f'
-// WINDOWS: call void @"?f@@YAXP6AHH at ZP8S@@EAAHH at Z@Z"(i32 (i32)* noundef @"?foo@@YAHH at Z.resolver", i8* bitcast (i32 (%struct.S*, i32)* @"?foo at S@@QEAAHH at Z.resolver" to i8*))
+// WINDOWS: call void @"?f@@YAXP6AHH at ZP8S@@EAAHH at Z@Z"(ptr noundef @"?foo@@YAHH at Z.resolver", ptr @"?foo at S@@QEAAHH at Z.resolver")

diff  --git a/clang/test/CodeGenCXX/attr-target-mv-inalloca.cpp b/clang/test/CodeGenCXX/attr-target-mv-inalloca.cpp
index f49867ea1b483..614e44ee6df57 100644
--- a/clang/test/CodeGenCXX/attr-target-mv-inalloca.cpp
+++ b/clang/test/CodeGenCXX/attr-target-mv-inalloca.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple i686-windows-msvc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-msvc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS64
+// RUN: %clang_cc1 -std=c++11 -triple i686-windows-msvc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-msvc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS64
 
 struct Foo {
   Foo();
@@ -16,66 +16,66 @@ void usage() {
   bar(f);
 }
 
-// WINDOWS: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z"(<{ %struct.Foo }>* inalloca(<{ %struct.Foo }>) %0)
-// WINDOWS: %[[O:[0-9a-zA-Z]+]] = getelementptr inbounds <{ %struct.Foo }>, <{ %struct.Foo }>* %0, i32 0, i32 0
-// WINDOWS: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, %struct.Foo* %[[O]], i32 0, i32 0
-// WINDOWS: %[[LOAD:[0-9a-zA-Z]+]] = load i32, i32* %[[X]]
+// WINDOWS: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z"(ptr inalloca(<{ %struct.Foo }>) %0)
+// WINDOWS: %[[O:[0-9a-zA-Z]+]] = getelementptr inbounds <{ %struct.Foo }>, ptr %0, i32 0, i32 0
+// WINDOWS: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, ptr %[[O]], i32 0, i32 0
+// WINDOWS: %[[LOAD:[0-9a-zA-Z]+]] = load i32, ptr %[[X]]
 // WINDOWS: ret i32 %[[LOAD]]
 
-// WINDOWS: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z.sse4.2"(<{ %struct.Foo }>* inalloca(<{ %struct.Foo }>) %0)
-// WINDOWS: %[[O:[0-9a-zA-Z]+]] = getelementptr inbounds <{ %struct.Foo }>, <{ %struct.Foo }>* %0, i32 0, i32 0
-// WINDOWS: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, %struct.Foo* %[[O]], i32 0, i32 0
-// WINDOWS: %[[LOAD:[0-9a-zA-Z]+]] = load i32, i32* %[[X]]
+// WINDOWS: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z.sse4.2"(ptr inalloca(<{ %struct.Foo }>) %0)
+// WINDOWS: %[[O:[0-9a-zA-Z]+]] = getelementptr inbounds <{ %struct.Foo }>, ptr %0, i32 0, i32 0
+// WINDOWS: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, ptr %[[O]], i32 0, i32 0
+// WINDOWS: %[[LOAD:[0-9a-zA-Z]+]] = load i32, ptr %[[X]]
 // WINDOWS: %[[ADD:[0-9a-zA-Z]+]] = add nsw i32 %[[LOAD]], 1
 // WINDOWS: ret i32 %[[ADD]]
 
-// WINDOWS: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z.arch_ivybridge"(<{ %struct.Foo }>* inalloca(<{ %struct.Foo }>) %0)
-// WINDOWS: %[[O:[0-9a-zA-Z]+]] = getelementptr inbounds <{ %struct.Foo }>, <{ %struct.Foo }>* %0, i32 0, i32 0
-// WINDOWS: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, %struct.Foo* %[[O]], i32 0, i32 0
-// WINDOWS: %[[LOAD:[0-9a-zA-Z]+]] = load i32, i32* %[[X]]
+// WINDOWS: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z.arch_ivybridge"(ptr inalloca(<{ %struct.Foo }>) %0)
+// WINDOWS: %[[O:[0-9a-zA-Z]+]] = getelementptr inbounds <{ %struct.Foo }>, ptr %0, i32 0, i32 0
+// WINDOWS: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, ptr %[[O]], i32 0, i32 0
+// WINDOWS: %[[LOAD:[0-9a-zA-Z]+]] = load i32, ptr %[[X]]
 // WINDOWS: %[[ADD:[0-9a-zA-Z]+]] = add nsw i32 %[[LOAD]], 2
 // WINDOWS: ret i32 %[[ADD]]
 
 // WINDOWS: define dso_local void @"?usage@@YAXXZ"()
 // WINDOWS: %[[F:[0-9a-zA-Z]+]] = alloca %struct.Foo
 // WINDOWS: %[[ARGMEM:[0-9a-zA-Z]+]] = alloca inalloca <{ %struct.Foo }>
-// WINDOWS: %[[CALL:[0-9a-zA-Z]+]] = call noundef i32 @"?bar@@YAHUFoo@@@Z.resolver"(<{ %struct.Foo }>* inalloca(<{ %struct.Foo }>) %[[ARGMEM]])
+// WINDOWS: %[[CALL:[0-9a-zA-Z]+]] = call noundef i32 @"?bar@@YAHUFoo@@@Z.resolver"(ptr inalloca(<{ %struct.Foo }>) %[[ARGMEM]])
 
-// WINDOWS: define weak_odr dso_local i32 @"?bar@@YAHUFoo@@@Z.resolver"(<{ %struct.Foo }>* %0)
-// WINDOWS: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z.arch_ivybridge"(<{ %struct.Foo }>* %0)
+// WINDOWS: define weak_odr dso_local i32 @"?bar@@YAHUFoo@@@Z.resolver"(ptr %0)
+// WINDOWS: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z.arch_ivybridge"(ptr %0)
 // WINDOWS-NEXT: ret i32 %[[RET]]
-// WINDOWS: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z.sse4.2"(<{ %struct.Foo }>* %0)
+// WINDOWS: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z.sse4.2"(ptr %0)
 // WINDOWS-NEXT: ret i32 %[[RET]]
-// WINDOWS: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z"(<{ %struct.Foo }>* %0)
+// WINDOWS: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z"(ptr %0)
 // WINDOWS-NEXT: ret i32 %[[RET]]
 
 
-// WINDOWS64: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z"(%struct.Foo* noundef %[[O:[0-9a-zA-Z]+]])
-// WINDOWS64: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, %struct.Foo* %[[O]], i32 0, i32 0
-// WINDOWS64: %[[LOAD:[0-9a-zA-Z]+]] = load i32, i32* %[[X]]
+// WINDOWS64: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z"(ptr noundef %[[O:[0-9a-zA-Z]+]])
+// WINDOWS64: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, ptr %[[O]], i32 0, i32 0
+// WINDOWS64: %[[LOAD:[0-9a-zA-Z]+]] = load i32, ptr %[[X]]
 // WINDOWS64: ret i32 %[[LOAD]]
 
-// WINDOWS64: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z.sse4.2"(%struct.Foo* noundef %[[O:[0-9a-zA-Z]+]])
-// WINDOWS64: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, %struct.Foo* %[[O]], i32 0, i32 0
-// WINDOWS64: %[[LOAD:[0-9a-zA-Z]+]] = load i32, i32* %[[X]]
+// WINDOWS64: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z.sse4.2"(ptr noundef %[[O:[0-9a-zA-Z]+]])
+// WINDOWS64: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, ptr %[[O]], i32 0, i32 0
+// WINDOWS64: %[[LOAD:[0-9a-zA-Z]+]] = load i32, ptr %[[X]]
 // WINDOWS64: %[[ADD:[0-9a-zA-Z]+]] = add nsw i32 %[[LOAD]], 1
 // WINDOWS64: ret i32 %[[ADD]]
 
-// WINDOWS64: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z.arch_ivybridge"(%struct.Foo* noundef %[[O:[0-9a-zA-Z]+]])
-// WINDOWS64: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, %struct.Foo* %[[O]], i32 0, i32 0
-// WINDOWS64: %[[LOAD:[0-9a-zA-Z]+]] = load i32, i32* %[[X]]
+// WINDOWS64: define dso_local noundef i32 @"?bar@@YAHUFoo@@@Z.arch_ivybridge"(ptr noundef %[[O:[0-9a-zA-Z]+]])
+// WINDOWS64: %[[X:[0-9a-zA-Z]+]] = getelementptr inbounds %struct.Foo, ptr %[[O]], i32 0, i32 0
+// WINDOWS64: %[[LOAD:[0-9a-zA-Z]+]] = load i32, ptr %[[X]]
 // WINDOWS64: %[[ADD:[0-9a-zA-Z]+]] = add nsw i32 %[[LOAD]], 2
 // WINDOWS64: ret i32 %[[ADD]]
 
 // WINDOWS64: define dso_local void @"?usage@@YAXXZ"()
 // WINDOWS64: %[[F:[0-9a-zA-Z]+]] = alloca %struct.Foo
 // WINDOWS64: %[[ARG:[0-9a-zA-Z.]+]] = alloca %struct.Foo
-// WINDOWS64: %[[CALL:[0-9a-zA-Z]+]] = call noundef i32 @"?bar@@YAHUFoo@@@Z.resolver"(%struct.Foo* noundef %[[ARG]])
+// WINDOWS64: %[[CALL:[0-9a-zA-Z]+]] = call noundef i32 @"?bar@@YAHUFoo@@@Z.resolver"(ptr noundef %[[ARG]])
 
-// WINDOWS64: define weak_odr dso_local i32 @"?bar@@YAHUFoo@@@Z.resolver"(%struct.Foo* %0)
-// WINDOWS64: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z.arch_ivybridge"(%struct.Foo* %0)
+// WINDOWS64: define weak_odr dso_local i32 @"?bar@@YAHUFoo@@@Z.resolver"(ptr %0)
+// WINDOWS64: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z.arch_ivybridge"(ptr %0)
 // WINDOWS64-NEXT: ret i32 %[[RET]]
-// WINDOWS64: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z.sse4.2"(%struct.Foo* %0)
+// WINDOWS64: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z.sse4.2"(ptr %0)
 // WINDOWS64-NEXT: ret i32 %[[RET]]
-// WINDOWS64: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z"(%struct.Foo* %0)
+// WINDOWS64: %[[RET:[0-9a-zA-Z]+]] = musttail call i32 @"?bar@@YAHUFoo@@@Z"(ptr %0)
 // WINDOWS64-NEXT: ret i32 %[[RET]]

diff  --git a/clang/test/CodeGenCXX/attr-target-mv-member-funcs.cpp b/clang/test/CodeGenCXX/attr-target-mv-member-funcs.cpp
index 8dca7e206f663..cf3ba290714e0 100644
--- a/clang/test/CodeGenCXX/attr-target-mv-member-funcs.cpp
+++ b/clang/test/CodeGenCXX/attr-target-mv-member-funcs.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
 
 struct S {
   int __attribute__((target("sse4.2"))) foo(int) { return 0; }
@@ -65,55 +65,55 @@ int templ_use() {
   return a.foo(1) + b.foo(2);
 }
 
-// LINUX: @_ZN1SaSERKS_.ifunc = weak_odr ifunc %struct.S* (%struct.S*, %struct.S*), %struct.S* (%struct.S*, %struct.S*)* ()* @_ZN1SaSERKS_.resolver
-// LINUX: @_ZNK9ConvertTocv1SEv.ifunc = weak_odr ifunc void (%struct.ConvertTo*), void (%struct.ConvertTo*)* ()* @_ZNK9ConvertTocv1SEv.resolver
-// LINUX: @_ZN1S3fooEi.ifunc = weak_odr ifunc i32 (%struct.S*, i32), i32 (%struct.S*, i32)* ()* @_ZN1S3fooEi.resolver
-// LINUX: @_ZN2S23fooEi.ifunc = weak_odr ifunc i32 (%struct.S2*, i32), i32 (%struct.S2*, i32)* ()* @_ZN2S23fooEi.resolver
+// LINUX: @_ZN1SaSERKS_.ifunc = weak_odr ifunc ptr (ptr, ptr), ptr @_ZN1SaSERKS_.resolver
+// LINUX: @_ZNK9ConvertTocv1SEv.ifunc = weak_odr ifunc void (ptr), ptr @_ZNK9ConvertTocv1SEv.resolver
+// LINUX: @_ZN1S3fooEi.ifunc = weak_odr ifunc i32 (ptr, i32), ptr @_ZN1S3fooEi.resolver
+// LINUX: @_ZN2S23fooEi.ifunc = weak_odr ifunc i32 (ptr, i32), ptr @_ZN2S23fooEi.resolver
 // Templates:
-// LINUX: @_ZN5templIiE3fooEi.ifunc = weak_odr ifunc i32 (%struct.templ*, i32), i32 (%struct.templ*, i32)* ()* @_ZN5templIiE3fooEi.resolver
-// LINUX: @_ZN5templIdE3fooEi.ifunc = weak_odr ifunc i32 (%struct.templ.0*, i32), i32 (%struct.templ.0*, i32)* ()* @_ZN5templIdE3fooEi.resolver
+// LINUX: @_ZN5templIiE3fooEi.ifunc = weak_odr ifunc i32 (ptr, i32), ptr @_ZN5templIiE3fooEi.resolver
+// LINUX: @_ZN5templIdE3fooEi.ifunc = weak_odr ifunc i32 (ptr, i32), ptr @_ZN5templIdE3fooEi.resolver
 
 // LINUX: define{{.*}} i32 @_Z3barv()
 // LINUX: %s = alloca %struct.S, align 1
 // LINUX: %s2 = alloca %struct.S, align 1
 // LINUX: %C = alloca %struct.ConvertTo, align 1
-// LINUX: call noundef nonnull align 1 dereferenceable(1) %struct.S* @_ZN1SaSERKS_.ifunc(%struct.S* {{[^,]*}} %s2
-// LINUX: call void @_ZNK9ConvertTocv1SEv.ifunc(%struct.ConvertTo* {{[^,]*}} %C)
-// LINUX: call noundef nonnull align 1 dereferenceable(1) %struct.S* @_ZN1SaSERKS_.ifunc(%struct.S* {{[^,]*}} %s2
-// LINUX: call noundef i32 @_ZN1S3fooEi.ifunc(%struct.S* {{[^,]*}} %s, i32 noundef 0)
+// LINUX: call noundef nonnull align 1 dereferenceable(1) ptr @_ZN1SaSERKS_.ifunc(ptr {{[^,]*}} %s2
+// LINUX: call void @_ZNK9ConvertTocv1SEv.ifunc(ptr {{[^,]*}} %C)
+// LINUX: call noundef nonnull align 1 dereferenceable(1) ptr @_ZN1SaSERKS_.ifunc(ptr {{[^,]*}} %s2
+// LINUX: call noundef i32 @_ZN1S3fooEi.ifunc(ptr {{[^,]*}} %s, i32 noundef 0)
 
 // WINDOWS: define dso_local noundef i32 @"?bar@@YAHXZ"()
 // WINDOWS: %s = alloca %struct.S, align 1
 // WINDOWS: %s2 = alloca %struct.S, align 1
 // WINDOWS: %C = alloca %struct.ConvertTo, align 1
-// WINDOWS: call noundef nonnull align 1 dereferenceable(1) %struct.S* @"??4S@@QEAAAEAU0 at AEBU0@@Z.resolver"(%struct.S* {{[^,]*}} %s2
-// WINDOWS: call void @"??BConvertTo@@QEBA?AUS@@XZ.resolver"(%struct.ConvertTo* {{[^,]*}} %C
-// WINDOWS: call noundef nonnull align 1 dereferenceable(1) %struct.S* @"??4S@@QEAAAEAU0 at AEBU0@@Z.resolver"(%struct.S* {{[^,]*}} %s2
-// WINDOWS: call noundef i32 @"?foo at S@@QEAAHH at Z.resolver"(%struct.S* {{[^,]*}} %s, i32 noundef 0)
+// WINDOWS: call noundef nonnull align 1 dereferenceable(1) ptr @"??4S@@QEAAAEAU0 at AEBU0@@Z.resolver"(ptr {{[^,]*}} %s2
+// WINDOWS: call void @"??BConvertTo@@QEBA?AUS@@XZ.resolver"(ptr {{[^,]*}} %C
+// WINDOWS: call noundef nonnull align 1 dereferenceable(1) ptr @"??4S@@QEAAAEAU0 at AEBU0@@Z.resolver"(ptr {{[^,]*}} %s2
+// WINDOWS: call noundef i32 @"?foo at S@@QEAAHH at Z.resolver"(ptr {{[^,]*}} %s, i32 noundef 0)
 
-// LINUX: define weak_odr %struct.S* (%struct.S*, %struct.S*)* @_ZN1SaSERKS_.resolver() comdat
-// LINUX: ret %struct.S* (%struct.S*, %struct.S*)* @_ZN1SaSERKS_.arch_ivybridge
-// LINUX: ret %struct.S* (%struct.S*, %struct.S*)* @_ZN1SaSERKS_
+// LINUX: define weak_odr ptr @_ZN1SaSERKS_.resolver() comdat
+// LINUX: ret ptr @_ZN1SaSERKS_.arch_ivybridge
+// LINUX: ret ptr @_ZN1SaSERKS_
 
-// WINDOWS: define weak_odr dso_local %struct.S* @"??4S@@QEAAAEAU0 at AEBU0@@Z.resolver"(%struct.S* %0, %struct.S* %1)
-// WINDOWS: call %struct.S* @"??4S@@QEAAAEAU0 at AEBU0@@Z.arch_ivybridge"
-// WINDOWS: call %struct.S* @"??4S@@QEAAAEAU0 at AEBU0@@Z"
+// WINDOWS: define weak_odr dso_local ptr @"??4S@@QEAAAEAU0 at AEBU0@@Z.resolver"(ptr %0, ptr %1)
+// WINDOWS: call ptr @"??4S@@QEAAAEAU0 at AEBU0@@Z.arch_ivybridge"
+// WINDOWS: call ptr @"??4S@@QEAAAEAU0 at AEBU0@@Z"
 
-// LINUX: define weak_odr void (%struct.ConvertTo*)* @_ZNK9ConvertTocv1SEv.resolver() comdat
-// LINUX: ret void (%struct.ConvertTo*)* @_ZNK9ConvertTocv1SEv.arch_ivybridge
-// LINUX: ret void (%struct.ConvertTo*)* @_ZNK9ConvertTocv1SEv
+// LINUX: define weak_odr ptr @_ZNK9ConvertTocv1SEv.resolver() comdat
+// LINUX: ret ptr @_ZNK9ConvertTocv1SEv.arch_ivybridge
+// LINUX: ret ptr @_ZNK9ConvertTocv1SEv
 
-// WINDOWS: define weak_odr dso_local void @"??BConvertTo@@QEBA?AUS@@XZ.resolver"(%struct.ConvertTo* %0, %struct.S* %1)
+// WINDOWS: define weak_odr dso_local void @"??BConvertTo@@QEBA?AUS@@XZ.resolver"(ptr %0, ptr %1)
 // WINDOWS: call void @"??BConvertTo@@QEBA?AUS@@XZ.arch_ivybridge"
 // WINDOWS: call void @"??BConvertTo@@QEBA?AUS@@XZ"
 
-// LINUX: define weak_odr i32 (%struct.S*, i32)* @_ZN1S3fooEi.resolver() comdat
-// LINUX: ret i32 (%struct.S*, i32)* @_ZN1S3fooEi.arch_sandybridge
-// LINUX: ret i32 (%struct.S*, i32)* @_ZN1S3fooEi.arch_ivybridge
-// LINUX: ret i32 (%struct.S*, i32)* @_ZN1S3fooEi.sse4.2
-// LINUX: ret i32 (%struct.S*, i32)* @_ZN1S3fooEi
+// LINUX: define weak_odr ptr @_ZN1S3fooEi.resolver() comdat
+// LINUX: ret ptr @_ZN1S3fooEi.arch_sandybridge
+// LINUX: ret ptr @_ZN1S3fooEi.arch_ivybridge
+// LINUX: ret ptr @_ZN1S3fooEi.sse4.2
+// LINUX: ret ptr @_ZN1S3fooEi
 
-// WINDOWS: define weak_odr dso_local i32 @"?foo at S@@QEAAHH at Z.resolver"(%struct.S* %0, i32 %1)
+// WINDOWS: define weak_odr dso_local i32 @"?foo at S@@QEAAHH at Z.resolver"(ptr %0, i32 %1)
 // WINDOWS: call i32 @"?foo at S@@QEAAHH at Z.arch_sandybridge"
 // WINDOWS: call i32 @"?foo at S@@QEAAHH at Z.arch_ivybridge"
 // WINDOWS: call i32 @"?foo at S@@QEAAHH at Z.sse4.2"
@@ -125,25 +125,25 @@ int templ_use() {
 // WINDOWS: define dso_local noundef i32 @"?bar2@@YAHXZ"()
 // WINDOWS: call noundef i32 @"?foo at S2@@QEAAHH at Z.resolver"
 
-// LINUX: define weak_odr i32 (%struct.S2*, i32)* @_ZN2S23fooEi.resolver() comdat
-// LINUX: ret i32 (%struct.S2*, i32)* @_ZN2S23fooEi.arch_sandybridge
-// LINUX: ret i32 (%struct.S2*, i32)* @_ZN2S23fooEi.arch_ivybridge
-// LINUX: ret i32 (%struct.S2*, i32)* @_ZN2S23fooEi.sse4.2
-// LINUX: ret i32 (%struct.S2*, i32)* @_ZN2S23fooEi
+// LINUX: define weak_odr ptr @_ZN2S23fooEi.resolver() comdat
+// LINUX: ret ptr @_ZN2S23fooEi.arch_sandybridge
+// LINUX: ret ptr @_ZN2S23fooEi.arch_ivybridge
+// LINUX: ret ptr @_ZN2S23fooEi.sse4.2
+// LINUX: ret ptr @_ZN2S23fooEi
 
-// WINDOWS: define weak_odr dso_local i32 @"?foo at S2@@QEAAHH at Z.resolver"(%struct.S2* %0, i32 %1)
+// WINDOWS: define weak_odr dso_local i32 @"?foo at S2@@QEAAHH at Z.resolver"(ptr %0, i32 %1)
 // WINDOWS: call i32 @"?foo at S2@@QEAAHH at Z.arch_sandybridge"
 // WINDOWS: call i32 @"?foo at S2@@QEAAHH at Z.arch_ivybridge"
 // WINDOWS: call i32 @"?foo at S2@@QEAAHH at Z.sse4.2"
 // WINDOWS: call i32 @"?foo at S2@@QEAAHH at Z"
 
-// LINUX: define{{.*}} i32 @_ZN2S23fooEi.sse4.2(%struct.S2* {{[^,]*}} %this, i32 noundef %0)
-// LINUX: define{{.*}} i32 @_ZN2S23fooEi.arch_ivybridge(%struct.S2* {{[^,]*}} %this, i32 noundef %0)
-// LINUX: define{{.*}} i32 @_ZN2S23fooEi(%struct.S2* {{[^,]*}} %this, i32 noundef %0)
+// LINUX: define{{.*}} i32 @_ZN2S23fooEi.sse4.2(ptr {{[^,]*}} %this, i32 noundef %0)
+// LINUX: define{{.*}} i32 @_ZN2S23fooEi.arch_ivybridge(ptr {{[^,]*}} %this, i32 noundef %0)
+// LINUX: define{{.*}} i32 @_ZN2S23fooEi(ptr {{[^,]*}} %this, i32 noundef %0)
 
-// WINDOWS: define dso_local noundef i32 @"?foo at S2@@QEAAHH at Z.sse4.2"(%struct.S2* {{[^,]*}} %this, i32 noundef %0)
-// WINDOWS: define dso_local noundef i32 @"?foo at S2@@QEAAHH at Z.arch_ivybridge"(%struct.S2* {{[^,]*}} %this, i32 noundef %0)
-// WINDOWS: define dso_local noundef i32 @"?foo at S2@@QEAAHH at Z"(%struct.S2* {{[^,]*}} %this, i32 noundef %0)
+// WINDOWS: define dso_local noundef i32 @"?foo at S2@@QEAAHH at Z.sse4.2"(ptr {{[^,]*}} %this, i32 noundef %0)
+// WINDOWS: define dso_local noundef i32 @"?foo at S2@@QEAAHH at Z.arch_ivybridge"(ptr {{[^,]*}} %this, i32 noundef %0)
+// WINDOWS: define dso_local noundef i32 @"?foo at S2@@QEAAHH at Z"(ptr {{[^,]*}} %this, i32 noundef %0)
 
 // LINUX: define{{.*}} i32 @_Z9templ_usev()
 // LINUX: call noundef i32 @_ZN5templIiE3fooEi.ifunc
@@ -153,50 +153,50 @@ int templ_use() {
 // WINDOWS: call noundef i32 @"?foo@?$templ at H@@QEAAHH at Z.resolver"
 // WINDOWS: call noundef i32 @"?foo@?$templ at N@@QEAAHH at Z.resolver"
 
-// LINUX: define weak_odr i32 (%struct.templ*, i32)* @_ZN5templIiE3fooEi.resolver() comdat
-// LINUX: ret i32 (%struct.templ*, i32)* @_ZN5templIiE3fooEi.arch_sandybridge
-// LINUX: ret i32 (%struct.templ*, i32)* @_ZN5templIiE3fooEi.arch_ivybridge
-// LINUX: ret i32 (%struct.templ*, i32)* @_ZN5templIiE3fooEi.sse4.2
-// LINUX: ret i32 (%struct.templ*, i32)* @_ZN5templIiE3fooEi
+// LINUX: define weak_odr ptr @_ZN5templIiE3fooEi.resolver() comdat
+// LINUX: ret ptr @_ZN5templIiE3fooEi.arch_sandybridge
+// LINUX: ret ptr @_ZN5templIiE3fooEi.arch_ivybridge
+// LINUX: ret ptr @_ZN5templIiE3fooEi.sse4.2
+// LINUX: ret ptr @_ZN5templIiE3fooEi
 
-// WINDOWS: define weak_odr dso_local i32 @"?foo@?$templ at H@@QEAAHH at Z.resolver"(%struct.templ* %0, i32 %1)
+// WINDOWS: define weak_odr dso_local i32 @"?foo@?$templ at H@@QEAAHH at Z.resolver"(ptr %0, i32 %1)
 // WINDOWS: call i32 @"?foo@?$templ at H@@QEAAHH at Z.arch_sandybridge"
 // WINDOWS: call i32 @"?foo@?$templ at H@@QEAAHH at Z.arch_ivybridge"
 // WINDOWS: call i32 @"?foo@?$templ at H@@QEAAHH at Z.sse4.2"
 // WINDOWS: call i32 @"?foo@?$templ at H@@QEAAHH at Z"
 
-// LINUX: define weak_odr i32 (%struct.templ.0*, i32)* @_ZN5templIdE3fooEi.resolver() comdat
-// LINUX: ret i32 (%struct.templ.0*, i32)* @_ZN5templIdE3fooEi.arch_sandybridge
-// LINUX: ret i32 (%struct.templ.0*, i32)* @_ZN5templIdE3fooEi.arch_ivybridge
-// LINUX: ret i32 (%struct.templ.0*, i32)* @_ZN5templIdE3fooEi.sse4.2
-// LINUX: ret i32 (%struct.templ.0*, i32)* @_ZN5templIdE3fooEi
+// LINUX: define weak_odr ptr @_ZN5templIdE3fooEi.resolver() comdat
+// LINUX: ret ptr @_ZN5templIdE3fooEi.arch_sandybridge
+// LINUX: ret ptr @_ZN5templIdE3fooEi.arch_ivybridge
+// LINUX: ret ptr @_ZN5templIdE3fooEi.sse4.2
+// LINUX: ret ptr @_ZN5templIdE3fooEi
 
-// WINDOWS: define weak_odr dso_local i32 @"?foo@?$templ at N@@QEAAHH at Z.resolver"(%struct.templ.0* %0, i32 %1) comdat
+// WINDOWS: define weak_odr dso_local i32 @"?foo@?$templ at N@@QEAAHH at Z.resolver"(ptr %0, i32 %1) comdat
 // WINDOWS: call i32 @"?foo@?$templ at N@@QEAAHH at Z.arch_sandybridge"
 // WINDOWS: call i32 @"?foo@?$templ at N@@QEAAHH at Z.arch_ivybridge"
 // WINDOWS: call i32 @"?foo@?$templ at N@@QEAAHH at Z.sse4.2"
 // WINDOWS: call i32 @"?foo@?$templ at N@@QEAAHH at Z"
 
-// LINUX: define linkonce_odr noundef i32 @_ZN1S3fooEi.sse4.2(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// LINUX: define linkonce_odr noundef i32 @_ZN1S3fooEi.sse4.2(ptr {{[^,]*}} %this, i32 noundef %0)
 // LINUX: ret i32 0
 
-// WINDOWS: define linkonce_odr dso_local noundef i32 @"?foo at S@@QEAAHH at Z.sse4.2"(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// WINDOWS: define linkonce_odr dso_local noundef i32 @"?foo at S@@QEAAHH at Z.sse4.2"(ptr {{[^,]*}} %this, i32 noundef %0)
 // WINDOWS: ret i32 0
 
-// LINUX: declare noundef i32 @_ZN1S3fooEi.arch_sandybridge(%struct.S* {{[^,]*}}, i32 noundef)
+// LINUX: declare noundef i32 @_ZN1S3fooEi.arch_sandybridge(ptr {{[^,]*}}, i32 noundef)
 
-// WINDOWS: declare dso_local noundef i32 @"?foo at S@@QEAAHH at Z.arch_sandybridge"(%struct.S* {{[^,]*}}, i32 noundef)
+// WINDOWS: declare dso_local noundef i32 @"?foo at S@@QEAAHH at Z.arch_sandybridge"(ptr {{[^,]*}}, i32 noundef)
 
-// LINUX: define linkonce_odr noundef i32 @_ZN1S3fooEi.arch_ivybridge(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// LINUX: define linkonce_odr noundef i32 @_ZN1S3fooEi.arch_ivybridge(ptr {{[^,]*}} %this, i32 noundef %0)
 // LINUX: ret i32 1
 
-// WINDOWS: define linkonce_odr dso_local noundef i32 @"?foo at S@@QEAAHH at Z.arch_ivybridge"(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// WINDOWS: define linkonce_odr dso_local noundef i32 @"?foo at S@@QEAAHH at Z.arch_ivybridge"(ptr {{[^,]*}} %this, i32 noundef %0)
 // WINDOWS: ret i32 1
 
-// LINUX: define linkonce_odr noundef i32 @_ZN1S3fooEi(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// LINUX: define linkonce_odr noundef i32 @_ZN1S3fooEi(ptr {{[^,]*}} %this, i32 noundef %0)
 // LINUX: ret i32 2
 
-// WINDOWS: define linkonce_odr dso_local noundef i32 @"?foo at S@@QEAAHH at Z"(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// WINDOWS: define linkonce_odr dso_local noundef i32 @"?foo at S@@QEAAHH at Z"(ptr {{[^,]*}} %this, i32 noundef %0)
 // WINDOWS: ret i32 2
 
 // LINUX: define linkonce_odr noundef i32 @_ZN5templIiE3fooEi.sse4.2

diff  --git a/clang/test/CodeGenCXX/attr-target-mv-modules.cpp b/clang/test/CodeGenCXX/attr-target-mv-modules.cpp
index 018b0d4f2e135..c91cf71fc5f8d 100644
--- a/clang/test/CodeGenCXX/attr-target-mv-modules.cpp
+++ b/clang/test/CodeGenCXX/attr-target-mv-modules.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-linux-gnu -fmodules -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -fmodules -emit-llvm %s -o - | FileCheck %s
 #pragma clang module build A
 module A {}
 #pragma clang module contents
@@ -22,8 +22,8 @@ __attribute__((target("sse4.2"))) void f();
 void g() { f(); }
 
 // Negative tests to validate that the resolver only calls each 1x.
-// CHECK: define weak_odr void ()* @_Z1fv.resolver
-// CHECK: ret void ()* @_Z1fv.sse4.2
-// CHECK-NOT: ret void ()* @_Z1fv.sse4.2
-// CHECK: ret void ()* @_Z1fv
-// CHECK-NOT: ret void ()* @_Z1fv
+// CHECK: define weak_odr ptr @_Z1fv.resolver
+// CHECK: ret ptr @_Z1fv.sse4.2
+// CHECK-NOT: ret ptr @_Z1fv.sse4.2
+// CHECK: ret ptr @_Z1fv
+// CHECK-NOT: ret ptr @_Z1fv

diff  --git a/clang/test/CodeGenCXX/attr-target-mv-out-of-line-defs.cpp b/clang/test/CodeGenCXX/attr-target-mv-out-of-line-defs.cpp
index 3453f5935021d..dda7de08aed43 100644
--- a/clang/test/CodeGenCXX/attr-target-mv-out-of-line-defs.cpp
+++ b/clang/test/CodeGenCXX/attr-target-mv-out-of-line-defs.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
 struct S {
   int __attribute__((target("sse4.2"))) foo(int);
   int __attribute__((target("arch=sandybridge"))) foo(int);
@@ -16,46 +16,46 @@ int bar() {
   return s.foo(0);
 }
 
-// LINUX: @_ZN1S3fooEi.ifunc = weak_odr ifunc i32 (%struct.S*, i32), i32 (%struct.S*, i32)* ()* @_ZN1S3fooEi.resolver
+// LINUX: @_ZN1S3fooEi.ifunc = weak_odr ifunc i32 (ptr, i32), ptr @_ZN1S3fooEi.resolver
 
-// LINUX: define{{.*}} i32 @_ZN1S3fooEi(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// LINUX: define{{.*}} i32 @_ZN1S3fooEi(ptr {{[^,]*}} %this, i32 noundef %0)
 // LINUX: ret i32 2
 
-// WINDOWS: define dso_local noundef i32 @"?foo at S@@QEAAHH at Z"(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// WINDOWS: define dso_local noundef i32 @"?foo at S@@QEAAHH at Z"(ptr {{[^,]*}} %this, i32 noundef %0)
 // WINDOWS: ret i32 2
 
-// LINUX: define{{.*}} i32 @_ZN1S3fooEi.sse4.2(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// LINUX: define{{.*}} i32 @_ZN1S3fooEi.sse4.2(ptr {{[^,]*}} %this, i32 noundef %0)
 // LINUX: ret i32 0
 
-// WINDOWS: define dso_local noundef i32 @"?foo at S@@QEAAHH at Z.sse4.2"(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// WINDOWS: define dso_local noundef i32 @"?foo at S@@QEAAHH at Z.sse4.2"(ptr {{[^,]*}} %this, i32 noundef %0)
 // WINDOWS: ret i32 0
 
-// LINUX: define{{.*}} i32 @_ZN1S3fooEi.arch_ivybridge(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// LINUX: define{{.*}} i32 @_ZN1S3fooEi.arch_ivybridge(ptr {{[^,]*}} %this, i32 noundef %0)
 // LINUX: ret i32 1
 
-// WINDOWS: define dso_local noundef i32 @"?foo at S@@QEAAHH at Z.arch_ivybridge"(%struct.S* {{[^,]*}} %this, i32 noundef %0)
+// WINDOWS: define dso_local noundef i32 @"?foo at S@@QEAAHH at Z.arch_ivybridge"(ptr {{[^,]*}} %this, i32 noundef %0)
 // WINDOWS: ret i32 1
 
 // LINUX: define{{.*}} i32 @_Z3barv()
 // LINUX: %s = alloca %struct.S, align 1
-// LINUX: %call = call noundef i32 @_ZN1S3fooEi.ifunc(%struct.S* {{[^,]*}} %s, i32 noundef 0)
+// LINUX: %call = call noundef i32 @_ZN1S3fooEi.ifunc(ptr {{[^,]*}} %s, i32 noundef 0)
 
 // WINDOWS: define dso_local noundef i32 @"?bar@@YAHXZ"()
 // WINDOWS: %s = alloca %struct.S, align 1
-// WINDOWS: %call = call noundef i32 @"?foo at S@@QEAAHH at Z.resolver"(%struct.S* {{[^,]*}} %s, i32 noundef 0)
+// WINDOWS: %call = call noundef i32 @"?foo at S@@QEAAHH at Z.resolver"(ptr {{[^,]*}} %s, i32 noundef 0)
 
-// LINUX: define weak_odr i32 (%struct.S*, i32)* @_ZN1S3fooEi.resolver() comdat
-// LINUX: ret i32 (%struct.S*, i32)* @_ZN1S3fooEi.arch_sandybridge
-// LINUX: ret i32 (%struct.S*, i32)* @_ZN1S3fooEi.arch_ivybridge
-// LINUX: ret i32 (%struct.S*, i32)* @_ZN1S3fooEi.sse4.2
-// LINUX: ret i32 (%struct.S*, i32)* @_ZN1S3fooEi
+// LINUX: define weak_odr ptr @_ZN1S3fooEi.resolver() comdat
+// LINUX: ret ptr @_ZN1S3fooEi.arch_sandybridge
+// LINUX: ret ptr @_ZN1S3fooEi.arch_ivybridge
+// LINUX: ret ptr @_ZN1S3fooEi.sse4.2
+// LINUX: ret ptr @_ZN1S3fooEi
 
-// WINDOWS: define weak_odr dso_local i32 @"?foo at S@@QEAAHH at Z.resolver"(%struct.S* %0, i32 %1) comdat
-// WINDOWS: call i32 @"?foo at S@@QEAAHH at Z.arch_sandybridge"(%struct.S* %0, i32 %1)
-// WINDOWS: call i32 @"?foo at S@@QEAAHH at Z.arch_ivybridge"(%struct.S* %0, i32 %1)
-// WINDOWS: call i32 @"?foo at S@@QEAAHH at Z.sse4.2"(%struct.S* %0, i32 %1)
-// WINDOWS: call i32 @"?foo at S@@QEAAHH at Z"(%struct.S* %0, i32 %1)
+// WINDOWS: define weak_odr dso_local i32 @"?foo at S@@QEAAHH at Z.resolver"(ptr %0, i32 %1) comdat
+// WINDOWS: call i32 @"?foo at S@@QEAAHH at Z.arch_sandybridge"(ptr %0, i32 %1)
+// WINDOWS: call i32 @"?foo at S@@QEAAHH at Z.arch_ivybridge"(ptr %0, i32 %1)
+// WINDOWS: call i32 @"?foo at S@@QEAAHH at Z.sse4.2"(ptr %0, i32 %1)
+// WINDOWS: call i32 @"?foo at S@@QEAAHH at Z"(ptr %0, i32 %1)
 
-// LINUX: declare noundef i32 @_ZN1S3fooEi.arch_sandybridge(%struct.S* {{[^,]*}}, i32 noundef)
+// LINUX: declare noundef i32 @_ZN1S3fooEi.arch_sandybridge(ptr {{[^,]*}}, i32 noundef)
 
-// WINDOWS: declare dso_local noundef i32 @"?foo at S@@QEAAHH at Z.arch_sandybridge"(%struct.S* {{[^,]*}}, i32 noundef)
+// WINDOWS: declare dso_local noundef i32 @"?foo at S@@QEAAHH at Z.arch_sandybridge"(ptr {{[^,]*}}, i32 noundef)

diff  --git a/clang/test/CodeGenCXX/attr-target-mv-overloads.cpp b/clang/test/CodeGenCXX/attr-target-mv-overloads.cpp
index 71a8a2ff0d644..49a05e7485a5d 100644
--- a/clang/test/CodeGenCXX/attr-target-mv-overloads.cpp
+++ b/clang/test/CodeGenCXX/attr-target-mv-overloads.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
 
 int __attribute__((target("sse4.2"))) foo_overload(int) { return 0; }
 int __attribute__((target("arch=sandybridge"))) foo_overload(int);
@@ -14,8 +14,8 @@ int bar2() {
   return foo_overload() + foo_overload(1);
 }
 
-// LINUX: @_Z12foo_overloadv.ifunc = weak_odr ifunc i32 (), i32 ()* ()* @_Z12foo_overloadv.resolver
-// LINUX: @_Z12foo_overloadi.ifunc = weak_odr ifunc i32 (i32), i32 (i32)* ()* @_Z12foo_overloadi.resolver
+// LINUX: @_Z12foo_overloadv.ifunc = weak_odr ifunc i32 (), ptr @_Z12foo_overloadv.resolver
+// LINUX: @_Z12foo_overloadi.ifunc = weak_odr ifunc i32 (i32), ptr @_Z12foo_overloadi.resolver
 
 // LINUX: define{{.*}} i32 @_Z12foo_overloadi.sse4.2(i32 noundef %0)
 // LINUX: ret i32 0
@@ -51,11 +51,11 @@ int bar2() {
 // WINDOWS: call noundef i32 @"?foo_overload@@YAHXZ.resolver"()
 // WINDOWS: call noundef i32 @"?foo_overload@@YAHH at Z.resolver"(i32 noundef 1)
 
-// LINUX: define weak_odr i32 ()* @_Z12foo_overloadv.resolver() comdat
-// LINUX: ret i32 ()* @_Z12foo_overloadv.arch_sandybridge
-// LINUX: ret i32 ()* @_Z12foo_overloadv.arch_ivybridge
-// LINUX: ret i32 ()* @_Z12foo_overloadv.sse4.2
-// LINUX: ret i32 ()* @_Z12foo_overloadv
+// LINUX: define weak_odr ptr @_Z12foo_overloadv.resolver() comdat
+// LINUX: ret ptr @_Z12foo_overloadv.arch_sandybridge
+// LINUX: ret ptr @_Z12foo_overloadv.arch_ivybridge
+// LINUX: ret ptr @_Z12foo_overloadv.sse4.2
+// LINUX: ret ptr @_Z12foo_overloadv
 
 // WINDOWS: define weak_odr dso_local i32 @"?foo_overload@@YAHXZ.resolver"() comdat
 // WINDOWS: call i32 @"?foo_overload@@YAHXZ.arch_sandybridge"
@@ -63,11 +63,11 @@ int bar2() {
 // WINDOWS: call i32 @"?foo_overload@@YAHXZ.sse4.2"
 // WINDOWS: call i32 @"?foo_overload@@YAHXZ"
 
-// LINUX: define weak_odr i32 (i32)* @_Z12foo_overloadi.resolver() comdat
-// LINUX: ret i32 (i32)* @_Z12foo_overloadi.arch_sandybridge
-// LINUX: ret i32 (i32)* @_Z12foo_overloadi.arch_ivybridge
-// LINUX: ret i32 (i32)* @_Z12foo_overloadi.sse4.2
-// LINUX: ret i32 (i32)* @_Z12foo_overloadi
+// LINUX: define weak_odr ptr @_Z12foo_overloadi.resolver() comdat
+// LINUX: ret ptr @_Z12foo_overloadi.arch_sandybridge
+// LINUX: ret ptr @_Z12foo_overloadi.arch_ivybridge
+// LINUX: ret ptr @_Z12foo_overloadi.sse4.2
+// LINUX: ret ptr @_Z12foo_overloadi
 
 // WINDOWS: define weak_odr dso_local i32 @"?foo_overload@@YAHH at Z.resolver"(i32 %0) comdat
 // WINDOWS: call i32 @"?foo_overload@@YAHH at Z.arch_sandybridge"

diff  --git a/clang/test/CodeGenCXX/attr-x86-interrupt.cpp b/clang/test/CodeGenCXX/attr-x86-interrupt.cpp
index 1840d4b341d8e..863db4a05975a 100644
--- a/clang/test/CodeGenCXX/attr-x86-interrupt.cpp
+++ b/clang/test/CodeGenCXX/attr-x86-interrupt.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-pc-win32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_WIN
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-pc-win32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_WIN
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnux32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_LINUX
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_LINUX
+// RUN: %clang_cc1 -triple i386-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_LINUX
+// RUN: %clang_cc1 -triple x86_64-pc-win32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_WIN
+// RUN: %clang_cc1 -triple i386-pc-win32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_WIN
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnux32 %s -emit-llvm -o - | FileCheck %s --check-prefix=X86_64_LINUX
 
 #ifdef __x86_64__
 typedef __UINT64_TYPE__ uword;
@@ -17,19 +17,19 @@ __attribute__((interrupt)) void foo8(int *a) {}
 struct St {
 static void foo9(int *a) __attribute__((interrupt)) {}
 };
-// X86_64_LINUX: @llvm.compiler.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i64)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata"
-// X86_64_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo7{{.*}}(i32* noundef byval(i32) %{{.+}}, i64 noundef %{{.+}})
-// X86_64_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo8{{.*}}(i32* noundef byval(i32) %{{.+}})
-// X86_64_LINUX: define linkonce_odr x86_intrcc void @{{.*}}foo9{{.*}}(i32* noundef byval(i32) %{{.+}})
-// X86_LINUX: @llvm.compiler.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i32)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata"
-// X86_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo7{{.*}}(i32* noundef byval(i32) %{{.+}}, i32 noundef %{{.+}})
-// X86_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo8{{.*}}(i32* noundef byval(i32) %{{.+}})
-// X86_LINUX: define linkonce_odr x86_intrcc void @{{.*}}foo9{{.*}}(i32* noundef byval(i32) %{{.+}})
-// X86_64_WIN: @llvm.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i64)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata"
-// X86_64_WIN: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(i32* noundef byval(i32) %{{.+}}, i64 noundef %{{.+}})
-// X86_64_WIN: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(i32* noundef byval(i32) %{{.+}})
-// X86_64_WIN: define linkonce_odr dso_local x86_intrcc void @{{.*}}foo9{{.*}}(i32* noundef byval(i32) %{{.+}})
-// X86_WIN: @llvm.used = appending global [3 x i8*] [i8* bitcast (void (i32*, i32)* @{{.*}}foo7{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo8{{.*}} to i8*), i8* bitcast (void (i32*)* @{{.*}}foo9{{.*}} to i8*)], section "llvm.metadata"
-// X86_WIN: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(i32* noundef byval(i32) %{{.+}}, i32 noundef %{{.+}})
-// X86_WIN: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(i32* noundef byval(i32) %{{.+}})
-// X86_WIN: define linkonce_odr dso_local x86_intrcc void @{{.*}}foo9{{.*}}(i32* noundef byval(i32) %{{.+}})
+// X86_64_LINUX: @llvm.compiler.used = appending global [3 x ptr] [ptr @{{.*}}foo7{{.*}}, ptr @{{.*}}foo8{{.*}}, ptr @{{.*}}foo9{{.*}}], section "llvm.metadata"
+// X86_64_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo7{{.*}}(ptr noundef byval(i32) %{{.+}}, i64 noundef %{{.+}})
+// X86_64_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo8{{.*}}(ptr noundef byval(i32) %{{.+}})
+// X86_64_LINUX: define linkonce_odr x86_intrcc void @{{.*}}foo9{{.*}}(ptr noundef byval(i32) %{{.+}})
+// X86_LINUX: @llvm.compiler.used = appending global [3 x ptr] [ptr @{{.*}}foo7{{.*}}, ptr @{{.*}}foo8{{.*}}, ptr @{{.*}}foo9{{.*}}], section "llvm.metadata"
+// X86_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo7{{.*}}(ptr noundef byval(i32) %{{.+}}, i32 noundef %{{.+}})
+// X86_LINUX: define{{.*}} x86_intrcc void @{{.*}}foo8{{.*}}(ptr noundef byval(i32) %{{.+}})
+// X86_LINUX: define linkonce_odr x86_intrcc void @{{.*}}foo9{{.*}}(ptr noundef byval(i32) %{{.+}})
+// X86_64_WIN: @llvm.used = appending global [3 x ptr] [ptr @{{.*}}foo7{{.*}}, ptr @{{.*}}foo8{{.*}}, ptr @{{.*}}foo9{{.*}}], section "llvm.metadata"
+// X86_64_WIN: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(ptr noundef byval(i32) %{{.+}}, i64 noundef %{{.+}})
+// X86_64_WIN: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(ptr noundef byval(i32) %{{.+}})
+// X86_64_WIN: define linkonce_odr dso_local x86_intrcc void @{{.*}}foo9{{.*}}(ptr noundef byval(i32) %{{.+}})
+// X86_WIN: @llvm.used = appending global [3 x ptr] [ptr @{{.*}}foo7{{.*}}, ptr @{{.*}}foo8{{.*}}, ptr @{{.*}}foo9{{.*}}], section "llvm.metadata"
+// X86_WIN: define dso_local x86_intrcc void @{{.*}}foo7{{.*}}(ptr noundef byval(i32) %{{.+}}, i32 noundef %{{.+}})
+// X86_WIN: define dso_local x86_intrcc void @{{.*}}foo8{{.*}}(ptr noundef byval(i32) %{{.+}})
+// X86_WIN: define linkonce_odr dso_local x86_intrcc void @{{.*}}foo9{{.*}}(ptr noundef byval(i32) %{{.+}})

diff  --git a/clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp b/clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp
index 9c2e005af526e..f90f9361fb435 100644
--- a/clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp
+++ b/clang/test/CodeGenCXX/attr-x86-no_caller_saved_registers.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-pc-win32 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-pc-win32 %s -emit-llvm -o - | FileCheck %s
 
 // CHECK: foo{{[^#]*}}#[[ATTRS:[0-9]+]]
 __attribute__((no_caller_saved_registers)) void foo() {}
@@ -17,7 +17,7 @@ __attribute((no_caller_saved_registers)) void (*foobar)(void);
 // CHECK-LABEL: @main
 int main(int argc, char **argv) {
   St::baz(&argc);
-  // CHECK: [[FOOBAR:%.+]] = load void ()*, void ()** @{{.*}}foobar{{.*}},
+  // CHECK: [[FOOBAR:%.+]] = load ptr, ptr @{{.*}}foobar{{.*}},
   // CHECK-NEXT: call void [[FOOBAR]]() #[[ATTRS1:.+]]
   foobar();
   return 0;

diff  --git a/clang/test/CodeGenCXX/attr.cpp b/clang/test/CodeGenCXX/attr.cpp
index f2303ed12621a..3890f2018c9a6 100644
--- a/clang/test/CodeGenCXX/attr.cpp
+++ b/clang/test/CodeGenCXX/attr.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
-// CHECK: @test2 ={{.*}} alias i32 (), i32 ()* @_Z5test1v
+// CHECK: @test2 ={{.*}} alias i32 (), ptr @_Z5test1v
 
 // CHECK: define{{.*}} i32 @_Z3foov() [[NUW:#[0-9]+]] align 1024
 int foo() __attribute__((aligned(1024)));
@@ -13,16 +13,16 @@ class C {
   void bar4() __attribute__((aligned(1024)));
 } c;
 
-// CHECK: define{{.*}} void @_ZN1C4bar1Ev(%class.C* {{[^,]*}} %this) unnamed_addr [[NUW]] align 2
+// CHECK: define{{.*}} void @_ZN1C4bar1Ev(ptr {{[^,]*}} %this) unnamed_addr [[NUW]] align 2
 void C::bar1() { }
 
-// CHECK: define{{.*}} void @_ZN1C4bar2Ev(%class.C* {{[^,]*}} %this) unnamed_addr [[NUW]] align 2
+// CHECK: define{{.*}} void @_ZN1C4bar2Ev(ptr {{[^,]*}} %this) unnamed_addr [[NUW]] align 2
 void C::bar2() { }
 
-// CHECK: define{{.*}} void @_ZN1C4bar3Ev(%class.C* {{[^,]*}} %this) unnamed_addr [[NUW]] align 1024
+// CHECK: define{{.*}} void @_ZN1C4bar3Ev(ptr {{[^,]*}} %this) unnamed_addr [[NUW]] align 1024
 void C::bar3() { }
 
-// CHECK: define{{.*}} void @_ZN1C4bar4Ev(%class.C* {{[^,]*}} %this) [[NUW]] align 1024
+// CHECK: define{{.*}} void @_ZN1C4bar4Ev(ptr {{[^,]*}} %this) [[NUW]] align 1024
 void C::bar4() { }
 
 // PR6635

diff  --git a/clang/test/CodeGenCXX/auto-variable-template.cpp b/clang/test/CodeGenCXX/auto-variable-template.cpp
index 61e648e2fe8fd..ff8f898697a87 100644
--- a/clang/test/CodeGenCXX/auto-variable-template.cpp
+++ b/clang/test/CodeGenCXX/auto-variable-template.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 %s -triple=x86_64-linux -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 %s -triple=x86_64-linux -emit-llvm -o - | FileCheck %s
 
 struct f {
   void operator()() const {}
@@ -11,7 +11,7 @@ int main() { vtemplate<int>(); }
 // CHECK: @_Z9vtemplateIiE = linkonce_odr global %struct.f undef, comdat
 
 // CHECK: define{{.*}} i32 @main()
-// CHECK: call void @_ZNK1fclEv(%struct.f* {{[^,]*}} @_Z9vtemplateIiE)
+// CHECK: call void @_ZNK1fclEv(ptr {{[^,]*}} @_Z9vtemplateIiE)
 
 template <typename>
 struct pack {

diff  --git a/clang/test/CodeGenCXX/block-byref.cpp b/clang/test/CodeGenCXX/block-byref.cpp
index f8555d6ae6248..8dc01f96baae1 100644
--- a/clang/test/CodeGenCXX/block-byref.cpp
+++ b/clang/test/CodeGenCXX/block-byref.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -fblocks -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -fblocks -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - | FileCheck %s
 // REQUIRES: x86-registered-target
 
 // CHECK: @b ={{.*}} global i32 0,
 
 // CHECK: define {{.*}}void @{{.*}}test{{.*}}_block_invoke(
-// CHECK: store i32 2, i32* @b,
+// CHECK: store i32 2, ptr @b,
 // CHECK: ret void
 
 int b;

diff  --git a/clang/test/CodeGenCXX/block-inalloca.cpp b/clang/test/CodeGenCXX/block-inalloca.cpp
index 920735a1936c8..a92813ccb921f 100644
--- a/clang/test/CodeGenCXX/block-inalloca.cpp
+++ b/clang/test/CodeGenCXX/block-inalloca.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-windows-msvc -fblocks -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i686-unknown-windows-msvc -fblocks -emit-llvm -o - %s | FileCheck %s
 
 struct S {
   S(const struct S &) {}
@@ -6,6 +6,6 @@ struct S {
 
 void (^b)(S) = ^(S) {};
 
-// CHECK: [[DESCRIPTOR:%.*]] = getelementptr inbounds <{ i8*, %struct.S, [3 x i8] }>, <{ i8*, %struct.S, [3 x i8] }>* %0, i32 0, i32 0
-// CHECK: load i8*, i8** [[DESCRIPTOR]]
+// CHECK: [[DESCRIPTOR:%.*]] = getelementptr inbounds <{ ptr, %struct.S, [3 x i8] }>, ptr %0, i32 0, i32 0
+// CHECK: load ptr, ptr [[DESCRIPTOR]]
 

diff  --git a/clang/test/CodeGenCXX/builtin-amdgcn-atomic-inc-dec.cpp b/clang/test/CodeGenCXX/builtin-amdgcn-atomic-inc-dec.cpp
index afebe930d412c..8701b04be8355 100644
--- a/clang/test/CodeGenCXX/builtin-amdgcn-atomic-inc-dec.cpp
+++ b/clang/test/CodeGenCXX/builtin-amdgcn-atomic-inc-dec.cpp
@@ -1,25 +1,25 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
 // REQUIRES: amdgpu-registered-target
-// RUN: %clang_cc1 -no-opaque-pointers %s -x hip -fcuda-is-device -emit-llvm -O0 -o - \
+// RUN: %clang_cc1 %s -x hip -fcuda-is-device -emit-llvm -O0 -o - \
 // RUN:   -triple=amdgcn-amd-amdhsa  | opt -S | FileCheck %s
 
 // CHECK-LABEL: @_Z29test_non_volatile_parameter32Pj(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[PTR_ADDR:%.*]] = alloca i32*, align 8, addrspace(5)
+// CHECK-NEXT:    [[PTR_ADDR:%.*]] = alloca ptr, align 8, addrspace(5)
 // CHECK-NEXT:    [[RES:%.*]] = alloca i32, align 4, addrspace(5)
-// CHECK-NEXT:    [[PTR_ADDR_ASCAST:%.*]] = addrspacecast i32* addrspace(5)* [[PTR_ADDR]] to i32**
-// CHECK-NEXT:    [[RES_ASCAST:%.*]] = addrspacecast i32 addrspace(5)* [[RES]] to i32*
-// CHECK-NEXT:    store i32* [[PTR:%.*]], i32** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32*, i32** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* [[TMP1]], align 4
-// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0i32(i32* [[TMP0]], i32 [[TMP2]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP3]], i32* [[RES_ASCAST]], align 4
-// CHECK-NEXT:    [[TMP4:%.*]] = load i32*, i32** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP5:%.*]] = load i32*, i32** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP6:%.*]] = load i32, i32* [[TMP5]], align 4
-// CHECK-NEXT:    [[TMP7:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* [[TMP4]], i32 [[TMP6]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP7]], i32* [[RES_ASCAST]], align 4
+// CHECK-NEXT:    [[PTR_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[PTR_ADDR]] to ptr
+// CHECK-NEXT:    [[RES_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[RES]] to ptr
+// CHECK-NEXT:    store ptr [[PTR:%.*]], ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP0:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[TMP1]], align 4
+// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0(ptr [[TMP0]], i32 [[TMP2]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP3]], ptr [[RES_ASCAST]], align 4
+// CHECK-NEXT:    [[TMP4:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP5:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP6:%.*]] = load i32, ptr [[TMP5]], align 4
+// CHECK-NEXT:    [[TMP7:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr [[TMP4]], i32 [[TMP6]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP7]], ptr [[RES_ASCAST]], align 4
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_non_volatile_parameter32(__UINT32_TYPE__ *ptr) {
@@ -31,21 +31,21 @@ __attribute__((device)) void test_non_volatile_parameter32(__UINT32_TYPE__ *ptr)
 
 // CHECK-LABEL: @_Z29test_non_volatile_parameter64Py(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[PTR_ADDR:%.*]] = alloca i64*, align 8, addrspace(5)
+// CHECK-NEXT:    [[PTR_ADDR:%.*]] = alloca ptr, align 8, addrspace(5)
 // CHECK-NEXT:    [[RES:%.*]] = alloca i64, align 8, addrspace(5)
-// CHECK-NEXT:    [[PTR_ADDR_ASCAST:%.*]] = addrspacecast i64* addrspace(5)* [[PTR_ADDR]] to i64**
-// CHECK-NEXT:    [[RES_ASCAST:%.*]] = addrspacecast i64 addrspace(5)* [[RES]] to i64*
-// CHECK-NEXT:    store i64* [[PTR:%.*]], i64** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP0:%.*]] = load i64*, i64** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = load i64*, i64** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP2:%.*]] = load i64, i64* [[TMP1]], align 8
-// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0i64(i64* [[TMP0]], i64 [[TMP2]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP3]], i64* [[RES_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP4:%.*]] = load i64*, i64** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP5:%.*]] = load i64*, i64** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP6:%.*]] = load i64, i64* [[TMP5]], align 8
-// CHECK-NEXT:    [[TMP7:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* [[TMP4]], i64 [[TMP6]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP7]], i64* [[RES_ASCAST]], align 8
+// CHECK-NEXT:    [[PTR_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[PTR_ADDR]] to ptr
+// CHECK-NEXT:    [[RES_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[RES]] to ptr
+// CHECK-NEXT:    store ptr [[PTR:%.*]], ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP0:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP2:%.*]] = load i64, ptr [[TMP1]], align 8
+// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0(ptr [[TMP0]], i64 [[TMP2]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP3]], ptr [[RES_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP4:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP5:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP6:%.*]] = load i64, ptr [[TMP5]], align 8
+// CHECK-NEXT:    [[TMP7:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr [[TMP4]], i64 [[TMP6]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP7]], ptr [[RES_ASCAST]], align 8
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_non_volatile_parameter64(__UINT64_TYPE__ *ptr) {
@@ -57,21 +57,21 @@ __attribute__((device)) void test_non_volatile_parameter64(__UINT64_TYPE__ *ptr)
 
 // CHECK-LABEL: @_Z25test_volatile_parameter32PVj(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[PTR_ADDR:%.*]] = alloca i32*, align 8, addrspace(5)
+// CHECK-NEXT:    [[PTR_ADDR:%.*]] = alloca ptr, align 8, addrspace(5)
 // CHECK-NEXT:    [[RES:%.*]] = alloca i32, align 4, addrspace(5)
-// CHECK-NEXT:    [[PTR_ADDR_ASCAST:%.*]] = addrspacecast i32* addrspace(5)* [[PTR_ADDR]] to i32**
-// CHECK-NEXT:    [[RES_ASCAST:%.*]] = addrspacecast i32 addrspace(5)* [[RES]] to i32*
-// CHECK-NEXT:    store i32* [[PTR:%.*]], i32** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32*, i32** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32*, i32** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP2:%.*]] = load volatile i32, i32* [[TMP1]], align 4
-// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0i32(i32* [[TMP0]], i32 [[TMP2]], i32 7, i32 2, i1 true)
-// CHECK-NEXT:    store i32 [[TMP3]], i32* [[RES_ASCAST]], align 4
-// CHECK-NEXT:    [[TMP4:%.*]] = load i32*, i32** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP5:%.*]] = load i32*, i32** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP6:%.*]] = load volatile i32, i32* [[TMP5]], align 4
-// CHECK-NEXT:    [[TMP7:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* [[TMP4]], i32 [[TMP6]], i32 7, i32 2, i1 true)
-// CHECK-NEXT:    store i32 [[TMP7]], i32* [[RES_ASCAST]], align 4
+// CHECK-NEXT:    [[PTR_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[PTR_ADDR]] to ptr
+// CHECK-NEXT:    [[RES_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[RES]] to ptr
+// CHECK-NEXT:    store ptr [[PTR:%.*]], ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP0:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP2:%.*]] = load volatile i32, ptr [[TMP1]], align 4
+// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0(ptr [[TMP0]], i32 [[TMP2]], i32 7, i32 2, i1 true)
+// CHECK-NEXT:    store i32 [[TMP3]], ptr [[RES_ASCAST]], align 4
+// CHECK-NEXT:    [[TMP4:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP5:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP6:%.*]] = load volatile i32, ptr [[TMP5]], align 4
+// CHECK-NEXT:    [[TMP7:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr [[TMP4]], i32 [[TMP6]], i32 7, i32 2, i1 true)
+// CHECK-NEXT:    store i32 [[TMP7]], ptr [[RES_ASCAST]], align 4
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_volatile_parameter32(volatile __UINT32_TYPE__ *ptr) {
@@ -83,21 +83,21 @@ __attribute__((device)) void test_volatile_parameter32(volatile __UINT32_TYPE__
 
 // CHECK-LABEL: @_Z25test_volatile_parameter64PVy(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[PTR_ADDR:%.*]] = alloca i64*, align 8, addrspace(5)
+// CHECK-NEXT:    [[PTR_ADDR:%.*]] = alloca ptr, align 8, addrspace(5)
 // CHECK-NEXT:    [[RES:%.*]] = alloca i64, align 8, addrspace(5)
-// CHECK-NEXT:    [[PTR_ADDR_ASCAST:%.*]] = addrspacecast i64* addrspace(5)* [[PTR_ADDR]] to i64**
-// CHECK-NEXT:    [[RES_ASCAST:%.*]] = addrspacecast i64 addrspace(5)* [[RES]] to i64*
-// CHECK-NEXT:    store i64* [[PTR:%.*]], i64** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP0:%.*]] = load i64*, i64** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = load i64*, i64** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP2:%.*]] = load volatile i64, i64* [[TMP1]], align 8
-// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0i64(i64* [[TMP0]], i64 [[TMP2]], i32 7, i32 2, i1 true)
-// CHECK-NEXT:    store i64 [[TMP3]], i64* [[RES_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP4:%.*]] = load i64*, i64** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP5:%.*]] = load i64*, i64** [[PTR_ADDR_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP6:%.*]] = load volatile i64, i64* [[TMP5]], align 8
-// CHECK-NEXT:    [[TMP7:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* [[TMP4]], i64 [[TMP6]], i32 7, i32 2, i1 true)
-// CHECK-NEXT:    store i64 [[TMP7]], i64* [[RES_ASCAST]], align 8
+// CHECK-NEXT:    [[PTR_ADDR_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[PTR_ADDR]] to ptr
+// CHECK-NEXT:    [[RES_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[RES]] to ptr
+// CHECK-NEXT:    store ptr [[PTR:%.*]], ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP0:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP1:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP2:%.*]] = load volatile i64, ptr [[TMP1]], align 8
+// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0(ptr [[TMP0]], i64 [[TMP2]], i32 7, i32 2, i1 true)
+// CHECK-NEXT:    store i64 [[TMP3]], ptr [[RES_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP4:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP5:%.*]] = load ptr, ptr [[PTR_ADDR_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP6:%.*]] = load volatile i64, ptr [[TMP5]], align 8
+// CHECK-NEXT:    [[TMP7:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr [[TMP4]], i64 [[TMP6]], i32 7, i32 2, i1 true)
+// CHECK-NEXT:    store i64 [[TMP7]], ptr [[RES_ASCAST]], align 8
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_volatile_parameter64(volatile __UINT64_TYPE__ *ptr) {
@@ -109,12 +109,12 @@ __attribute__((device)) void test_volatile_parameter64(volatile __UINT64_TYPE__
 
 // CHECK-LABEL: @_Z13test_shared32v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ13test_shared32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ13test_shared32vE3val to i32*), i32 [[TMP0]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP1]], i32* addrspacecast (i32 addrspace(3)* @_ZZ13test_shared32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ13test_shared32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ13test_shared32vE3val to i32*), i32 [[TMP2]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP3]], i32* addrspacecast (i32 addrspace(3)* @_ZZ13test_shared32vE3val to i32*), align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared32vE3val to ptr), i32 [[TMP0]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP1]], ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared32vE3val to ptr), i32 [[TMP2]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP3]], ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared32vE3val to ptr), align 4
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_shared32() {
@@ -127,12 +127,12 @@ __attribute__((device)) void test_shared32() {
 
 // CHECK-LABEL: @_Z13test_shared64v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ13test_shared64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ13test_shared64vE3val to i64*), i64 [[TMP0]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP1]], i64* addrspacecast (i64 addrspace(3)* @_ZZ13test_shared64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP2:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ13test_shared64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ13test_shared64vE3val to i64*), i64 [[TMP2]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP3]], i64* addrspacecast (i64 addrspace(3)* @_ZZ13test_shared64vE3val to i64*), align 8
+// CHECK-NEXT:    [[TMP0:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared64vE3val to ptr), i64 [[TMP0]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP1]], ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP2:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared64vE3val to ptr), i64 [[TMP2]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP3]], ptr addrspacecast (ptr addrspace(3) @_ZZ13test_shared64vE3val to ptr), align 8
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_shared64() {
@@ -146,12 +146,12 @@ __attribute__((device)) void test_shared64() {
 __attribute__((device)) __UINT32_TYPE__ global_val32;
 // CHECK-LABEL: @_Z13test_global32v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(1)* @global_val32 to i32*), align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0i32(i32* addrspacecast (i32 addrspace(1)* @global_val32 to i32*), i32 [[TMP0]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP1]], i32* addrspacecast (i32 addrspace(1)* @global_val32 to i32*), align 4
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(1)* @global_val32 to i32*), align 4
-// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* addrspacecast (i32 addrspace(1)* @global_val32 to i32*), i32 [[TMP2]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP3]], i32* addrspacecast (i32 addrspace(1)* @global_val32 to i32*), align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr addrspacecast (ptr addrspace(1) @global_val32 to ptr), align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0(ptr addrspacecast (ptr addrspace(1) @global_val32 to ptr), i32 [[TMP0]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP1]], ptr addrspacecast (ptr addrspace(1) @global_val32 to ptr), align 4
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr addrspacecast (ptr addrspace(1) @global_val32 to ptr), align 4
+// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr addrspacecast (ptr addrspace(1) @global_val32 to ptr), i32 [[TMP2]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP3]], ptr addrspacecast (ptr addrspace(1) @global_val32 to ptr), align 4
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_global32() {
@@ -163,12 +163,12 @@ __attribute__((device)) void test_global32() {
 __attribute__((device)) __UINT64_TYPE__ global_val64;
 // CHECK-LABEL: @_Z13test_global64v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i64, i64* addrspacecast (i64 addrspace(1)* @global_val64 to i64*), align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0i64(i64* addrspacecast (i64 addrspace(1)* @global_val64 to i64*), i64 [[TMP0]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP1]], i64* addrspacecast (i64 addrspace(1)* @global_val64 to i64*), align 8
-// CHECK-NEXT:    [[TMP2:%.*]] = load i64, i64* addrspacecast (i64 addrspace(1)* @global_val64 to i64*), align 8
-// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* addrspacecast (i64 addrspace(1)* @global_val64 to i64*), i64 [[TMP2]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP3]], i64* addrspacecast (i64 addrspace(1)* @global_val64 to i64*), align 8
+// CHECK-NEXT:    [[TMP0:%.*]] = load i64, ptr addrspacecast (ptr addrspace(1) @global_val64 to ptr), align 8
+// CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0(ptr addrspacecast (ptr addrspace(1) @global_val64 to ptr), i64 [[TMP0]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP1]], ptr addrspacecast (ptr addrspace(1) @global_val64 to ptr), align 8
+// CHECK-NEXT:    [[TMP2:%.*]] = load i64, ptr addrspacecast (ptr addrspace(1) @global_val64 to ptr), align 8
+// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr addrspacecast (ptr addrspace(1) @global_val64 to ptr), i64 [[TMP2]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP3]], ptr addrspacecast (ptr addrspace(1) @global_val64 to ptr), align 8
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_global64() {
@@ -181,13 +181,13 @@ __attribute__((constant)) __UINT32_TYPE__ cval32;
 // CHECK-LABEL: @_Z15test_constant32v(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[LOCAL_VAL:%.*]] = alloca i32, align 4, addrspace(5)
-// CHECK-NEXT:    [[LOCAL_VAL_ASCAST:%.*]] = addrspacecast i32 addrspace(5)* [[LOCAL_VAL]] to i32*
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(4)* @cval32 to i32*), align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0i32(i32* addrspacecast (i32 addrspace(4)* @cval32 to i32*), i32 [[TMP0]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP1]], i32* [[LOCAL_VAL_ASCAST]], align 4
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(4)* @cval32 to i32*), align 4
-// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* addrspacecast (i32 addrspace(4)* @cval32 to i32*), i32 [[TMP2]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP3]], i32* [[LOCAL_VAL_ASCAST]], align 4
+// CHECK-NEXT:    [[LOCAL_VAL_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[LOCAL_VAL]] to ptr
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr addrspacecast (ptr addrspace(4) @cval32 to ptr), align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0(ptr addrspacecast (ptr addrspace(4) @cval32 to ptr), i32 [[TMP0]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP1]], ptr [[LOCAL_VAL_ASCAST]], align 4
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr addrspacecast (ptr addrspace(4) @cval32 to ptr), align 4
+// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr addrspacecast (ptr addrspace(4) @cval32 to ptr), i32 [[TMP2]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP3]], ptr [[LOCAL_VAL_ASCAST]], align 4
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_constant32() {
@@ -202,13 +202,13 @@ __attribute__((constant)) __UINT64_TYPE__ cval64;
 // CHECK-LABEL: @_Z15test_constant64v(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[LOCAL_VAL:%.*]] = alloca i64, align 8, addrspace(5)
-// CHECK-NEXT:    [[LOCAL_VAL_ASCAST:%.*]] = addrspacecast i64 addrspace(5)* [[LOCAL_VAL]] to i64*
-// CHECK-NEXT:    [[TMP0:%.*]] = load i64, i64* addrspacecast (i64 addrspace(4)* @cval64 to i64*), align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0i64(i64* addrspacecast (i64 addrspace(4)* @cval64 to i64*), i64 [[TMP0]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP1]], i64* [[LOCAL_VAL_ASCAST]], align 8
-// CHECK-NEXT:    [[TMP2:%.*]] = load i64, i64* addrspacecast (i64 addrspace(4)* @cval64 to i64*), align 8
-// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* addrspacecast (i64 addrspace(4)* @cval64 to i64*), i64 [[TMP2]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP3]], i64* [[LOCAL_VAL_ASCAST]], align 8
+// CHECK-NEXT:    [[LOCAL_VAL_ASCAST:%.*]] = addrspacecast ptr addrspace(5) [[LOCAL_VAL]] to ptr
+// CHECK-NEXT:    [[TMP0:%.*]] = load i64, ptr addrspacecast (ptr addrspace(4) @cval64 to ptr), align 8
+// CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0(ptr addrspacecast (ptr addrspace(4) @cval64 to ptr), i64 [[TMP0]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP1]], ptr [[LOCAL_VAL_ASCAST]], align 8
+// CHECK-NEXT:    [[TMP2:%.*]] = load i64, ptr addrspacecast (ptr addrspace(4) @cval64 to ptr), align 8
+// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr addrspacecast (ptr addrspace(4) @cval64 to ptr), i64 [[TMP2]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP3]], ptr [[LOCAL_VAL_ASCAST]], align 8
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_constant64() {
@@ -221,24 +221,24 @@ __attribute__((device)) void test_constant64() {
 
 // CHECK-LABEL: @_Z12test_order32v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), i32 [[TMP0]], i32 2, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP1]], i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), i32 [[TMP2]], i32 4, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP3]], i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP4:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP5:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), i32 [[TMP4]], i32 4, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP5]], i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP6:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP7:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), i32 [[TMP6]], i32 5, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP7]], i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP8:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP9:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), i32 [[TMP8]], i32 6, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP9]], i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP10:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP11:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), i32 [[TMP10]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP11]], i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_order32vE3val to i32*), align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), i32 [[TMP0]], i32 2, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP1]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), i32 [[TMP2]], i32 4, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP3]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP5:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), i32 [[TMP4]], i32 4, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP5]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP6:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP7:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), i32 [[TMP6]], i32 5, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP7]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP8:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP9:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), i32 [[TMP8]], i32 6, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP9]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP10:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP11:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), i32 [[TMP10]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP11]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order32vE3val to ptr), align 4
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_order32() {
@@ -259,24 +259,24 @@ __attribute__((device)) void test_order32() {
 
 // CHECK-LABEL: @_Z12test_order64v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), i64 [[TMP0]], i32 2, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP1]], i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP2:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), i64 [[TMP2]], i32 4, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP3]], i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP4:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP5:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), i64 [[TMP4]], i32 4, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP5]], i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP6:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP7:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), i64 [[TMP6]], i32 5, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP7]], i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP8:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP9:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), i64 [[TMP8]], i32 6, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP9]], i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP10:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP11:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), i64 [[TMP10]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP11]], i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_order64vE3val to i64*), align 8
+// CHECK-NEXT:    [[TMP0:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), i64 [[TMP0]], i32 2, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP1]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP2:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), i64 [[TMP2]], i32 4, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP3]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP4:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP5:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), i64 [[TMP4]], i32 4, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP5]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP6:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP7:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), i64 [[TMP6]], i32 5, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP7]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP8:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP9:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), i64 [[TMP8]], i32 6, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP9]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP10:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP11:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), i64 [[TMP10]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP11]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_order64vE3val to ptr), align 8
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_order64() {
@@ -297,18 +297,18 @@ __attribute__((device)) void test_order64() {
 
 // CHECK-LABEL: @_Z12test_scope32v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), i32 [[TMP0]], i32 7, i32 1, i1 false)
-// CHECK-NEXT:    store i32 [[TMP1]], i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), i32 [[TMP2]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i32 [[TMP3]], i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP4:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP5:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), i32 [[TMP4]], i32 7, i32 3, i1 false)
-// CHECK-NEXT:    store i32 [[TMP5]], i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP6:%.*]] = load i32, i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), align 4
-// CHECK-NEXT:    [[TMP7:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0i32(i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), i32 [[TMP6]], i32 7, i32 4, i1 false)
-// CHECK-NEXT:    store i32 [[TMP7]], i32* addrspacecast (i32 addrspace(3)* @_ZZ12test_scope32vE3val to i32*), align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = call i32 @llvm.amdgcn.atomic.inc.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), i32 [[TMP0]], i32 7, i32 1, i1 false)
+// CHECK-NEXT:    store i32 [[TMP1]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP3:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), i32 [[TMP2]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i32 [[TMP3]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP5:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), i32 [[TMP4]], i32 7, i32 3, i1 false)
+// CHECK-NEXT:    store i32 [[TMP5]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP6:%.*]] = load i32, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), align 4
+// CHECK-NEXT:    [[TMP7:%.*]] = call i32 @llvm.amdgcn.atomic.dec.i32.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), i32 [[TMP6]], i32 7, i32 4, i1 false)
+// CHECK-NEXT:    store i32 [[TMP7]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope32vE3val to ptr), align 4
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_scope32() {
@@ -325,18 +325,18 @@ __attribute__((device)) void test_scope32() {
 
 // CHECK-LABEL: @_Z12test_scope64v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), i64 [[TMP0]], i32 7, i32 1, i1 false)
-// CHECK-NEXT:    store i64 [[TMP1]], i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP2:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), i64 [[TMP2]], i32 7, i32 2, i1 false)
-// CHECK-NEXT:    store i64 [[TMP3]], i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP4:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP5:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), i64 [[TMP4]], i32 7, i32 3, i1 false)
-// CHECK-NEXT:    store i64 [[TMP5]], i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP6:%.*]] = load i64, i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), align 8
-// CHECK-NEXT:    [[TMP7:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0i64(i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), i64 [[TMP6]], i32 7, i32 4, i1 false)
-// CHECK-NEXT:    store i64 [[TMP7]], i64* addrspacecast (i64 addrspace(3)* @_ZZ12test_scope64vE3val to i64*), align 8
+// CHECK-NEXT:    [[TMP0:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP1:%.*]] = call i64 @llvm.amdgcn.atomic.inc.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), i64 [[TMP0]], i32 7, i32 1, i1 false)
+// CHECK-NEXT:    store i64 [[TMP1]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP2:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP3:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), i64 [[TMP2]], i32 7, i32 2, i1 false)
+// CHECK-NEXT:    store i64 [[TMP3]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP4:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP5:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), i64 [[TMP4]], i32 7, i32 3, i1 false)
+// CHECK-NEXT:    store i64 [[TMP5]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP6:%.*]] = load i64, ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), align 8
+// CHECK-NEXT:    [[TMP7:%.*]] = call i64 @llvm.amdgcn.atomic.dec.i64.p0(ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), i64 [[TMP6]], i32 7, i32 4, i1 false)
+// CHECK-NEXT:    store i64 [[TMP7]], ptr addrspacecast (ptr addrspace(3) @_ZZ12test_scope64vE3val to ptr), align 8
 // CHECK-NEXT:    ret void
 //
 __attribute__((device)) void test_scope64() {

diff  --git a/clang/test/CodeGenCXX/builtin-bit-cast-no-tbaa.cpp b/clang/test/CodeGenCXX/builtin-bit-cast-no-tbaa.cpp
index 47c729da64a8f..41b36d29a28db 100644
--- a/clang/test/CodeGenCXX/builtin-bit-cast-no-tbaa.cpp
+++ b/clang/test/CodeGenCXX/builtin-bit-cast-no-tbaa.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -no-opaque-pointers -O3 -std=c++2a -S -emit-llvm -o - -disable-llvm-passes -triple x86_64-apple-macos10.14 %s | FileCheck %s
+// RUN: %clang_cc1 -O3 -std=c++2a -S -emit-llvm -o - -disable-llvm-passes -triple x86_64-apple-macos10.14 %s | FileCheck %s
 
 void test_scalar() {
   // CHECK-LABEL: define{{.*}} void @_Z11test_scalarv
   __builtin_bit_cast(float, 42);
 
-  // CHECK: load float, float* {{.*}}, align 4, !tbaa ![[MAY_ALIAS_TBAA:.*]]
+  // CHECK: load float, ptr {{.*}}, align 4, !tbaa ![[MAY_ALIAS_TBAA:.*]]
 }
 
 void test_scalar2() {
@@ -12,11 +12,11 @@ void test_scalar2() {
   struct S {int m;};
   __builtin_bit_cast(int, S{42});
 
-  // CHECK: load i32, i32* {{.*}}, align 4, !tbaa ![[MAY_ALIAS_TBAA]]
+  // CHECK: load i32, ptr {{.*}}, align 4, !tbaa ![[MAY_ALIAS_TBAA]]
 }
 
 int test_same_type(int &r) {
-  // CHECK: load i32, i32* {{.*}}, align 4, !tbaa ![[MAY_ALIAS_TBAA]]
+  // CHECK: load i32, ptr {{.*}}, align 4, !tbaa ![[MAY_ALIAS_TBAA]]
   return __builtin_bit_cast(int, r);
 }
 

diff  --git a/clang/test/CodeGenCXX/builtin-calling-conv.cpp b/clang/test/CodeGenCXX/builtin-calling-conv.cpp
index 7c0d95e43ef13..7020d1e0a2414 100644
--- a/clang/test/CodeGenCXX/builtin-calling-conv.cpp
+++ b/clang/test/CodeGenCXX/builtin-calling-conv.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-pc -DREDECL -emit-llvm %s -o - | FileCheck %s -check-prefix LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -triple spir-unknown-unknown -DREDECL -DSPIR -emit-llvm %s -o - | FileCheck %s -check-prefix SPIR
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-pc -emit-llvm %s -o - | FileCheck %s -check-prefix LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -triple spir-unknown-unknown -DSPIR -emit-llvm %s -o - | FileCheck %s -check-prefix SPIR
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-windows-pc -fdefault-calling-conv=stdcall -emit-llvm %s -o - | FileCheck %s -check-prefix WIN32
+// RUN: %clang_cc1 -triple x86_64-linux-pc -DREDECL -emit-llvm %s -o - | FileCheck %s -check-prefix LINUX
+// RUN: %clang_cc1 -triple spir-unknown-unknown -DREDECL -DSPIR -emit-llvm %s -o - | FileCheck %s -check-prefix SPIR
+// RUN: %clang_cc1 -triple x86_64-linux-pc -emit-llvm %s -o - | FileCheck %s -check-prefix LINUX
+// RUN: %clang_cc1 -triple spir-unknown-unknown -DSPIR -emit-llvm %s -o - | FileCheck %s -check-prefix SPIR
+// RUN: %clang_cc1 -triple i386-windows-pc -fdefault-calling-conv=stdcall -emit-llvm %s -o - | FileCheck %s -check-prefix WIN32
 
 #ifdef REDECL
 namespace std {
@@ -27,27 +27,27 @@ void user() {
 }
 
 // LINUX: define{{.*}} void @_Z4userv()
-// LINUX: call noalias noundef nonnull i8* @_Znwm
+// LINUX: call noalias noundef nonnull ptr @_Znwm
 // LINUX: call float @atan2f
 // LINUX: call void @_Z3foov
-// LINUX: declare noundef nonnull i8* @_Znwm(i64 noundef)
+// LINUX: declare noundef nonnull ptr @_Znwm(i64 noundef)
 // LINUX: declare float @atan2f(float noundef, float noundef)
 // LINUX: declare void @_Z3foov()
 
 // SPIR: define{{.*}} spir_func void @_Z4userv()
-// SPIR: call spir_func noalias noundef nonnull i8* @_Znwj
+// SPIR: call spir_func noalias noundef nonnull ptr @_Znwj
 // SPIR: call spir_func float @atan2f
 // SPIR: call spir_func void @_Z3foov
-// SPIR: declare spir_func noundef nonnull i8* @_Znwj(i32 noundef)
+// SPIR: declare spir_func noundef nonnull ptr @_Znwj(i32 noundef)
 // SPIR: declare spir_func float @atan2f(float noundef, float noundef)
 // SPIR: declare spir_func void @_Z3foov()
 
 // Note: Windows /G options should not change the platform default calling
 // convention of builtins.
 // WIN32: define dso_local x86_stdcallcc void @"?user@@YGXXZ"()
-// WIN32: call noalias noundef nonnull i8* @"??2 at YAPAXI@Z"
+// WIN32: call noalias noundef nonnull ptr @"??2 at YAPAXI@Z"
 // WIN32: call float @atan2f
 // WIN32: call x86_stdcallcc void @"?foo@@YGXXZ"
-// WIN32: declare dso_local noundef nonnull i8* @"??2 at YAPAXI@Z"(
+// WIN32: declare dso_local noundef nonnull ptr @"??2 at YAPAXI@Z"(
 // WIN32: declare dso_local float @atan2f(float noundef, float noundef)
 // WIN32: declare dso_local x86_stdcallcc void @"?foo@@YGXXZ"()

diff  --git a/clang/test/CodeGenCXX/builtin-operator-new-delete.cpp b/clang/test/CodeGenCXX/builtin-operator-new-delete.cpp
index d8e5a14f889bb..2138e1f724972 100644
--- a/clang/test/CodeGenCXX/builtin-operator-new-delete.cpp
+++ b/clang/test/CodeGenCXX/builtin-operator-new-delete.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown %s  \
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown %s  \
 // RUN:     -faligned-allocation -fsized-deallocation -emit-llvm -o - \
 // RUN:    | FileCheck %s
 
@@ -37,30 +37,30 @@ void *operator new[](size_t, void*, bool) throw();
 
 // CHECK-LABEL: define{{.*}} void @test_basic(
 extern "C" void test_basic() {
-  // CHECK: call noalias noundef nonnull i8* @_Znwm(i64 noundef 4) [[ATTR_BUILTIN_NEW:#[^ ]*]]
+  // CHECK: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) [[ATTR_BUILTIN_NEW:#[^ ]*]]
   // CHECK: call void @_ZdlPv({{.*}}) [[ATTR_BUILTIN_DELETE:#[^ ]*]]
   // CHECK: ret void
   __builtin_operator_delete(__builtin_operator_new(4));
 }
-// CHECK: declare noundef nonnull i8* @_Znwm(i64 noundef) [[ATTR_NOBUILTIN:#[^ ]*]]
-// CHECK: declare void @_ZdlPv(i8* noundef) [[ATTR_NOBUILTIN_NOUNWIND:#[^ ]*]]
+// CHECK: declare noundef nonnull ptr @_Znwm(i64 noundef) [[ATTR_NOBUILTIN:#[^ ]*]]
+// CHECK: declare void @_ZdlPv(ptr noundef) [[ATTR_NOBUILTIN_NOUNWIND:#[^ ]*]]
 
 // CHECK-LABEL: define{{.*}} void @test_aligned_alloc(
 extern "C" void test_aligned_alloc() {
-  // CHECK: call noalias noundef nonnull align 4 i8* @_ZnwmSt11align_val_t(i64 noundef 4, i64 noundef 4) [[ATTR_BUILTIN_NEW:#[^ ]*]]
+  // CHECK: call noalias noundef nonnull align 4 ptr @_ZnwmSt11align_val_t(i64 noundef 4, i64 noundef 4) [[ATTR_BUILTIN_NEW:#[^ ]*]]
   // CHECK: call void @_ZdlPvSt11align_val_t({{.*}}, i64 noundef 4) [[ATTR_BUILTIN_DELETE:#[^ ]*]]
   __builtin_operator_delete(__builtin_operator_new(4, std::align_val_t(4)), std::align_val_t(4));
 }
-// CHECK: declare noundef nonnull i8* @_ZnwmSt11align_val_t(i64 noundef, i64 noundef) [[ATTR_NOBUILTIN:#[^ ]*]]
-// CHECK: declare void @_ZdlPvSt11align_val_t(i8* noundef, i64 noundef) [[ATTR_NOBUILTIN_NOUNWIND:#[^ ]*]]
+// CHECK: declare noundef nonnull ptr @_ZnwmSt11align_val_t(i64 noundef, i64 noundef) [[ATTR_NOBUILTIN:#[^ ]*]]
+// CHECK: declare void @_ZdlPvSt11align_val_t(ptr noundef, i64 noundef) [[ATTR_NOBUILTIN_NOUNWIND:#[^ ]*]]
 
 // CHECK-LABEL: define{{.*}} void @test_sized_delete(
 extern "C" void test_sized_delete() {
-  // CHECK: call noalias noundef nonnull i8* @_Znwm(i64 noundef 4) [[ATTR_BUILTIN_NEW:#[^ ]*]]
+  // CHECK: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) [[ATTR_BUILTIN_NEW:#[^ ]*]]
   // CHECK: call void @_ZdlPvm({{.*}}, i64 noundef 4) [[ATTR_BUILTIN_DELETE:#[^ ]*]]
   __builtin_operator_delete(__builtin_operator_new(4), 4);
 }
-// CHECK: declare void @_ZdlPvm(i8* noundef, i64 noundef) [[ATTR_NOBUILTIN_UNWIND:#[^ ]*]]
+// CHECK: declare void @_ZdlPvm(ptr noundef, i64 noundef) [[ATTR_NOBUILTIN_UNWIND:#[^ ]*]]
 
 
 // CHECK-DAG: attributes [[ATTR_NOBUILTIN]] = {{[{].*}} nobuiltin {{.*[}]}}

diff  --git a/clang/test/CodeGenCXX/builtin_FUNCTION.cpp b/clang/test/CodeGenCXX/builtin_FUNCTION.cpp
index e7d71028bc769..44821b92d33fe 100644
--- a/clang/test/CodeGenCXX/builtin_FUNCTION.cpp
+++ b/clang/test/CodeGenCXX/builtin_FUNCTION.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++2a -fblocks %s -triple %itanium_abi_triple -emit-llvm -o %t.ll
+// RUN: %clang_cc1 -std=c++2a -fblocks %s -triple %itanium_abi_triple -emit-llvm -o %t.ll
 // RUN: FileCheck --input-file %t.ll %s
 
 namespace test_func {
@@ -8,10 +8,10 @@ constexpr const char *test_default_arg(const char *f = __builtin_FUNCTION()) {
 }
 // CHECK: @[[EMPTY_STR:.+]] = private unnamed_addr constant [1 x i8] zeroinitializer
 
-// CHECK: @_ZN9test_func6globalE = {{(dso_local )?}}global i8* getelementptr inbounds ([1 x i8], [1 x i8]* @[[EMPTY_STR]], i32 0, i32 0)
+// CHECK: @_ZN9test_func6globalE = {{(dso_local )?}}global ptr @[[EMPTY_STR]]
 const char *global = test_default_arg();
 
-// CHECK: @_ZN9test_func10global_twoE = {{(dso_local )?}}global i8* getelementptr inbounds ([1 x i8], [1 x i8]* @[[EMPTY_STR]], i32 0, i32 0)
+// CHECK: @_ZN9test_func10global_twoE = {{(dso_local )?}}global ptr @[[EMPTY_STR]]
 const char *global_two = __builtin_FUNCTION();
 
 const char * const global_three = test_default_arg();
@@ -20,20 +20,20 @@ const char * const global_three = test_default_arg();
 // CHECK: @[[STR_TWO:.+]] = private unnamed_addr constant [14 x i8] c"test_func_two\00"
 // CHECK: @[[STR_THREE:.+]] = private unnamed_addr constant [20 x i8] c"do_default_arg_test\00"
 
-// CHECK: define {{(dso_local )?}}noundef i8* @_ZN9test_func13test_func_oneEv()
-// CHECK: ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @[[STR_ONE]], i32 0, i32 0)
+// CHECK: define {{(dso_local )?}}noundef ptr @_ZN9test_func13test_func_oneEv()
+// CHECK: ret ptr @[[STR_ONE]]
 const char *test_func_one() {
   return __builtin_FUNCTION();
 }
 
-// CHECK: define {{(dso_local )?}}noundef i8* @_ZN9test_func13test_func_twoEv()
-// CHECK: ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @[[STR_TWO]], i32 0, i32 0)
+// CHECK: define {{(dso_local )?}}noundef ptr @_ZN9test_func13test_func_twoEv()
+// CHECK: ret ptr @[[STR_TWO]]
 const char *test_func_two() {
   return __builtin_FUNCTION();
 }
 
 // CHECK: define {{(dso_local )?}}void @_ZN9test_func19do_default_arg_testEv()
-// CHECK: %call = call noundef i8* @_ZN9test_func16test_default_argEPKc(i8* noundef getelementptr inbounds ([20 x i8], [20 x i8]* @[[STR_THREE]], i32 0, i32 0))
+// CHECK: %call = call noundef ptr @_ZN9test_func16test_default_argEPKc(ptr noundef @[[STR_THREE]])
 void do_default_arg_test() {
   test_default_arg();
 }

diff  --git a/clang/test/CodeGenCXX/builtin_LINE.cpp b/clang/test/CodeGenCXX/builtin_LINE.cpp
index 7cca60f02f54d..b32c142b34ac8 100644
--- a/clang/test/CodeGenCXX/builtin_LINE.cpp
+++ b/clang/test/CodeGenCXX/builtin_LINE.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1z -fblocks %s -triple x86_64-unknown-unknown -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++1z -fblocks %s -triple x86_64-unknown-unknown -emit-llvm -o - | FileCheck %s
 
 extern "C" int sink;
 extern "C" const volatile void* volatile ptr_sink = nullptr;
@@ -33,7 +33,7 @@ const int global_three(get_line_constexpr());
 
 // CHECK-LABEL: define internal void @__cxx_global_var_init
 // CHECK: %call = call noundef i32 @_Z21get_line_nonconstexpri(i32 noundef [[@LINE+2]])
-// CHECK-NEXT: store i32 %call, i32* @global_four, align 4
+// CHECK-NEXT: store i32 %call, ptr @global_four, align 4
 int global_four = get_line_nonconstexpr();
 
 struct InClassInit {
@@ -49,43 +49,43 @@ struct InClassInit {
 };
 // CHECK-LABEL: define{{.*}} void @_ZN11InClassInit10test_classEv()
 void InClassInit::test_class() {
-  // CHECK: call void @_ZN11InClassInitC1Ev(%struct.InClassInit* {{[^,]*}} %test_one)
+  // CHECK: call void @_ZN11InClassInitC1Ev(ptr {{[^,]*}} %test_one)
   InClassInit test_one;
-  // CHECK-NEXT: call void @_ZN11InClassInitC1E4Tag1i(%struct.InClassInit* {{[^,]*}} %test_two, i32 noundef [[@LINE+1]])
+  // CHECK-NEXT: call void @_ZN11InClassInitC1E4Tag1i(ptr {{[^,]*}} %test_two, i32 noundef [[@LINE+1]])
   InClassInit test_two{Tag1{}};
-  // CHECK-NEXT: call void @_ZN11InClassInitC1E4Tag2(%struct.InClassInit* {{[^,]*}} %test_three)
+  // CHECK-NEXT: call void @_ZN11InClassInitC1E4Tag2(ptr {{[^,]*}} %test_three)
   InClassInit test_three{Tag2{}};
-  // CHECK-NEXT: call void @_ZN11InClassInitC1E4Tag3i(%struct.InClassInit* {{[^,]*}} %test_four, i32 noundef [[@LINE+1]])
+  // CHECK-NEXT: call void @_ZN11InClassInitC1E4Tag3i(ptr {{[^,]*}} %test_four, i32 noundef [[@LINE+1]])
   InClassInit test_four(Tag3{});
   // CHECK-NEXT: %[[CALL:.+]] = call noundef i32 @_Z8get_linei(i32 noundef [[@LINE+3]])
   // CHECK-NEXT: %[[CALL2:.+]] = call noundef i32 @_Z9get_line2i(i32 noundef %[[CALL]])
-  // CHECK-NEXT: call void @_ZN11InClassInitC1E4Tag4i(%struct.InClassInit* {{[^,]*}} %test_five, i32 noundef %[[CALL2]])
+  // CHECK-NEXT: call void @_ZN11InClassInitC1E4Tag4i(ptr {{[^,]*}} %test_five, i32 noundef %[[CALL2]])
   InClassInit test_five(Tag4{});
 
 }
 // CHECK-LABEL: define{{.*}} void @_ZN11InClassInitC2Ev
-// CHECK: store i32 [[@LINE+4]], i32* %Init, align 4
+// CHECK: store i32 [[@LINE+4]], ptr %Init, align 4
 // CHECK: %call = call noundef i32 @_Z8get_linei(i32 noundef [[@LINE+3]])
 // CHECK-NEXT: %call2 = call noundef i32 @_Z9get_line2i(i32 noundef %call)
-// CHECK-NEXT: store i32 %call2, i32* %Init2, align 4
+// CHECK-NEXT: store i32 %call2, ptr %Init2, align 4
 InClassInit::InClassInit() = default;
 
 InClassInit::InClassInit(Tag3, int l) : Init(l) {}
 
-// CHECK-LABEL: define{{.*}} void @_ZN11InClassInitC2E4Tag4i(%struct.InClassInit* {{[^,]*}} %this, i32 noundef %arg)
-// CHECK:  %[[TEMP:.+]] = load i32, i32* %arg.addr, align 4
-// CHECK-NEXT: store i32 %[[TEMP]], i32* %Init, align 4
+// CHECK-LABEL: define{{.*}} void @_ZN11InClassInitC2E4Tag4i(ptr {{[^,]*}} %this, i32 noundef %arg)
+// CHECK:  %[[TEMP:.+]] = load i32, ptr %arg.addr, align 4
+// CHECK-NEXT: store i32 %[[TEMP]], ptr %Init, align 4
 // CHECK: %[[CALL:.+]] = call noundef i32 @_Z8get_linei(i32 noundef [[@LINE+3]])
 // CHECK-NEXT: %[[CALL2:.+]] = call noundef i32 @_Z9get_line2i(i32 noundef %[[CALL]])
-// CHECK-NEXT: store i32 %[[CALL2]], i32* %Init2, align 4
+// CHECK-NEXT: store i32 %[[CALL2]], ptr %Init2, align 4
 InClassInit::InClassInit(Tag4, int arg) : Init(arg) {}
 
 // CHECK-LABEL: define{{.*}} void @_Z13get_line_testv()
 void get_line_test() {
   // CHECK: %[[CALL:.+]] = call noundef i32 @_Z8get_linei(i32 noundef [[@LINE+2]])
-  // CHECK-NEXT: store i32 %[[CALL]], i32* @sink, align 4
+  // CHECK-NEXT: store i32 %[[CALL]], ptr @sink, align 4
   sink = get_line();
-  // CHECK-NEXT:  store i32 [[@LINE+1]], i32* @sink, align 4
+  // CHECK-NEXT:  store i32 [[@LINE+1]], ptr @sink, align 4
   sink = __builtin_LINE();
   ptr_sink = &global_three;
 }

diff  --git a/clang/test/CodeGenCXX/builtins-arm-exclusive.cpp b/clang/test/CodeGenCXX/builtins-arm-exclusive.cpp
index 63a7cb5288ca4..d30631f6ad3bd 100644
--- a/clang/test/CodeGenCXX/builtins-arm-exclusive.cpp
+++ b/clang/test/CodeGenCXX/builtins-arm-exclusive.cpp
@@ -1,23 +1,23 @@
-// RUN: %clang_cc1 -no-opaque-pointers -Wall -Werror -triple thumbv8-linux-gnueabi -fno-signed-char -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -Wall -Werror -triple arm64-apple-ios7.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-ARM64
+// RUN: %clang_cc1 -Wall -Werror -triple thumbv8-linux-gnueabi -fno-signed-char -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -Wall -Werror -triple arm64-apple-ios7.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-ARM64
 
 bool b;
 
 // CHECK-LABEL: @_Z10test_ldrexv()
-// CHECK: call i32 @llvm.arm.ldrex.p0i8(i8* elementtype(i8) @b)
+// CHECK: call i32 @llvm.arm.ldrex.p0(ptr elementtype(i8) @b)
 
 // CHECK-ARM64-LABEL: @_Z10test_ldrexv()
-// CHECK-ARM64: call i64 @llvm.aarch64.ldxr.p0i8(i8* elementtype(i8) @b)
+// CHECK-ARM64: call i64 @llvm.aarch64.ldxr.p0(ptr elementtype(i8) @b)
 
 void test_ldrex() {
   b = __builtin_arm_ldrex(&b);
 }
 
 // CHECK-LABEL: @_Z10tset_strexv()
-// CHECK: %{{.*}} = call i32 @llvm.arm.strex.p0i8(i32 1, i8* elementtype(i8) @b)
+// CHECK: %{{.*}} = call i32 @llvm.arm.strex.p0(i32 1, ptr elementtype(i8) @b)
 
 // CHECK-ARM64-LABEL: @_Z10tset_strexv()
-// CHECK-ARM64: %{{.*}} = call i32 @llvm.aarch64.stxr.p0i8(i64 1, i8* elementtype(i8) @b)
+// CHECK-ARM64: %{{.*}} = call i32 @llvm.aarch64.stxr.p0(i64 1, ptr elementtype(i8) @b)
 
 void tset_strex() {
   __builtin_arm_strex(true, &b);

diff  --git a/clang/test/CodeGenCXX/builtins.cpp b/clang/test/CodeGenCXX/builtins.cpp
index 56a29eac2490c..39201595d55e6 100644
--- a/clang/test/CodeGenCXX/builtins.cpp
+++ b/clang/test/CodeGenCXX/builtins.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple=x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
 // Builtins inside a namespace inside an extern "C" must be considered builtins.
 extern "C" {
@@ -26,7 +26,7 @@ struct S;
 // CHECK: define {{.*}} @_Z9addressofbR1SS0_(
 S *addressof(bool b, S &s, S &t) {
   // CHECK: %[[LVALUE:.*]] = phi
-  // CHECK: ret {{.*}}* %[[LVALUE]]
+  // CHECK: ret ptr %[[LVALUE]]
   return __builtin_addressof(b ? s : t);
 }
 
@@ -35,7 +35,7 @@ namespace std { template<typename T> T *addressof(T &); }
 // CHECK: define {{.*}} @_Z13std_addressofbR1SS0_(
 S *std_addressof(bool b, S &s, S &t) {
   // CHECK: %[[LVALUE:.*]] = phi
-  // CHECK: ret {{.*}}* %[[LVALUE]]
+  // CHECK: ret ptr %[[LVALUE]]
   return std::addressof(b ? s : t);
 }
 
@@ -44,7 +44,7 @@ namespace std { template<typename T> T *__addressof(T &); }
 // CHECK: define {{.*}} @_Z15std___addressofbR1SS0_(
 S *std___addressof(bool b, S &s, S &t) {
   // CHECK: %[[LVALUE:.*]] = phi
-  // CHECK: ret {{.*}}* %[[LVALUE]]
+  // CHECK: ret ptr %[[LVALUE]]
   return std::__addressof(b ? s : t);
 }
 
@@ -53,15 +53,15 @@ long __builtin_abs(long);          // #2
 extern "C" int __builtin_abs(int); // #3
 
 int x = __builtin_abs(-2);
-// CHECK:  store i32 2, i32* @x, align 4
+// CHECK:  store i32 2, ptr @x, align 4
 
 long y = __builtin_abs(-2l);
 // CHECK:  [[Y:%.+]] = call noundef i64 @_Z13__builtin_absl(i64 noundef -2)
-// CHECK:  store i64 [[Y]], i64* @y, align 8
+// CHECK:  store i64 [[Y]], ptr @y, align 8
 
 extern const char char_memchr_arg[32];
 char *memchr_result = __builtin_char_memchr(char_memchr_arg, 123, 32);
-// CHECK: call i8* @memchr(i8* noundef getelementptr inbounds ([32 x i8], [32 x i8]* @char_memchr_arg, i64 0, i64 0), i32 noundef 123, i64 noundef 32)
+// CHECK: call ptr @memchr(ptr noundef @char_memchr_arg, i32 noundef 123, i64 noundef 32)
 
 int constexpr_overflow_result() {
   constexpr int x = 1;
@@ -74,7 +74,7 @@ int constexpr_overflow_result() {
   __builtin_sadd_overflow(x, y, &z);
   return z;
   // CHECK: [[RET_PTR:%.+]] = extractvalue { i32, i1 } %0, 0
-  // CHECK: store i32 [[RET_PTR]], i32* [[Z]]
-  // CHECK: [[RET_VAL:%.+]] = load i32, i32* [[Z]]
+  // CHECK: store i32 [[RET_PTR]], ptr [[Z]]
+  // CHECK: [[RET_VAL:%.+]] = load i32, ptr [[Z]]
   // CHECK: ret i32 [[RET_VAL]]
 }

diff  --git a/clang/test/CodeGenCXX/c99-variable-length-array.cpp b/clang/test/CodeGenCXX/c99-variable-length-array.cpp
index a0058496ee6ec..ad54ab05e90c4 100644
--- a/clang/test/CodeGenCXX/c99-variable-length-array.cpp
+++ b/clang/test/CodeGenCXX/c99-variable-length-array.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
 struct X {
   X();
   ~X();
@@ -13,7 +13,7 @@ struct Y {
 void f(int argc, const char* argv[]) {
   // CHECK: call void @_ZN1XC1Ev
   X x;
-  // CHECK: call i8* @llvm.stacksave(
+  // CHECK: call ptr @llvm.stacksave(
   const char *argv2[argc];
   // CHECK: call void @_ZN1YC1Ev
   Y y;

diff  --git a/clang/test/CodeGenCXX/call-with-static-chain.cpp b/clang/test/CodeGenCXX/call-with-static-chain.cpp
index a115911fe2a33..06c3f15396a86 100644
--- a/clang/test/CodeGenCXX/call-with-static-chain.cpp
+++ b/clang/test/CodeGenCXX/call-with-static-chain.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=CHECK32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=CHECK64 %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=CHECK32 %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck -check-prefix=CHECK64 %s
 
 struct A {
   long x, y;
@@ -21,19 +21,19 @@ A &f4();
 void test() {
   A a;
 
-  // CHECK32: call i32 bitcast (i32 (i32, i32, i32, i32, i32, i32, i32, i32)* @f1 to i32 (i8*, i32, i32, i32, i32, i32, i32, i32, i32)*)(i8* nest noundef bitcast (i32 (i32, i32, i32, i32, i32, i32, i32, i32)* @f1 to i8*)
-  // CHECK64: call i32 bitcast (i32 (i64, i64, i64, i64, i64, i64, %struct.A*)* @f1 to i32 (i8*, i64, i64, i64, i64, i64, i64, %struct.A*)*)(i8* nest noundef bitcast (i32 (i64, i64, i64, i64, i64, i64, %struct.A*)* @f1 to i8*)
+  // CHECK32: call i32 @f1(ptr nest noundef @f1
+  // CHECK64: call i32 @f1(ptr nest noundef @f1
   __builtin_call_with_static_chain(f1(a, a, a, a), f1);
 
-  // CHECK32: call void bitcast (void (%struct.B*)* @f2 to void (%struct.B*, i8*)*)(%struct.B* sret(%struct.B) align 4 %{{[0-9a-z]+}}, i8* nest noundef bitcast (void (%struct.B*)* @f2 to i8*))
-  // CHECK64: call void bitcast (void (%struct.B*)* @f2 to void (%struct.B*, i8*)*)(%struct.B* sret(%struct.B) align 8 %{{[0-9a-z]+}}, i8* nest noundef bitcast (void (%struct.B*)* @f2 to i8*))
+  // CHECK32: call void @f2(ptr sret(%struct.B) align 4 %{{[0-9a-z]+}}, ptr nest noundef @f2)
+  // CHECK64: call void @f2(ptr sret(%struct.B) align 8 %{{[0-9a-z]+}}, ptr nest noundef @f2)
   __builtin_call_with_static_chain(f2(), f2);
 
-  // CHECK32: call i64 bitcast (i64 ()* @f3 to i64 (i8*)*)(i8* nest noundef bitcast (i64 ()* @f3 to i8*))
-  // CHECK64: call <2 x float> bitcast (<2 x float> ()* @f3 to <2 x float> (i8*)*)(i8* nest noundef bitcast (<2 x float> ()* @f3 to i8*))
+  // CHECK32: call i64 @f3(ptr nest noundef @f3)
+  // CHECK64: call <2 x float> @f3(ptr nest noundef @f3)
   __builtin_call_with_static_chain(f3(), f3);
 
-  // CHECK32: call nonnull align 4 dereferenceable(8) %struct.A* bitcast (%struct.A* ()* @f4 to %struct.A* (i8*)*)(i8* nest noundef bitcast (%struct.A* ()* @f4 to i8*))
-  // CHECK64: call nonnull align 8 dereferenceable(16) %struct.A* bitcast (%struct.A* ()* @f4 to %struct.A* (i8*)*)(i8* nest noundef bitcast (%struct.A* ()* @f4 to i8*))
+  // CHECK32: call nonnull align 4 dereferenceable(8) ptr @f4(ptr nest noundef @f4)
+  // CHECK64: call nonnull align 8 dereferenceable(16) ptr @f4(ptr nest noundef @f4)
   __builtin_call_with_static_chain(f4(), f4);
 }

diff  --git a/clang/test/CodeGenCXX/cast-to-ref-bool.cpp b/clang/test/CodeGenCXX/cast-to-ref-bool.cpp
index 9bc6b546d1c8a..d7681275c407b 100644
--- a/clang/test/CodeGenCXX/cast-to-ref-bool.cpp
+++ b/clang/test/CodeGenCXX/cast-to-ref-bool.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | FileCheck %s
 
 // CHECK-LABEL: main
 int main(int argc, char **argv) {
-  // CHECK: load i8, i8* %
+  // CHECK: load i8, ptr %
   // CHECK-NEXT: trunc i8 %{{.+}} to i1
   bool b = (bool &)argv[argc][1];
   return b;

diff  --git a/clang/test/CodeGenCXX/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.cpp b/clang/test/CodeGenCXX/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.cpp
index fe15947188641..942c36cb27afb 100644
--- a/clang/test/CodeGenCXX/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.cpp
+++ b/clang/test/CodeGenCXX/catch-nullptr-and-nonzero-offset-in-offsetof-idiom.cpp
@@ -1,6 +1,6 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ -fsanitize=pointer-overflow -fno-sanitize-recover=pointer-overflow -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -x c++ -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -x c++ -fsanitize=pointer-overflow -fno-sanitize-recover=pointer-overflow -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck %s
 
 #include <stdint.h>
 
@@ -10,7 +10,7 @@ struct S {
 
 // CHECK-LABEL: @_Z23get_offset_of_y_naivelyv(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    ret i64 ptrtoint (i32* getelementptr inbounds ([[STRUCT_S:%.*]], %struct.S* null, i32 0, i32 1) to i64)
+// CHECK-NEXT:    ret i64 ptrtoint (ptr getelementptr inbounds ([[STRUCT_S:%.*]], ptr null, i32 0, i32 1) to i64)
 //
 uintptr_t get_offset_of_y_naively() {
   return ((uintptr_t)(&(((S *)nullptr)->y)));

diff  --git a/clang/test/CodeGenCXX/cfi-cast.cpp b/clang/test/CodeGenCXX/cfi-cast.cpp
index 137f65a48000e..6801e043b81fb 100644
--- a/clang/test/CodeGenCXX/cfi-cast.cpp
+++ b/clang/test/CodeGenCXX/cfi-cast.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fvisibility=hidden -std=c++11 -fsanitize=cfi-derived-cast -fsanitize-trap=cfi-derived-cast -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-DCAST %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fvisibility=hidden -std=c++11 -fsanitize=cfi-unrelated-cast -fsanitize-trap=cfi-unrelated-cast -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-UCAST %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fvisibility=hidden -std=c++11 -fsanitize=cfi-unrelated-cast,cfi-cast-strict -fsanitize-trap=cfi-unrelated-cast,cfi-cast-strict -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-UCAST-STRICT %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fvisibility=hidden -std=c++11 -fsanitize=cfi-derived-cast -fsanitize-trap=cfi-derived-cast -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-DCAST %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fvisibility=hidden -std=c++11 -fsanitize=cfi-unrelated-cast -fsanitize-trap=cfi-unrelated-cast -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-UCAST %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fvisibility=hidden -std=c++11 -fsanitize=cfi-unrelated-cast,cfi-cast-strict -fsanitize-trap=cfi-unrelated-cast,cfi-cast-strict -emit-llvm -o - %s | FileCheck -check-prefix=CHECK-UCAST-STRICT %s
 
 // In this test the main thing we are searching for is something like
 // 'metadata !"1B"' where "1B" is the mangled name of the class we are
@@ -19,7 +19,7 @@ struct C : A {};
 
 // CHECK-DCAST-LABEL: define hidden void @_Z3abpP1A
 void abp(A *a) {
-  // CHECK-DCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1B")
+  // CHECK-DCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
   // CHECK-DCAST-NEXT: br i1 [[P]], label %[[CONTBB:[^ ]*]], label %[[TRAPBB:[^ ,]*]]
 
   // CHECK-DCAST: [[TRAPBB]]
@@ -33,7 +33,7 @@ void abp(A *a) {
 
 // CHECK-DCAST-LABEL: define hidden void @_Z3abrR1A
 void abr(A &a) {
-  // CHECK-DCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1B")
+  // CHECK-DCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
   // CHECK-DCAST-NEXT: br i1 [[P]], label %[[CONTBB:[^ ]*]], label %[[TRAPBB:[^ ,]*]]
 
   // CHECK-DCAST: [[TRAPBB]]
@@ -47,7 +47,7 @@ void abr(A &a) {
 
 // CHECK-DCAST-LABEL: define hidden void @_Z4abrrO1A
 void abrr(A &&a) {
-  // CHECK-DCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1B")
+  // CHECK-DCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
   // CHECK-DCAST-NEXT: br i1 [[P]], label %[[CONTBB:[^ ]*]], label %[[TRAPBB:[^ ,]*]]
 
   // CHECK-DCAST: [[TRAPBB]]
@@ -61,7 +61,7 @@ void abrr(A &&a) {
 
 // CHECK-UCAST-LABEL: define hidden void @_Z3vbpPv
 void vbp(void *p) {
-  // CHECK-UCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1B")
+  // CHECK-UCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
   // CHECK-UCAST-NEXT: br i1 [[P]], label %[[CONTBB:[^ ]*]], label %[[TRAPBB:[^ ,]*]]
 
   // CHECK-UCAST: [[TRAPBB]]
@@ -75,7 +75,7 @@ void vbp(void *p) {
 
 // CHECK-UCAST-LABEL: define hidden void @_Z3vbrRc
 void vbr(char &r) {
-  // CHECK-UCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1B")
+  // CHECK-UCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
   // CHECK-UCAST-NEXT: br i1 [[P]], label %[[CONTBB:[^ ]*]], label %[[TRAPBB:[^ ,]*]]
 
   // CHECK-UCAST: [[TRAPBB]]
@@ -89,7 +89,7 @@ void vbr(char &r) {
 
 // CHECK-UCAST-LABEL: define hidden void @_Z4vbrrOc
 void vbrr(char &&r) {
-  // CHECK-UCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1B")
+  // CHECK-UCAST: [[P:%[^ ]*]] = call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
   // CHECK-UCAST-NEXT: br i1 [[P]], label %[[CONTBB:[^ ]*]], label %[[TRAPBB:[^ ,]*]]
 
   // CHECK-UCAST: [[TRAPBB]]
@@ -104,24 +104,24 @@ void vbrr(char &&r) {
 // CHECK-UCAST-LABEL: define hidden void @_Z3vcpPv
 // CHECK-UCAST-STRICT-LABEL: define hidden void @_Z3vcpPv
 void vcp(void *p) {
-  // CHECK-UCAST: call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1A")
-  // CHECK-UCAST-STRICT: call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1C")
+  // CHECK-UCAST: call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1A")
+  // CHECK-UCAST-STRICT: call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1C")
   (void)static_cast<C*>(p);
 }
 
 // CHECK-UCAST-LABEL: define hidden void @_Z3bcpP1B
 // CHECK-UCAST-STRICT-LABEL: define hidden void @_Z3bcpP1B
 void bcp(B *p) {
-  // CHECK-UCAST: call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1A")
-  // CHECK-UCAST-STRICT: call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1C")
+  // CHECK-UCAST: call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1A")
+  // CHECK-UCAST-STRICT: call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1C")
   (void)(C *)p;
 }
 
 // CHECK-UCAST-LABEL: define hidden void @_Z8bcp_callP1B
 // CHECK-UCAST-STRICT-LABEL: define hidden void @_Z8bcp_callP1B
 void bcp_call(B *p) {
-  // CHECK-UCAST: call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1A")
-  // CHECK-UCAST-STRICT: call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1C")
+  // CHECK-UCAST: call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1A")
+  // CHECK-UCAST-STRICT: call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1C")
   ((C *)p)->f();
 }
 

diff  --git a/clang/test/CodeGenCXX/cfi-icall.cpp b/clang/test/CodeGenCXX/cfi-icall.cpp
index 42c12ee902d73..8493a0b877e9a 100644
--- a/clang/test/CodeGenCXX/cfi-icall.cpp
+++ b/clang/test/CodeGenCXX/cfi-icall.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fsanitize=cfi-icall -fsanitize-trap=cfi-icall -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=ITANIUM %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-pc-windows-msvc -fsanitize=cfi-icall -fsanitize-trap=cfi-icall -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=MS %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fsanitize=cfi-icall -fsanitize-trap=cfi-icall -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=ITANIUM %s
+// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc -fsanitize=cfi-icall -fsanitize-trap=cfi-icall -emit-llvm -o - %s | FileCheck --check-prefix=CHECK --check-prefix=MS %s
 
 // Tests that we assign unnamed metadata nodes to functions whose types have
 // internal linkage.
@@ -16,7 +16,7 @@ void f(S s) {
 void g() {
   struct S s;
   void (*fp)(S) = f;
-  // CHECK: call i1 @llvm.type.test(i8* {{.*}}, metadata [[VOIDS1:![0-9]+]])
+  // CHECK: call i1 @llvm.type.test(ptr {{.*}}, metadata [[VOIDS1:![0-9]+]])
   fp(s);
 }
 

diff  --git a/clang/test/CodeGenCXX/cfi-mfcall.cpp b/clang/test/CodeGenCXX/cfi-mfcall.cpp
index 03b121b52fe39..1ad78e7e2c12f 100644
--- a/clang/test/CodeGenCXX/cfi-mfcall.cpp
+++ b/clang/test/CodeGenCXX/cfi-mfcall.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fsanitize=cfi-mfcall -fsanitize-trap=cfi-mfcall -fvisibility=hidden -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fsanitize=cfi-mfcall -fsanitize-trap=cfi-mfcall -fvisibility=default -emit-llvm -o - %s | FileCheck --check-prefix=DEFAULT %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fsanitize=cfi-mfcall -fsanitize-trap=cfi-mfcall -fvisibility=hidden -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fsanitize=cfi-mfcall -fsanitize-trap=cfi-mfcall -fvisibility=default -emit-llvm -o - %s | FileCheck --check-prefix=DEFAULT %s
 // With -fwhole-program-vtables we should get the member function pointer type
 // test, even without hidden visibility.
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm -o - %s | FileCheck %s --check-prefix=WPV
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm -o - %s | FileCheck %s --check-prefix=WPV
 
 struct B1 {};
 struct B2 {};
@@ -14,20 +14,19 @@ struct S : B1, B3 {};
 
 void f(S *s, void (S::*p)()) {
   // WPV: [[OFFSET:%.*]] = sub i64 {{.*}}, 1
-  // WPV: [[VFPTR:%.*]] = getelementptr i8, i8* %{{.*}}, i64 [[OFFSET]]
-  // WPV: [[TT:%.*]] = call i1 @llvm.public.type.test(i8* [[VFPTR]], metadata !"_ZTSM1SFvvE.virtual")
+  // WPV: [[VFPTR:%.*]] = getelementptr i8, ptr %{{.*}}, i64 [[OFFSET]]
+  // WPV: [[TT:%.*]] = call i1 @llvm.public.type.test(ptr [[VFPTR]], metadata !"_ZTSM1SFvvE.virtual")
   // CHECK: [[OFFSET:%.*]] = sub i64 {{.*}}, 1
-  // CHECK: [[VFPTR:%.*]] = getelementptr i8, i8* %{{.*}}, i64 [[OFFSET]]
-  // CHECK: [[TT:%.*]] = call i1 @llvm.type.test(i8* [[VFPTR]], metadata !"_ZTSM1SFvvE.virtual")
+  // CHECK: [[VFPTR:%.*]] = getelementptr i8, ptr %{{.*}}, i64 [[OFFSET]]
+  // CHECK: [[TT:%.*]] = call i1 @llvm.type.test(ptr [[VFPTR]], metadata !"_ZTSM1SFvvE.virtual")
   // CHECK: br i1 [[TT]], label {{.*}}, label %[[TRAP1:[^,]*]]
 
   // CHECK: [[TRAP1]]:
   // CHECK-NEXT: llvm.ubsantrap
 
-  // CHECK: [[NVFPTR:%.*]] = bitcast void (%struct.S*)* {{.*}} to i8*
-  // CHECK: [[TT1:%.*]] = call i1 @llvm.type.test(i8* [[NVFPTR]], metadata !"_ZTSM2B1FvvE")
+  // CHECK: [[TT1:%.*]] = call i1 @llvm.type.test(ptr {{.*}}, metadata !"_ZTSM2B1FvvE")
   // CHECK: [[OR1:%.*]] = or i1 false, [[TT1]]
-  // CHECK: [[TT2:%.*]] = call i1 @llvm.type.test(i8* [[NVFPTR]], metadata !"_ZTSM2B2FvvE")
+  // CHECK: [[TT2:%.*]] = call i1 @llvm.type.test(ptr {{.*}}, metadata !"_ZTSM2B2FvvE")
   // CHECK: [[OR2:%.*]] = or i1 [[OR1]], [[TT2]]
   // CHECK: br i1 [[OR2]], label {{.*}}, label %[[TRAP2:[^,]*]]
 

diff  --git a/clang/test/CodeGenCXX/cfi-nvcall.cpp b/clang/test/CodeGenCXX/cfi-nvcall.cpp
index a50432ea087e3..28d7a7c5151d9 100644
--- a/clang/test/CodeGenCXX/cfi-nvcall.cpp
+++ b/clang/test/CodeGenCXX/cfi-nvcall.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-nvcall -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-nvcall,cfi-cast-strict -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-STRICT %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-nvcall -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-nvcall,cfi-cast-strict -emit-llvm -o - %s | FileCheck --check-prefix=CHECK-STRICT %s
 
 struct A {
   virtual void f();
@@ -17,8 +17,8 @@ struct C : A {
 // CHECK-LABEL: @bg
 // CHECK-STRICT-LABEL: @bg
 extern "C" void bg(B *b) {
-  // CHECK: call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1B")
-  // CHECK-STRICT: call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1B")
+  // CHECK: call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
+  // CHECK-STRICT: call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1B")
   b->g();
 }
 
@@ -29,7 +29,7 @@ extern "C" void cg(C *c) {
   // In this case C's layout is the same as its base class, so we allow
   // c to be of type A in non-strict mode.
 
-  // CHECK: call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1A")
-  // CHECK-STRICT: call i1 @llvm.type.test(i8* {{%[^ ]*}}, metadata !"_ZTS1C")
+  // CHECK: call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1A")
+  // CHECK-STRICT: call i1 @llvm.type.test(ptr {{%[^ ]*}}, metadata !"_ZTS1C")
   c->g();
 }

diff  --git a/clang/test/CodeGenCXX/cfi-speculative-vtable.cpp b/clang/test/CodeGenCXX/cfi-speculative-vtable.cpp
index b4717813593a0..5f3c59fb0cd09 100644
--- a/clang/test/CodeGenCXX/cfi-speculative-vtable.cpp
+++ b/clang/test/CodeGenCXX/cfi-speculative-vtable.cpp
@@ -11,4 +11,4 @@ class A {
 A a;
 
 // CHECK: @_ZTV1A ={{.*}} available_externally
-// CHECK-NOT: !{{.*}} = !{!{{.*}}, [4 x i8*]* @_ZTV1A, i64 16}
+// CHECK-NOT: !{{.*}} = !{!{{.*}}, ptr @_ZTV1A, i64 16}

diff  --git a/clang/test/CodeGenCXX/cfi-stats.cpp b/clang/test/CodeGenCXX/cfi-stats.cpp
index 435534a177db0..11018aa38b47b 100644
--- a/clang/test/CodeGenCXX/cfi-stats.cpp
+++ b/clang/test/CodeGenCXX/cfi-stats.cpp
@@ -1,14 +1,14 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall,cfi-nvcall,cfi-derived-cast,cfi-unrelated-cast,cfi-icall -fsanitize-stats -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall,cfi-nvcall,cfi-derived-cast,cfi-unrelated-cast,cfi-icall -fsanitize-trap=cfi-vcall -fwhole-program-vtables -fsanitize-stats -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall,cfi-nvcall,cfi-derived-cast,cfi-unrelated-cast,cfi-icall -fsanitize-stats -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -fvisibility=hidden -fsanitize=cfi-vcall,cfi-nvcall,cfi-derived-cast,cfi-unrelated-cast,cfi-icall -fsanitize-trap=cfi-vcall -fwhole-program-vtables -fsanitize-stats -emit-llvm -o - %s | FileCheck %s
 
-// CHECK: [[STATS:@[^ ]*]] = internal global { i8*, i32, [5 x [2 x i8*]] } { i8* null, i32 5, [5 x [2 x i8*]]
-// CHECK: {{\[\[}}2 x i8*] zeroinitializer,
-// CHECK: [2 x i8*] [i8* null, i8* inttoptr (i64 2305843009213693952 to i8*)],
-// CHECK: [2 x i8*] [i8* null, i8* inttoptr (i64 4611686018427387904 to i8*)],
-// CHECK: [2 x i8*] [i8* null, i8* inttoptr (i64 6917529027641081856 to i8*)],
-// CHECK: [2 x i8*] [i8* null, i8* inttoptr (i64 -9223372036854775808 to i8*)]] }
+// CHECK: [[STATS:@[^ ]*]] = internal global { ptr, i32, [5 x [2 x ptr]] } { ptr null, i32 5, [5 x [2 x ptr]]
+// CHECK: {{\[\[}}2 x ptr] zeroinitializer,
+// CHECK: [2 x ptr] [ptr null, ptr inttoptr (i64 2305843009213693952 to ptr)],
+// CHECK: [2 x ptr] [ptr null, ptr inttoptr (i64 4611686018427387904 to ptr)],
+// CHECK: [2 x ptr] [ptr null, ptr inttoptr (i64 6917529027641081856 to ptr)],
+// CHECK: [2 x ptr] [ptr null, ptr inttoptr (i64 -9223372036854775808 to ptr)]] }
 
-// CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 0, void ()* [[CTOR:@[^ ]*]], i8* null }]
+// CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 0, ptr [[CTOR:@[^ ]*]], ptr null }]
 
 struct A {
   virtual void vf();
@@ -47,5 +47,5 @@ extern "C" void icall(void (*p)()) {
 }
 
 // CHECK: define internal void [[CTOR]]()
-// CHECK-NEXT: call void @__sanitizer_stat_init(i8* bitcast ({ i8*, i32, [5 x [2 x i8*]] }* [[STATS]] to i8*))
+// CHECK-NEXT: call void @__sanitizer_stat_init(ptr [[STATS]])
 // CHECK-NEXT: ret void

diff  --git a/clang/test/CodeGenCXX/clang-abi-compat.cpp b/clang/test/CodeGenCXX/clang-abi-compat.cpp
index 9a8df9138ab07..4d518116f0a70 100644
--- a/clang/test/CodeGenCXX/clang-abi-compat.cpp
+++ b/clang/test/CodeGenCXX/clang-abi-compat.cpp
@@ -1,26 +1,26 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++98 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=3.0 %s -emit-llvm -o - -Wno-c++11-extensions \
+// RUN: %clang_cc1 -std=c++98 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=3.0 %s -emit-llvm -o - -Wno-c++11-extensions \
 // RUN:     | FileCheck --check-prefixes=CHECK,PRE39,PRE5,PRE12,PRE15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=3.0 %s -emit-llvm -o - \
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=3.0 %s -emit-llvm -o - \
 // RUN:     | FileCheck --check-prefixes=CHECK,PRE39,PRE5,PRE12,PRE15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=3.8 %s -emit-llvm -o - \
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=3.8 %s -emit-llvm -o - \
 // RUN:     | FileCheck --check-prefixes=CHECK,PRE39,PRE5,PRE12,PRE15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=3.9 %s -emit-llvm -o - \
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=3.9 %s -emit-llvm -o - \
 // RUN:     | FileCheck --check-prefixes=CHECK,V39,PRE5,PRE12,PRE15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=4.0 %s -emit-llvm -o - \
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=4.0 %s -emit-llvm -o - \
 // RUN:     | FileCheck --check-prefixes=CHECK,V39,PRE5,PRE12,PRE15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=5 %s -emit-llvm -o - \
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=5 %s -emit-llvm -o - \
 // RUN:     | FileCheck --check-prefixes=CHECK,V39,V5,PRE12,PRE12-CXX17,PRE15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=11 %s -emit-llvm -o - \
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=11 %s -emit-llvm -o - \
 // RUN:     | FileCheck --check-prefixes=CHECK,V39,V5,PRE12,PRE12-CXX17,PRE15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=11 %s -emit-llvm -o - \
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=11 %s -emit-llvm -o - \
 // RUN:     | FileCheck --check-prefixes=CHECK,V39,V5,PRE12,PRE12-CXX17,PRE12-CXX20,PRE13-CXX20,PRE15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=12 %s -emit-llvm -o - \
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=12 %s -emit-llvm -o - \
 // RUN:     | FileCheck --check-prefixes=CHECK,V39,V5,V12,V12-CXX17,V12-CXX20,PRE13-CXX20,PRE15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=14 %s -emit-llvm -o - \
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=14 %s -emit-llvm -o - \
 // RUN:     | FileCheck --check-prefixes=CHECK,V39,V5,V12,V12-CXX17,V12-CXX20,V13-CXX20,PRE15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++98 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=latest %s -emit-llvm -o - -Wno-c++11-extensions \
+// RUN: %clang_cc1 -std=c++98 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=latest %s -emit-llvm -o - -Wno-c++11-extensions \
 // RUN:     | FileCheck --check-prefixes=CHECK,V39,V5,V12,V15 %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++20 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=latest %s -emit-llvm -o - \
+// RUN: %clang_cc1 -std=c++20 -triple x86_64-linux-gnu -fenable-matrix -fclang-abi-compat=latest %s -emit-llvm -o - \
 // RUN:     | FileCheck --check-prefixes=CHECK,V39,V5,V12,V12-CXX17,V12-CXX20,V13-CXX20,V15 %s
 
 typedef __attribute__((vector_size(8))) long long v1xi64;
@@ -34,7 +34,7 @@ struct A {
 };
 void clang5(A) {}
 // PRE5: @_Z6clang51A()
-// V5: @_Z6clang51A(%{{.*}}*
+// V5: @_Z6clang51A(ptr
 
 namespace mangle_template_prefix {
   // PRE12: @_ZN22mangle_template_prefix1fINS_1TEEEvNT_1UIiE1VIiEENS4_S5_IfEE(

diff  --git a/clang/test/CodeGenCXX/clang-sections.cpp b/clang/test/CodeGenCXX/clang-sections.cpp
index bc9a0f2bec966..a444f2d0cae59 100644
--- a/clang/test/CodeGenCXX/clang-sections.cpp
+++ b/clang/test/CodeGenCXX/clang-sections.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple arm-none-eabi -o - %s | FileCheck %s --check-prefixes=CHECK,ELF
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple arm64-apple-ios -o - %s | FileCheck %s --check-prefixes=CHECK,MACHO
+// RUN: %clang_cc1 -emit-llvm -triple arm-none-eabi -o - %s | FileCheck %s --check-prefixes=CHECK,ELF
+// RUN: %clang_cc1 -emit-llvm -triple arm64-apple-ios -o - %s | FileCheck %s --check-prefixes=CHECK,MACHO
 // Test that global variables, statics and functions are attached section-attributes
 // as per '#pragma clang section' directives.
 
@@ -79,11 +79,11 @@ int hoo(void) {
 //CHECK: @n ={{.*}} global i32 0, align 4
 //CHECK: @o ={{.*}} global i32 6, align 4
 //CHECK: @p ={{.*}} constant i32 7, align 4
-//CHECK: @_ZL5fptrs = internal constant [2 x i32 ()*] [i32 ()* @foo, i32 ()* @goo], align {{4|8}} #3
+//CHECK: @_ZL5fptrs = internal constant [2 x ptr] [ptr @foo, ptr @goo], align {{4|8}} #3
 
 //CHECK: define{{.*}} i32 @foo() #5 {
 //CHECK: define{{.*}} i32 @goo() #6 {
-//CHECK: declare i32 @zoo(i32* noundef, i32* noundef) #7
+//CHECK: declare i32 @zoo(ptr noundef, ptr noundef) #7
 //CHECK: define{{.*}} i32 @hoo() #8 {
 
 //ELF: attributes #0 = { "bss-section"="my_bss.1" "data-section"="my_data.1" "rodata-section"="my_rodata.1" }

diff  --git a/clang/test/CodeGenCXX/compound-literals.cpp b/clang/test/CodeGenCXX/compound-literals.cpp
index 7df5ee04fe6a2..fcec2d19e2def 100644
--- a/clang/test/CodeGenCXX/compound-literals.cpp
+++ b/clang/test/CodeGenCXX/compound-literals.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple armv7-none-eabi -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple armv7-none-eabi -emit-llvm -o - %s | FileCheck %s
 
 struct X {
   X();
@@ -13,30 +13,30 @@ struct Y {
 };
 
 // CHECK: @.compoundliteral = internal global [5 x i32] [i32 1, i32 2, i32 3, i32 4, i32 5], align 4
-// CHECK: @q ={{.*}} global i32* getelementptr inbounds ([5 x i32], [5 x i32]* @.compoundliteral, i32 0, i32 0), align 4
+// CHECK: @q ={{.*}} global ptr @.compoundliteral, align 4
 
 // CHECK-LABEL: define{{.*}} i32 @_Z1fv()
 int f() {
   // CHECK: [[LVALUE:%[a-z0-9.]+]] = alloca
-  // CHECK-NEXT: [[I:%[a-z0-9]+]] = getelementptr inbounds {{.*}}, {{.*}}* [[LVALUE]], i32 0, i32 0
-  // CHECK-NEXT: store i32 17, i32* [[I]]
+  // CHECK-NEXT: [[I:%[a-z0-9]+]] = getelementptr inbounds {{.*}}, ptr [[LVALUE]], i32 0, i32 0
+  // CHECK-NEXT: store i32 17, ptr [[I]]
   // CHECK-NEXT: [[X:%[a-z0-9]+]] = getelementptr inbounds {{.*}} [[LVALUE]], i32 0, i32 1
-  // CHECK-NEXT: call noundef %struct.X* @_ZN1XC1EPKc({{.*}}[[X]]
+  // CHECK-NEXT: call noundef ptr @_ZN1XC1EPKc({{.*}}[[X]]
   // CHECK-NEXT: [[I:%[a-z0-9]+]] = getelementptr inbounds {{.*}} [[LVALUE]], i32 0, i32 0
-  // CHECK-NEXT: [[RESULT:%[a-z0-9]+]] = load i32, i32*
-  // CHECK-NEXT: call noundef %struct.Y* @_ZN1YD1Ev
+  // CHECK-NEXT: [[RESULT:%[a-z0-9]+]] = load i32, ptr
+  // CHECK-NEXT: call noundef ptr @_ZN1YD1Ev
   // CHECK-NEXT: ret i32 [[RESULT]]
   return ((Y){17, "seventeen"}).i;
 }
 
 // CHECK-LABEL: define{{.*}} i32 @_Z1gv()
 int g() {
-  // CHECK: store [2 x i32]* %{{[a-z0-9.]+}}, [2 x i32]** [[V:%[a-z0-9.]+]]
+  // CHECK: store ptr %{{[a-z0-9.]+}}, ptr [[V:%[a-z0-9.]+]]
   const int (&v)[2] = (int [2]) {1,2};
 
-  // CHECK: [[A:%[a-z0-9.]+]] = load [2 x i32]*, [2 x i32]** [[V]]
-  // CHECK-NEXT: [[A0ADDR:%[a-z0-9.]+]] = getelementptr inbounds [2 x i32], [2 x i32]* [[A]], i32 0, {{.*}} 0
-  // CHECK-NEXT: [[A0:%[a-z0-9.]+]] = load i32, i32* [[A0ADDR]]
+  // CHECK: [[A:%[a-z0-9.]+]] = load ptr, ptr [[V]]
+  // CHECK-NEXT: [[A0ADDR:%[a-z0-9.]+]] = getelementptr inbounds [2 x i32], ptr [[A]], i32 0, {{.*}} 0
+  // CHECK-NEXT: [[A0:%[a-z0-9.]+]] = load i32, ptr [[A0ADDR]]
   // CHECK-NEXT: ret i32 [[A0]]
   return v[0];
 }
@@ -51,7 +51,7 @@ struct Z { int i[3]; };
 int *p = (Z){ {1, 2, 3} }.i;
 // CHECK: define {{.*}}__cxx_global_var_init()
 // CHECK: alloca %struct.Z
-// CHECK: store i32* %{{.*}}, i32** @p
+// CHECK: store ptr %{{.*}}, ptr @p
 
 int *q = (int [5]){1, 2, 3, 4, 5};
 // (constant initialization, checked above)
@@ -59,13 +59,13 @@ int *q = (int [5]){1, 2, 3, 4, 5};
 extern int n;
 int *r = (int [5]){1, 2, 3, 4, 5} + n;
 // CHECK-LABEL: define {{.*}}__cxx_global_var_init.1()
-// CHECK: %[[PTR:.*]] = getelementptr inbounds i32, i32* getelementptr inbounds ([5 x i32], [5 x i32]* @.compoundliteral.2, i32 0, i32 0), i32 %
-// CHECK: store i32* %[[PTR]], i32** @r
+// CHECK: %[[PTR:.*]] = getelementptr inbounds i32, ptr @.compoundliteral.2, i32 %
+// CHECK: store ptr %[[PTR]], ptr @r
 
 int *PR21912_1 = (int []){} + n;
 // CHECK-LABEL: define {{.*}}__cxx_global_var_init.3()
-// CHECK: %[[PTR:.*]] = getelementptr inbounds i32, i32* getelementptr inbounds ([0 x i32], [0 x i32]* @.compoundliteral.4, i32 0, i32 0), i32 %
-// CHECK: store i32* %[[PTR]], i32** @PR21912_1
+// CHECK: %[[PTR:.*]] = getelementptr inbounds i32, ptr @.compoundliteral.4, i32 %
+// CHECK: store ptr %[[PTR]], ptr @PR21912_1
 
 union PR21912Ty {
   long long l;
@@ -73,8 +73,8 @@ union PR21912Ty {
 };
 union PR21912Ty *PR21912_2 = (union PR21912Ty[]){{.d = 2.0}, {.l = 3}} + n;
 // CHECK-LABEL: define {{.*}}__cxx_global_var_init.5()
-// CHECK: %[[PTR:.*]] = getelementptr inbounds %union.PR21912Ty, %union.PR21912Ty* getelementptr inbounds ([2 x %union.PR21912Ty], [2 x %union.PR21912Ty]* bitcast (<{ { double }, %union.PR21912Ty }>* @.compoundliteral.6 to [2 x %union.PR21912Ty]*), i32 0, i32 0), i32 %
-// CHECK: store %union.PR21912Ty* %[[PTR]], %union.PR21912Ty** @PR21912_2, align 4
+// CHECK: %[[PTR:.*]] = getelementptr inbounds %union.PR21912Ty, ptr @.compoundliteral.6, i32 %
+// CHECK: store ptr %[[PTR]], ptr @PR21912_2, align 4
 
 // This compound literal should have local scope.
 int computed_with_lambda = [] {

diff  --git a/clang/test/CodeGenCXX/condition.cpp b/clang/test/CodeGenCXX/condition.cpp
index 136e5a76e701a..d5172ee84aaed 100644
--- a/clang/test/CodeGenCXX/condition.cpp
+++ b/clang/test/CodeGenCXX/condition.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
 void *f();
 
 template <typename T> T* g() {
@@ -105,22 +105,22 @@ void while_destruct(int z) {
     // CHECK-NEXT: br i1 [[COND]]
 
     // Loop-exit staging block.
-    // CHECK: store i32 3, i32* [[CLEANUPDEST]]
+    // CHECK: store i32 3, ptr [[CLEANUPDEST]]
     // CHECK-NEXT: br
 
     // While body.
-    // CHECK: store i32 21, i32* [[Z]]
-    // CHECK: store i32 0, i32* [[CLEANUPDEST]]
+    // CHECK: store i32 21, ptr [[Z]]
+    // CHECK: store i32 0, ptr [[CLEANUPDEST]]
     // CHECK-NEXT: br
     z = 21;
 
     // Cleanup.
     // CHECK: call void @_ZN1XD1Ev
-    // CHECK-NEXT: [[DEST:%.*]] = load i32, i32* [[CLEANUPDEST]]
+    // CHECK-NEXT: [[DEST:%.*]] = load i32, ptr [[CLEANUPDEST]]
     // CHECK-NEXT: switch i32 [[DEST]]
   }
 
-  // CHECK: store i32 22, i32* [[Z]]
+  // CHECK: store i32 22, ptr [[Z]]
   z = 22;
 
   // CHECK: call void @_Z4getXv
@@ -129,7 +129,7 @@ void while_destruct(int z) {
   // CHECK-NEXT: br
   while(getX()) { }
 
-  // CHECK: store i32 25, i32* [[Z]]
+  // CHECK: store i32 25, ptr [[Z]]
   z = 25;
 
   // CHECK: ret
@@ -152,27 +152,27 @@ void for_destruct(int z) {
     // -> %for.body, %for.cond.cleanup
 
     // %for.cond.cleanup: Exit cleanup staging.
-    // CHECK: store i32 2, i32* [[CLEANUPDEST]]
+    // CHECK: store i32 2, ptr [[CLEANUPDEST]]
     // CHECK-NEXT: br
     // -> %cleanup
 
     // %for.body:
-    // CHECK: store i32 23, i32* [[Z]]
+    // CHECK: store i32 23, ptr [[Z]]
     // CHECK-NEXT: br
     // -> %for.inc
     z = 23;
 
     // %for.inc:
-    // CHECK: [[TMP:%.*]] = load i32, i32* [[Z]]
+    // CHECK: [[TMP:%.*]] = load i32, ptr [[Z]]
     // CHECK-NEXT: [[INC:%.*]] = add nsw i32 [[TMP]], 1
-    // CHECK-NEXT: store i32 [[INC]], i32* [[Z]]
-    // CHECK-NEXT: store i32 0, i32* [[CLEANUPDEST]]
+    // CHECK-NEXT: store i32 [[INC]], ptr [[Z]]
+    // CHECK-NEXT: store i32 0, ptr [[CLEANUPDEST]]
     // CHECK-NEXT: br
     // -> %cleanup
 
     // %cleanup:  Destroys X.
     // CHECK: call void @_ZN1XD1Ev
-    // CHECK-NEXT: [[YDESTTMP:%.*]] = load i32, i32* [[CLEANUPDEST]]
+    // CHECK-NEXT: [[YDESTTMP:%.*]] = load i32, ptr [[CLEANUPDEST]]
     // CHECK-NEXT: switch i32 [[YDESTTMP]]
     // 0 -> %cleanup.cont, default -> %cleanup1
 
@@ -190,7 +190,7 @@ void for_destruct(int z) {
   // CHECK: store i32 24
   z = 24;
 
-  // CHECK-NEXT: store i32 0, i32* [[I]]
+  // CHECK-NEXT: store i32 0, ptr [[I]]
   // CHECK-NEXT: br
   // -> %for.cond6
 
@@ -207,7 +207,7 @@ void for_destruct(int z) {
 
   // %for.inc11:
   // CHECK: call void @_Z4getXv
-  // CHECK-NEXT: load i32, i32* [[I]]
+  // CHECK-NEXT: load i32, ptr [[I]]
   // CHECK-NEXT: add
   // CHECK-NEXT: store
   // CHECK-NEXT: call void @_ZN1XD1Ev

diff  --git a/clang/test/CodeGenCXX/constructor-alias.cpp b/clang/test/CodeGenCXX/constructor-alias.cpp
index f7e6c76fa2698..f8205f9a9bac6 100644
--- a/clang/test/CodeGenCXX/constructor-alias.cpp
+++ b/clang/test/CodeGenCXX/constructor-alias.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple mipsel--linux-gnu -mno-constructor-aliases -mconstructor-aliases -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple mipsel--linux-gnu -mconstructor-aliases -mno-constructor-aliases -o - %s | FileCheck %s --check-prefix=NO-ALIAS
+// RUN: %clang_cc1 -emit-llvm -triple mipsel--linux-gnu -mno-constructor-aliases -mconstructor-aliases -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple mipsel--linux-gnu -mconstructor-aliases -mno-constructor-aliases -o - %s | FileCheck %s --check-prefix=NO-ALIAS
 
 // The target attribute code used to get confused with aliases. Make sure
 // we don't crash when an alias is used.
@@ -10,5 +10,5 @@ struct B {
 B::B() {
 }
 
-// CHECK: @_ZN1BC1Ev ={{.*}} unnamed_addr alias void (%struct.B*), void (%struct.B*)* @_ZN1BC2Ev
-// NO-ALIAS-NOT: @_ZN1BC1Ev ={{.*}} unnamed_addr alias void (%struct.B*), void (%struct.B*)* @_ZN1BC2Ev
+// CHECK: @_ZN1BC1Ev ={{.*}} unnamed_addr alias void (ptr), ptr @_ZN1BC2Ev
+// NO-ALIAS-NOT: @_ZN1BC1Ev ={{.*}} unnamed_addr alias void (ptr), ptr @_ZN1BC2Ev

diff  --git a/clang/test/CodeGenCXX/constructor-direct-call.cpp b/clang/test/CodeGenCXX/constructor-direct-call.cpp
index e65944e0ba5b7..ca69d0f76ee69 100644
--- a/clang/test/CodeGenCXX/constructor-direct-call.cpp
+++ b/clang/test/CodeGenCXX/constructor-direct-call.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-pc-mingw32 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK32 --check-prefix=CHECK
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-pc-windows-msvc19.11.0 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK64 --check-prefix=CHECK
+// RUN: %clang_cc1 -triple i686-pc-mingw32 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK32 --check-prefix=CHECK
+// RUN: %clang_cc1 -triple x86_64-pc-windows-msvc19.11.0 -fms-extensions -Wmicrosoft %s -emit-llvm -o - | FileCheck %s --check-prefix=CHECK64 --check-prefix=CHECK
 
 class Test1 {
 public:
@@ -10,8 +10,8 @@ void f1() {
   Test1 var;
   var.Test1::Test1();
 
-  // CHECK32:   call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %{{.*}}, i8* align 4 %{{.*}}, i32 4, i1 false)
-  // CHECK64:   call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %{{.*}}, i8* align 4 %{{.*}}, i64 4, i1 false)
+  // CHECK32:   call void @llvm.memcpy.p0.p0.i32(ptr align 4 %{{.*}}, ptr align 4 %{{.*}}, i32 4, i1 false)
+  // CHECK64:   call void @llvm.memcpy.p0.p0.i64(ptr align 4 %{{.*}}, ptr align 4 %{{.*}}, i64 4, i1 false)
   var.Test1::Test1(var);
 }
 
@@ -24,16 +24,16 @@ class Test2 {
 
 void f2() {
   // CHECK:  %var = alloca %class.Test2, align 4
-  // CHECK32-NEXT:  call x86_thiscallcc void @_ZN5Test2C1Ev(%class.Test2* {{[^,]*}} %var)
-  // CHECK64-NEXT:  %call = call noundef %class.Test2* @"??0Test2@@QEAA at XZ"(%class.Test2* {{[^,]*}} %var)
+  // CHECK32-NEXT:  call x86_thiscallcc void @_ZN5Test2C1Ev(ptr {{[^,]*}} %var)
+  // CHECK64-NEXT:  %call = call noundef ptr @"??0Test2@@QEAA at XZ"(ptr {{[^,]*}} %var)
   Test2 var;
 
-  // CHECK32-NEXT:  call x86_thiscallcc void @_ZN5Test2C1Ev(%class.Test2* {{[^,]*}} %var)
-  // CHECK64-NEXT:  %call1 = call noundef %class.Test2* @"??0Test2@@QEAA at XZ"(%class.Test2* {{[^,]*}} %var)
+  // CHECK32-NEXT:  call x86_thiscallcc void @_ZN5Test2C1Ev(ptr {{[^,]*}} %var)
+  // CHECK64-NEXT:  %call1 = call noundef ptr @"??0Test2@@QEAA at XZ"(ptr {{[^,]*}} %var)
   var.Test2::Test2();
 
-  // CHECK32:  call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %{{.*}}, i8* align 4 %{{.*}}, i32 8, i1 false)
-  // CHECK64:  call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %{{.*}}, i8* align 4 %{{.*}}, i64 8, i1 false)
+  // CHECK32:  call void @llvm.memcpy.p0.p0.i32(ptr align 4 %{{.*}}, ptr align 4 %{{.*}}, i32 8, i1 false)
+  // CHECK64:  call void @llvm.memcpy.p0.p0.i64(ptr align 4 %{{.*}}, ptr align 4 %{{.*}}, i64 8, i1 false)
   var.Test2::Test2(var);
 }
 
@@ -50,19 +50,19 @@ class Test3 {
 };
 
 void f3() {
-  // CHECK32: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* {{[^,]*}} %var)
-  // CHECK64: %call = call noundef %class.Test3* @"??0Test3@@QEAA at XZ"(%class.Test3* {{[^,]*}} %var)
+  // CHECK32: call x86_thiscallcc void @_ZN5Test3C1Ev(ptr {{[^,]*}} %var)
+  // CHECK64: %call = call noundef ptr @"??0Test3@@QEAA at XZ"(ptr {{[^,]*}} %var)
   Test3 var;
 
-  // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* {{[^,]*}} %var2)
-  // CHECK64-NEXT: %call1 = call noundef %class.Test3* @"??0Test3@@QEAA at XZ"(%class.Test3* {{[^,]*}} %var2)
+  // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(ptr {{[^,]*}} %var2)
+  // CHECK64-NEXT: %call1 = call noundef ptr @"??0Test3@@QEAA at XZ"(ptr {{[^,]*}} %var2)
   Test3 var2;
 
-  // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(%class.Test3* {{[^,]*}} %var)
-  // CHECK64-NEXT: %call2 = call noundef %class.Test3* @"??0Test3@@QEAA at XZ"(%class.Test3* {{[^,]*}} %var)
+  // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1Ev(ptr {{[^,]*}} %var)
+  // CHECK64-NEXT: %call2 = call noundef ptr @"??0Test3@@QEAA at XZ"(ptr {{[^,]*}} %var)
   var.Test3::Test3();
 
-  // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1ERKS_(%class.Test3* {{[^,]*}} %var, %class.Test3* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %var2)
-  // CHECK64-NEXT: %call3 = call noundef %class.Test3* @"??0Test3@@QEAA at AEBV0@@Z"(%class.Test3* {{[^,]*}} %var, %class.Test3* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %var2)
+  // CHECK32-NEXT: call x86_thiscallcc void @_ZN5Test3C1ERKS_(ptr {{[^,]*}} %var, ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %var2)
+  // CHECK64-NEXT: %call3 = call noundef ptr @"??0Test3@@QEAA at AEBV0@@Z"(ptr {{[^,]*}} %var, ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %var2)
   var.Test3::Test3(var2);
 }

diff  --git a/clang/test/CodeGenCXX/constructor-init-reference.cpp b/clang/test/CodeGenCXX/constructor-init-reference.cpp
index a2e94450fddf8..e61b93325fd8b 100644
--- a/clang/test/CodeGenCXX/constructor-init-reference.cpp
+++ b/clang/test/CodeGenCXX/constructor-init-reference.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
 
 int x;
 struct A {
@@ -6,4 +6,4 @@ struct A {
   A() : y(x) {}
 };
 A z;
-// CHECK: store i32* @x, i32**
+// CHECK: store ptr @x, ptr

diff  --git a/clang/test/CodeGenCXX/constructor-template.cpp b/clang/test/CodeGenCXX/constructor-template.cpp
index d1ae094a3b344..130a4f815d9ef 100644
--- a/clang/test/CodeGenCXX/constructor-template.cpp
+++ b/clang/test/CodeGenCXX/constructor-template.cpp
@@ -21,14 +21,14 @@ struct B {
 // PR4853
 template <typename T> class List {
 public:
-  List(){ }     // List<BinomialNode<int>*>::List() remains undefined.
+  List(){ }     // List<BinomialNodeptr>::List() remains undefined.
   ~List() {}
 };
 
 template <typename T> class Node {
  int i;
 public:
- Node(){ }      // Node<BinomialNode<int>*>::Node() remains undefined.
+ Node(){ }      // Node<BinomialNodeptr>::Node() remains undefined.
  ~Node() {}
 };
 

diff  --git a/clang/test/CodeGenCXX/convert-to-fptr.cpp b/clang/test/CodeGenCXX/convert-to-fptr.cpp
index 8a6f954cc3ac5..3d18f7684f25c 100644
--- a/clang/test/CodeGenCXX/convert-to-fptr.cpp
+++ b/clang/test/CodeGenCXX/convert-to-fptr.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
 // RUN: FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
 // RUN: FileCheck %s
 
 extern "C" int printf(...);
@@ -38,5 +38,5 @@ int main()
  return 0;
 }
 
-// CHECK: call noundef i32 (i32)* @_ZN1AcvPFiiEEv
-// CHECK: call noundef nonnull i32 (i32)* @_ZN1BcvRFiiEEv
+// CHECK: call noundef ptr @_ZN1AcvPFiiEEv
+// CHECK: call noundef nonnull ptr @_ZN1BcvRFiiEEv

diff  --git a/clang/test/CodeGenCXX/copy-assign-synthesis-1.cpp b/clang/test/CodeGenCXX/copy-assign-synthesis-1.cpp
index 5f276e9624a0a..b4e9707b68301 100644
--- a/clang/test/CodeGenCXX/copy-assign-synthesis-1.cpp
+++ b/clang/test/CodeGenCXX/copy-assign-synthesis-1.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o - | \
 // RUN: FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
+// RUN: %clang_cc1 -triple i386-apple-darwin -std=c++11 -emit-llvm %s -o - | \
 // RUN: FileCheck %s
 
 extern "C" int printf(...);
@@ -92,4 +92,4 @@ int main() {
   dstY.pr();
 }
 
-// CHECK: define linkonce_odr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.X* @_ZN1XaSERKS_
+// CHECK: define linkonce_odr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN1XaSERKS_

diff  --git a/clang/test/CodeGenCXX/copy-assign-synthesis-2.cpp b/clang/test/CodeGenCXX/copy-assign-synthesis-2.cpp
index 6d550599bda8e..a8f2b1304309c 100644
--- a/clang/test/CodeGenCXX/copy-assign-synthesis-2.cpp
+++ b/clang/test/CodeGenCXX/copy-assign-synthesis-2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
 struct A {};
 A& (A::*x)(const A&) = &A::operator=;
-// CHECK-LABEL: define linkonce_odr {{.*}}%struct.A* @_ZN1AaSERKS_
+// CHECK-LABEL: define linkonce_odr {{.*}}ptr @_ZN1AaSERKS_

diff  --git a/clang/test/CodeGenCXX/copy-constructor-elim.cpp b/clang/test/CodeGenCXX/copy-constructor-elim.cpp
index 6e6397ab0aaae..39e7cddd797d0 100644
--- a/clang/test/CodeGenCXX/copy-constructor-elim.cpp
+++ b/clang/test/CodeGenCXX/copy-constructor-elim.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple %ms_abi_triple -emit-llvm -o - %s | FileCheck %s -check-prefix MS
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %ms_abi_triple -emit-llvm -o - %s | FileCheck %s -check-prefix MS
 // CHECK-NOT: _ZN1CC1ERK1C
 // CHECK-NOT: _ZN1SC1ERK1S
 // MS-NOT: ?0C@@QAE at ABV0
@@ -56,4 +56,4 @@ extern "C" V f() { return gv1; }
 // Make sure that we obey the destination's alignment requirements when emitting
 // the copy.
 // CHECK-LABEL: define {{.*}} @f(
-// CHECK:   call void @llvm.memcpy.p0i8.p0i8.{{i64|i32}}({{.*}}align 4{{.*}}, i8* align 8 bitcast (%struct.V* @gv1 to i8*), {{i64|i32}} 4, i1 false)
+// CHECK:   call void @llvm.memcpy.p0.p0.{{i64|i32}}({{.*}}align 4{{.*}}, ptr align 8 @gv1, {{i64|i32}} 4, i1 false)

diff  --git a/clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp b/clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp
index 83eaf6ae04611..043dff44f37c2 100644
--- a/clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp
+++ b/clang/test/CodeGenCXX/copy-constructor-synthesis-2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -std=c++11 -emit-llvm -o - %s | FileCheck %s
 
 union PR23373 {
   PR23373(PR23373&) = default;
@@ -10,18 +10,18 @@ extern PR23373 pr23373_a;
 
 PR23373 pr23373_b(pr23373_a);
 // CHECK-LABEL: define {{.*}} @__cxx_global_var_init(
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.{{i32|i64}}({{.*}}align 4{{.*}}@pr23373_b{{.*}}, {{.*}}align 4{{.*}} @pr23373_a{{.*}}, [[W:i32|i64]] 4, i1 false)
+// CHECK: call void @llvm.memcpy.p0.p0.{{i32|i64}}({{.*}}align 4{{.*}}@pr23373_b{{.*}}, {{.*}}align 4{{.*}} @pr23373_a{{.*}}, [[W:i32|i64]] 4, i1 false)
 
 PR23373 pr23373_f() { return pr23373_a; }
 // CHECK-LABEL: define {{.*}} @_Z9pr23373_fv(
-// CHECK:   call void @llvm.memcpy.p0i8.p0i8.[[W]]({{.*}}align 4{{.*}}align 4{{.*}}, [[W]] 4, i1 false)
+// CHECK:   call void @llvm.memcpy.p0.p0.[[W]]({{.*}}align 4{{.*}}align 4{{.*}}, [[W]] 4, i1 false)
 
 void pr23373_g(PR23373 &a, PR23373 &b) { a = b; }
 // CHECK-LABEL: define {{.*}} @_Z9pr23373_g
-// CHECK:   call void @llvm.memcpy.p0i8.p0i8.[[W]]({{.*}}align 4{{.*}}align 4{{.*}}, [[W]] 4, i1 false)
+// CHECK:   call void @llvm.memcpy.p0.p0.[[W]]({{.*}}align 4{{.*}}align 4{{.*}}, [[W]] 4, i1 false)
 
 struct A { virtual void a(); };
 A x(A& y) { return y; }
 
-// CHECK: define linkonce_odr {{.*}} @_ZN1AC1ERKS_(%struct.A* {{.*}}%this, %struct.A* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) unnamed_addr
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1A, i32 0, inrange i32 0, i32 2) to i32 (...)**)
+// CHECK: define linkonce_odr {{.*}} @_ZN1AC1ERKS_(ptr {{.*}}%this, ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) unnamed_addr
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTV1A, i32 0, inrange i32 0, i32 2)

diff  --git a/clang/test/CodeGenCXX/copy-initialization.cpp b/clang/test/CodeGenCXX/copy-initialization.cpp
index ed5e19313ff74..aa0c6395f158d 100644
--- a/clang/test/CodeGenCXX/copy-initialization.cpp
+++ b/clang/test/CodeGenCXX/copy-initialization.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
 
 struct Foo {
   Foo();
@@ -12,7 +12,7 @@ struct Bar {
 
 void f(Foo);
 
-// CHECK-LABEL: define{{.*}} void @_Z1g3Foo(%struct.Foo* noundef %foo)
+// CHECK-LABEL: define{{.*}} void @_Z1g3Foo(ptr noundef %foo)
 void g(Foo foo) {
   // CHECK: call void @_ZN3BarC1Ev
   // CHECK: @_ZNK3BarcvRK3FooEv

diff  --git a/clang/test/CodeGenCXX/ctor-globalopt.cpp b/clang/test/CodeGenCXX/ctor-globalopt.cpp
index 0418ac79db3a3..5c1d119e3f5f6 100644
--- a/clang/test/CodeGenCXX/ctor-globalopt.cpp
+++ b/clang/test/CodeGenCXX/ctor-globalopt.cpp
@@ -1,21 +1,21 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -emit-llvm -o - %s -O2 | opt - -S -globalopt -o - | FileCheck %s --check-prefix=O1
-// RUN: %clang_cc1 -no-opaque-pointers -triple %ms_abi_triple -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple %ms_abi_triple -emit-llvm -o - %s -O2 | opt - -S -globalopt -o - | FileCheck %s --check-prefix=O1
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm -o - %s -O2 | opt - -S -globalopt -o - | FileCheck %s --check-prefix=O1
+// RUN: %clang_cc1 -triple %ms_abi_triple -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple %ms_abi_triple -emit-llvm -o - %s -O2 | opt - -S -globalopt -o - | FileCheck %s --check-prefix=O1
 
 // Check that GlobalOpt can eliminate static constructors for simple implicit
 // constructors. This is a targeted integration test to make sure that LLVM's
 // optimizers are able to process Clang's IR. GlobalOpt in particular is
 // sensitive to the casts we emit.
 
-// CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] 
-// CHECK: [{ i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_ctor_globalopt.cpp, i8* null }]
+// CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] 
+// CHECK: [{ i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_ctor_globalopt.cpp, ptr null }]
 
 // CHECK-LABEL: define internal {{.*}}void @_GLOBAL__sub_I_ctor_globalopt.cpp()
 // CHECK: call {{.*}}void @
 // CHECK-NOT: call{{ }}
 
-// O1: @llvm.global_ctors = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
+// O1: @llvm.global_ctors = appending global [0 x { i32, ptr, ptr }] zeroinitializer
 
 struct A {
   virtual void f();

diff  --git a/clang/test/CodeGenCXX/cxx-abi-switch.cpp b/clang/test/CodeGenCXX/cxx-abi-switch.cpp
index 9d0457e90220d..8d1a15ed896a8 100644
--- a/clang/test/CodeGenCXX/cxx-abi-switch.cpp
+++ b/clang/test/CodeGenCXX/cxx-abi-switch.cpp
@@ -3,8 +3,8 @@
 // explicitly choose the generic itanium C++ ABI, we should not return "this" on
 // ctors/dtors.
 //
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=x86_64-unknown-fuchsia -fc++-abi=itanium | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=aarch64-unknown-fuchsia -fc++-abi=itanium | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-unknown-fuchsia -fc++-abi=itanium | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=aarch64-unknown-fuchsia -fc++-abi=itanium | FileCheck %s
 
 class A {
 public:
@@ -22,7 +22,7 @@ class B : public A {
 B::B(int *i) : i_(i) {}
 B::~B() {}
 
-// CHECK: define{{.*}} void @_ZN1BC2EPi(%class.B* {{[^,]*}} %this, i32* noundef %i)
-// CHECK: define{{.*}} void @_ZN1BC1EPi(%class.B* {{[^,]*}} %this, i32* noundef %i)
-// CHECK: define{{.*}} void @_ZN1BD2Ev(%class.B* {{[^,]*}} %this)
-// CHECK: define{{.*}} void @_ZN1BD1Ev(%class.B* {{[^,]*}} %this)
+// CHECK: define{{.*}} void @_ZN1BC2EPi(ptr {{[^,]*}} %this, ptr noundef %i)
+// CHECK: define{{.*}} void @_ZN1BC1EPi(ptr {{[^,]*}} %this, ptr noundef %i)
+// CHECK: define{{.*}} void @_ZN1BD2Ev(ptr {{[^,]*}} %this)
+// CHECK: define{{.*}} void @_ZN1BD1Ev(ptr {{[^,]*}} %this)

diff  --git a/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp b/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp
index 855d57ca713ac..bf67870e71fab 100644
--- a/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp
+++ b/clang/test/CodeGenCXX/cxx0x-delegating-ctors.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown -emit-llvm -fexceptions -fcxx-exceptions -std=c++11 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -fexceptions -fcxx-exceptions -std=c++11 -o - %s | FileCheck %s
 
 struct non_trivial {
   non_trivial();
@@ -65,8 +65,8 @@ namespace PR12890 {
   };
   X::X(int) : X() {}
 }
-// CHECK: define {{.*}} @_ZN7PR128901XC1Ei(%"class.PR12890::X"* {{[^,]*}} %this, i32 noundef %0)
-// CHECK: call void @llvm.memset.p0i8.{{i32|i64}}(i8* align 4 {{.*}}, i8 0, {{i32|i64}} 4, i1 false)
+// CHECK: define {{.*}} @_ZN7PR128901XC1Ei(ptr {{[^,]*}} %this, i32 noundef %0)
+// CHECK: call void @llvm.memset.p0.{{i32|i64}}(ptr align 4 {{.*}}, i8 0, {{i32|i64}} 4, i1 false)
 
 namespace PR14588 {
   void other();
@@ -89,7 +89,7 @@ namespace PR14588 {
     virtual void squawk() { other(); }
   };
 
-  // CHECK-LABEL: define{{.*}} void @_ZN7PR145883FooC1Ev(%"class.PR14588::Foo"*
+  // CHECK-LABEL: define{{.*}} void @_ZN7PR145883FooC1Ev(ptr
   // CHECK: call void @_ZN7PR145883FooC1EPKv(
   // CHECK: invoke void @_ZN7PR145885otherEv()
   // CHECK: call void @_ZN7PR145883FooD1Ev

diff  --git a/clang/test/CodeGenCXX/cxx0x-initializer-array.cpp b/clang/test/CodeGenCXX/cxx0x-initializer-array.cpp
index 3de1a1d0f6d0a..79b6df515a0ed 100644
--- a/clang/test/CodeGenCXX/cxx0x-initializer-array.cpp
+++ b/clang/test/CodeGenCXX/cxx0x-initializer-array.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown -std=c++11 -S -emit-llvm -o - %s -Wno-address-of-temporary | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -std=c++11 -S -emit-llvm -o - %s -Wno-address-of-temporary | FileCheck %s
 
 // CHECK: @[[THREE_NULL_MEMPTRS:.*]] = private constant [3 x i32] [i32 -1, i32 -1, i32 -1]
 
@@ -39,7 +39,7 @@ namespace ValueInitArrayOfMemPtr {
     // CHECK: store i32 -1,
 
     Agg2 b = { n };
-    // CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %{{.*}}, i8* align 4 bitcast ([3 x i32]* @[[THREE_NULL_MEMPTRS]] to i8*), i32 12, i1 false)
+    // CHECK: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %{{.*}}, ptr align 4 @[[THREE_NULL_MEMPTRS]], i32 12, i1 false)
   }
 
   // Test dynamic initialization.

diff  --git a/clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp b/clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp
index 702fdb113ada8..806c19f5dde88 100644
--- a/clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp
+++ b/clang/test/CodeGenCXX/cxx0x-initializer-constructors.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -S -triple x86_64-none-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -S -triple x86_64-none-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
 struct S {
   S(int x) { }
@@ -9,31 +9,31 @@ void fn1() {
   // CHECK-LABEL: define{{.*}} void @_Z3fn1v
   S s { 1 };
   // CHECK: alloca %struct.S, align 1
-  // CHECK: call void @_ZN1SC1Ei(%struct.S* {{[^,]*}} %s, i32 noundef 1)
+  // CHECK: call void @_ZN1SC1Ei(ptr {{[^,]*}} %s, i32 noundef 1)
 }
 
 void fn2() {
   // CHECK-LABEL: define{{.*}} void @_Z3fn2v
   S s { 1, 2.0, 3.0 };
   // CHECK: alloca %struct.S, align 1
-  // CHECK: call void @_ZN1SC1Eidd(%struct.S* {{[^,]*}} %s, i32 noundef 1, double noundef 2.000000e+00, double noundef 3.000000e+00)
+  // CHECK: call void @_ZN1SC1Eidd(ptr {{[^,]*}} %s, i32 noundef 1, double noundef 2.000000e+00, double noundef 3.000000e+00)
 }
 
 void fn3() {
   // CHECK-LABEL: define{{.*}} void @_Z3fn3v
   S sa[] { { 1 }, { 2 }, { 3 } };
   // CHECK: alloca [3 x %struct.S], align 1
-  // CHECK: call void @_ZN1SC1Ei(%struct.S* {{[^,]*}} %{{.+}}, i32 noundef 1)
-  // CHECK: call void @_ZN1SC1Ei(%struct.S* {{[^,]*}} %{{.+}}, i32 noundef 2)
-  // CHECK: call void @_ZN1SC1Ei(%struct.S* {{[^,]*}} %{{.+}}, i32 noundef 3)
+  // CHECK: call void @_ZN1SC1Ei(ptr {{[^,]*}} %{{.+}}, i32 noundef 1)
+  // CHECK: call void @_ZN1SC1Ei(ptr {{[^,]*}} %{{.+}}, i32 noundef 2)
+  // CHECK: call void @_ZN1SC1Ei(ptr {{[^,]*}} %{{.+}}, i32 noundef 3)
 }
 
 void fn4() {
   // CHECK-LABEL: define{{.*}} void @_Z3fn4v
   S sa[] { { 1, 2.0, 3.0 }, { 4, 5.0, 6.0 } };
   // CHECK: alloca [2 x %struct.S], align 1
-  // CHECK: call void @_ZN1SC1Eidd(%struct.S* {{[^,]*}} %{{.+}}, i32 noundef 1, double noundef 2.000000e+00, double noundef 3.000000e+00)
-  // CHECK: call void @_ZN1SC1Eidd(%struct.S* {{[^,]*}} %{{.+}}, i32 noundef 4, double noundef 5.000000e+00, double noundef 6.000000e+00)
+  // CHECK: call void @_ZN1SC1Eidd(ptr {{[^,]*}} %{{.+}}, i32 noundef 1, double noundef 2.000000e+00, double noundef 3.000000e+00)
+  // CHECK: call void @_ZN1SC1Eidd(ptr {{[^,]*}} %{{.+}}, i32 noundef 4, double noundef 5.000000e+00, double noundef 6.000000e+00)
 }
 
 namespace TreeTransformBracedInit {

diff  --git a/clang/test/CodeGenCXX/cxx11-exception-spec.cpp b/clang/test/CodeGenCXX/cxx11-exception-spec.cpp
index 4bac655f8628c..08de8868b4710 100644
--- a/clang/test/CodeGenCXX/cxx11-exception-spec.cpp
+++ b/clang/test/CodeGenCXX/cxx11-exception-spec.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -verify -fexceptions -fcxx-exceptions -triple x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -verify -fexceptions -fcxx-exceptions -triple x86_64-linux-gnu | FileCheck %s
 // expected-no-diagnostics
 
 void h();
@@ -13,7 +13,7 @@ template<typename T> struct S {
 
 // CHECK: define {{.*}} @_Z1fIsEvv() [[NONE:#[0-9]+]] {
 template<> void f<short>() { h(); }
-// CHECK: define {{.*}} @_Z1fIA2_sEvv() [[NUW:#[0-9]+]] personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+// CHECK: define {{.*}} @_Z1fIA2_sEvv() [[NUW:#[0-9]+]] personality ptr @__gxx_personality_v0 {
 template<> void f<short[2]>() noexcept { h(); }
 
 // CHECK: define {{.*}} @_ZN1SIsE1fEv()
@@ -24,7 +24,7 @@ template<> void S<short[2]>::f() noexcept { h(); }
 
 // CHECK: define {{.*}} @_Z1fIDsEvv() [[NONE]] comdat {
 template void f<char16_t>();
-// CHECK: define {{.*}} @_Z1fIA2_DsEvv() [[NUW]] comdat personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+// CHECK: define {{.*}} @_Z1fIA2_DsEvv() [[NUW]] comdat personality ptr @__gxx_personality_v0 {
 template void f<char16_t[2]>();
 
 // CHECK: define {{.*}} @_ZN1SIDsE1fEv()
@@ -34,7 +34,7 @@ template void S<char16_t>::f();
 template void S<char16_t[2]>::f();
 
 void h() {
-  // CHECK: define {{.*}} @_Z1fIiEvv() [[NUW]] comdat personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+  // CHECK: define {{.*}} @_Z1fIiEvv() [[NUW]] comdat personality ptr @__gxx_personality_v0 {
   f<int>();
   // CHECK: define {{.*}} @_Z1fIA2_iEvv() [[NONE]] comdat {
   f<int[2]>();
@@ -45,7 +45,7 @@ void h() {
   // CHECK-NOT: [[NUW]]
   S<int[2]>::f();
 
-  // CHECK: define {{.*}} @_Z1fIfEvv() [[NUW]] comdat  personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+  // CHECK: define {{.*}} @_Z1fIfEvv() [[NUW]] comdat  personality ptr @__gxx_personality_v0 {
   void (*f1)() = &f<float>;
   // CHECK: define {{.*}} @_Z1fIdEvv() [[NONE]] comdat {
   void (*f2)() = &f<double>;
@@ -56,7 +56,7 @@ void h() {
   // CHECK-NOT: [[NUW]]
   void (*f4)() = &S<double>::f;
 
-  // CHECK: define {{.*}} @_Z1fIA4_cEvv() [[NUW]] comdat personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) {
+  // CHECK: define {{.*}} @_Z1fIA4_cEvv() [[NUW]] comdat personality ptr @__gxx_personality_v0 {
   (void)&f<char[4]>;
   // CHECK: define {{.*}} @_Z1fIcEvv() [[NONE]] comdat {
   (void)&f<char>;

diff  --git a/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp b/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp
index 1d5143f1d3510..cd5a18f39060e 100644
--- a/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp
+++ b/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp
@@ -1,35 +1,35 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefixes=CHECK,LINUX_AIX %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple powerpc64-unknown-aix-xcoff | FileCheck --check-prefixes=CHECK,LINUX_AIX %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefixes=CHECK,LINUX_AIX %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple powerpc64-unknown-aix-xcoff | FileCheck --check-prefixes=CHECK,LINUX_AIX %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=CHECK --check-prefix=DARWIN %s
 
 int &f();
 
-// LINUX_AIX: @r ={{.*}} thread_local global i32* null
-// DARWIN: @r = internal thread_local global i32* null
+// LINUX_AIX: @r ={{.*}} thread_local global ptr null
+// DARWIN: @r = internal thread_local global ptr null
 thread_local int &r = f();
 
-// LINUX_AIX: @_ZTH1r ={{.*}} alias void (), void ()* @__tls_init
-// DARWIN: @_ZTH1r = internal alias void (), void ()* @__tls_init
+// LINUX_AIX: @_ZTH1r ={{.*}} alias void (), ptr @__tls_init
+// DARWIN: @_ZTH1r = internal alias void (), ptr @__tls_init
 
 int &g() { return r; }
 
 // CHECK: define {{.*}} @[[R_INIT:.*]]()
-// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i32* @_Z1fv()
-// CHECK: %[[R_ADDR:.+]] = call align 8 i32** @llvm.threadlocal.address.p0p0i32(i32** align 8 @r)
-// CHECK: store i32* %{{.*}}, i32** %[[R_ADDR]], align 8
+// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z1fv()
+// CHECK: %[[R_ADDR:.+]] = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @r)
+// CHECK: store ptr %{{.*}}, ptr %[[R_ADDR]], align 8
 
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i32* @_Z1gv()
-// LINUX_AIX: call i32* @_ZTW1r()
-// DARWIN: call cxx_fast_tlscc i32* @_ZTW1r()
-// CHECK: ret i32* %{{.*}}
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z1gv()
+// LINUX_AIX: call ptr @_ZTW1r()
+// DARWIN: call cxx_fast_tlscc ptr @_ZTW1r()
+// CHECK: ret ptr %{{.*}}
 
-// LINUX_AIX: define weak_odr hidden noundef i32* @_ZTW1r() [[ATTR0:#[0-9]+]]{{( comdat)?}} {
-// DARWIN: define cxx_fast_tlscc noundef i32* @_ZTW1r() [[ATTR1:#[0-9]+]] {
+// LINUX_AIX: define weak_odr hidden noundef ptr @_ZTW1r() [[ATTR0:#[0-9]+]]{{( comdat)?}} {
+// DARWIN: define cxx_fast_tlscc noundef ptr @_ZTW1r() [[ATTR1:#[0-9]+]] {
 // LINUX_AIX: call void @_ZTH1r()
 // DARWIN: call cxx_fast_tlscc void @_ZTH1r()
-// CHECK: %[[R_ADDR2:.+]] = call align 8 i32** @llvm.threadlocal.address.p0p0i32(i32** align 8 @r)
-// CHECK: load i32*, i32** %[[R_ADDR2]], align 8
-// CHECK: ret i32* %{{.*}}
+// CHECK: %[[R_ADDR2:.+]] = call align 8 ptr @llvm.threadlocal.address.p0(ptr align 8 @r)
+// CHECK: load ptr, ptr %[[R_ADDR2]], align 8
+// CHECK: ret ptr %{{.*}}
 
 // LINUX_AIX-LABEL: define internal void @__tls_init()
 // DARWIN-LABEL: define internal cxx_fast_tlscc void @__tls_init()

diff  --git a/clang/test/CodeGenCXX/cxx11-thread-local-visibility.cpp b/clang/test/CodeGenCXX/cxx11-thread-local-visibility.cpp
index 7d2276936b0b5..fb64f8068a848 100644
--- a/clang/test/CodeGenCXX/cxx11-thread-local-visibility.cpp
+++ b/clang/test/CodeGenCXX/cxx11-thread-local-visibility.cpp
@@ -1,18 +1,18 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefix=LINUX_AIX %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple powerpc64-unknown-aix-xcoff | FileCheck --check-prefix=LINUX_AIX %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=DARWIN %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-linux-gnu | FileCheck --check-prefix=LINUX_AIX %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple powerpc64-unknown-aix-xcoff | FileCheck --check-prefix=LINUX_AIX %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple x86_64-apple-darwin12 | FileCheck --check-prefix=DARWIN %s
 
 // Regression test for PR40327
 
 // LINUX_AIX: @default_tls ={{.*}} thread_local global i32
 // LINUX_AIX: @hidden_tls ={{( hidden)?}} thread_local global i32
-// LINUX_AIX: define weak_odr hidden noundef i32* @_ZTW11default_tls()
-// LINUX_AIX: define weak_odr hidden noundef i32* @_ZTW10hidden_tls()
+// LINUX_AIX: define weak_odr hidden noundef ptr @_ZTW11default_tls()
+// LINUX_AIX: define weak_odr hidden noundef ptr @_ZTW10hidden_tls()
 //
 // DARWIN: @default_tls = internal thread_local global i32
 // DARWIN: @hidden_tls = internal thread_local global i32
-// DARWIN: define cxx_fast_tlscc noundef i32* @_ZTW11default_tls()
-// DARWIN: define hidden cxx_fast_tlscc noundef i32* @_ZTW10hidden_tls()
+// DARWIN: define cxx_fast_tlscc noundef ptr @_ZTW11default_tls()
+// DARWIN: define hidden cxx_fast_tlscc noundef ptr @_ZTW10hidden_tls()
 
 __attribute__((visibility("default"))) thread_local int default_tls;
 __attribute__((visibility("hidden"))) thread_local int hidden_tls;

diff  --git a/clang/test/CodeGenCXX/cxx11-user-defined-literal.cpp b/clang/test/CodeGenCXX/cxx11-user-defined-literal.cpp
index 0360ec59c7955..c8ab43194350e 100644
--- a/clang/test/CodeGenCXX/cxx11-user-defined-literal.cpp
+++ b/clang/test/CodeGenCXX/cxx11-user-defined-literal.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s
 
 struct S { S(); ~S(); S(const S &); void operator()(int); };
 using size_t = decltype(sizeof(int));
@@ -16,8 +16,8 @@ template<char...Cs> S operator"" _t() { return S(); }
 // CHECK: @[[s_0xffffeeee:.*]] = {{.*}} constant [11 x i8] c"0xffffeeee\00"
 
 void f() {
-  // CHECK: call void @_Zli2_xPKcm({{.*}}, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_foo]], i64 0, i64 0), i64 noundef 3)
-  // CHECK: call void @_Zli2_xPKcm({{.*}}, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_bar]], i64 0, i64 0), i64 noundef 3)
+  // CHECK: call void @_Zli2_xPKcm({{.*}}, ptr noundef @[[s_foo]], i64 noundef 3)
+  // CHECK: call void @_Zli2_xPKcm({{.*}}, ptr noundef @[[s_bar]], i64 noundef 3)
   // CHECK: call void @_Zli2_yw({{.*}} 97)
   // CHECK: call void @_Zli2_zy({{.*}} 42)
   // CHECK: call void @_Zli2_fe({{.*}} x86_fp80 noundef 0xK3FFF8000000000000000)
@@ -28,9 +28,9 @@ void f() {
   // CHECK: call void @_ZN1SD1Ev({{.*}})
   "foo"_x, "bar"_x, L'a'_y, 42_z, 1.0_f;
 
-  // CHECK: call void @_Zli2_rPKc({{.*}}, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_123]], i64 0, i64 0))
-  // CHECK: call void @_Zli2_rPKc({{.*}}, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @[[s_4_9]], i64 0, i64 0))
-  // CHECK: call void @_Zli2_rPKc({{.*}}, i8* noundef getelementptr inbounds ([11 x i8], [11 x i8]* @[[s_0xffffeeee]], i64 0, i64 0))
+  // CHECK: call void @_Zli2_rPKc({{.*}}, ptr noundef @[[s_123]])
+  // CHECK: call void @_Zli2_rPKc({{.*}}, ptr noundef @[[s_4_9]])
+  // CHECK: call void @_Zli2_rPKc({{.*}}, ptr noundef @[[s_0xffffeeee]])
   // CHECK: call void @_ZN1SD1Ev({{.*}})
   // CHECK: call void @_ZN1SD1Ev({{.*}})
   // CHECK: call void @_ZN1SD1Ev({{.*}})
@@ -59,11 +59,11 @@ void h() {
 // CHECK:   call void @_Z1iIiEDTclclL_Zli2_xPKcmELA4_S0_ELi3EEfp_EET_(i32 noundef 42)
 
 // CHECK: define {{.*}} @_Z1gIiEDTclclL_Zli2_xPKcmELA4_S0_ELm3EEfp_EET_(i32
-// CHECK:   call void @_Zli2_xPKcm({{.*}}, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @{{.*}}, i64 0, i64 0), i64 noundef 3)
+// CHECK:   call void @_Zli2_xPKcm({{.*}}, ptr noundef @{{.*}}, i64 noundef 3)
 // CHECK:   call void @_ZN1SclEi
 // CHECK:   call void @_ZN1SD1Ev
 
 // CHECK: define {{.*}} @_Z1iIiEDTclclL_Zli2_xPKcmELA4_S0_ELi3EEfp_EET_(i32
-// CHECK:   call void @_Zli2_xPKcm({{.*}}, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @{{.*}}, i64 0, i64 0), i64 noundef 3)
+// CHECK:   call void @_Zli2_xPKcm({{.*}}, ptr noundef @{{.*}}, i64 noundef 3)
 // CHECK:   call void @_ZN1SclEi
 // CHECK:   call void @_ZN1SD1Ev

diff  --git a/clang/test/CodeGenCXX/cxx1y-init-captures-eh.cpp b/clang/test/CodeGenCXX/cxx1y-init-captures-eh.cpp
index 244ca55410ac9..fa419fd5f266c 100644
--- a/clang/test/CodeGenCXX/cxx1y-init-captures-eh.cpp
+++ b/clang/test/CodeGenCXX/cxx1y-init-captures-eh.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1y -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++1y -triple x86_64-linux-gnu -fexceptions -fcxx-exceptions -emit-llvm %s -o - | FileCheck %s
 
 struct S {
   S();
@@ -56,7 +56,7 @@ void h(bool b1, bool b2) {
 
   // lambda init: s and t, branch on b1
   // CHECK: call void @_ZN1SC1Ev(
-  // CHECK: store i1 true, i1* %[[S_ISACTIVE]], align 1
+  // CHECK: store i1 true, ptr %[[S_ISACTIVE]], align 1
   // CHECK: call void @_ZN1TC1Ev(
   // CHECK: br i1
 
@@ -65,7 +65,7 @@ void h(bool b1, bool b2) {
 
   // completion of lambda init, branch on b2
   // CHECK: store i32 42,
-  // CHECK: store i1 false, i1* %[[S_ISACTIVE]], align 1
+  // CHECK: store i1 false, ptr %[[S_ISACTIVE]], align 1
   // CHECK: br i1
 
   // throw 2
@@ -90,7 +90,7 @@ void h(bool b1, bool b2) {
 
   // common cleanup code
   // CHECK: call void @_ZN1TD1Ev(
-  // CHECK: load i1, i1* %[[S_ISACTIVE]],
+  // CHECK: load i1, ptr %[[S_ISACTIVE]],
   // CHECK: br i1
 
   // CHECK: call void @_ZN1SD1Ev(

diff  --git a/clang/test/CodeGenCXX/cxx1y-init-captures.cpp b/clang/test/CodeGenCXX/cxx1y-init-captures.cpp
index 91752a9e95ef9..358631ecb2062 100644
--- a/clang/test/CodeGenCXX/cxx1y-init-captures.cpp
+++ b/clang/test/CodeGenCXX/cxx1y-init-captures.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1y -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++1y -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s
 
 struct S {
   S();
@@ -25,16 +25,16 @@ void g() {
 
 // CHECK-LABEL: define{{.*}} void @_Z1gv(
 // CHECK: getelementptr inbounds {{.*}}, i32 0, i32 0
-// CHECK: store i32 1, i32*
+// CHECK: store i32 1, ptr
 // CHECK: getelementptr inbounds {{.*}}, i32 0, i32 1
-// CHECK: store i32 2, i32*
+// CHECK: store i32 2, ptr
 // CHECK: call noundef i32 @"_ZZ1gvENK3$_1clEv"(
 
 // CHECK-LABEL: define internal noundef i32 @"_ZZ1gvENK3$_1clEv"(
 // CHECK: getelementptr inbounds {{.*}}, i32 0, i32 0
-// CHECK: load i32, i32*
+// CHECK: load i32, ptr
 // CHECK: getelementptr inbounds {{.*}}, i32 0, i32 1
-// CHECK: load i32, i32*
+// CHECK: load i32, ptr
 
 // CHECK: add nsw i32
 
@@ -55,55 +55,55 @@ int h(int a) {
   // CHECK-LABEL: define{{.*}} i32 @_Z1hi(
   // CHECK: %[[A_ADDR:.*]] = alloca i32,
   // CHECK: %[[OUTER:.*]] = alloca
-  // CHECK: store i32 {{.*}}, i32* %[[A_ADDR]],
+  // CHECK: store i32 {{.*}}, ptr %[[A_ADDR]],
   //
   // Initialize init-capture 'b(a)' by reference.
-  // CHECK: getelementptr inbounds {{.*}}, {{.*}}* %[[OUTER]], i32 0, i32 0
-  // CHECK: store i32* %[[A_ADDR]], i32** {{.*}},
+  // CHECK: getelementptr inbounds {{.*}}, ptr %[[OUTER]], i32 0, i32 0
+  // CHECK: store ptr %[[A_ADDR]], ptr {{.*}},
   //
   // Initialize init-capture 'c(a)' by copy.
-  // CHECK: getelementptr inbounds {{.*}}, {{.*}}* %[[OUTER]], i32 0, i32 1
-  // CHECK: load i32, i32* %[[A_ADDR]],
+  // CHECK: getelementptr inbounds {{.*}}, ptr %[[OUTER]], i32 0, i32 1
+  // CHECK: load i32, ptr %[[A_ADDR]],
   // CHECK: store i32
   //
-  // CHECK: call noundef i32 @"_ZZ1hiENK3$_2clEv"({{.*}}* {{[^,]*}} %[[OUTER]])
+  // CHECK: call noundef i32 @"_ZZ1hiENK3$_2clEv"(ptr {{[^,]*}} %[[OUTER]])
   return [&b(a), c(a)] {
     // CHECK-LABEL: define internal noundef i32 @"_ZZ1hiENK3$_2clEv"(
     // CHECK: %[[OUTER_ADDR:.*]] = alloca
     // CHECK: %[[INNER:.*]] = alloca
-    // CHECK: store {{.*}}, {{.*}}** %[[OUTER_ADDR]],
+    // CHECK: store {{.*}}, ptr %[[OUTER_ADDR]],
     //
     // Capture outer 'c' by reference.
-    // CHECK: %[[OUTER:.*]] = load {{.*}}*, {{.*}}** %[[OUTER_ADDR]]
-    // CHECK: getelementptr inbounds {{.*}}, {{.*}}* %[[INNER]], i32 0, i32 0
-    // CHECK-NEXT: getelementptr inbounds {{.*}}, {{.*}}* %[[OUTER]], i32 0, i32 1
-    // CHECK-NEXT: store i32* %
+    // CHECK: %[[OUTER:.*]] = load ptr, ptr %[[OUTER_ADDR]]
+    // CHECK: getelementptr inbounds {{.*}}, ptr %[[INNER]], i32 0, i32 0
+    // CHECK-NEXT: getelementptr inbounds {{.*}}, ptr %[[OUTER]], i32 0, i32 1
+    // CHECK-NEXT: store ptr %
     //
     // Capture outer 'b' by copy.
-    // CHECK: getelementptr inbounds {{.*}}, {{.*}}* %[[INNER]], i32 0, i32 1
-    // CHECK-NEXT: getelementptr inbounds {{.*}}, {{.*}}* %[[OUTER]], i32 0, i32 0
-    // CHECK-NEXT: load i32*, i32** %
-    // CHECK-NEXT: load i32, i32* %
+    // CHECK: getelementptr inbounds {{.*}}, ptr %[[INNER]], i32 0, i32 1
+    // CHECK-NEXT: getelementptr inbounds {{.*}}, ptr %[[OUTER]], i32 0, i32 0
+    // CHECK-NEXT: load ptr, ptr %
+    // CHECK-NEXT: load i32, ptr %
     // CHECK-NEXT: store i32
     //
-    // CHECK: call noundef i32 @"_ZZZ1hiENK3$_2clEvENKUlvE_clEv"({{.*}}* {{[^,]*}} %[[INNER]])
+    // CHECK: call noundef i32 @"_ZZZ1hiENK3$_2clEvENKUlvE_clEv"(ptr {{[^,]*}} %[[INNER]])
     return [=, &c] {
       // CHECK-LABEL: define internal void @"_ZZ1fvEN3$_0D2Ev"(
       // CHECK: call void @_ZN1SD1Ev(
 
       // CHECK-LABEL: define internal noundef i32 @"_ZZZ1hiENK3$_2clEvENKUlvE_clEv"(
       // CHECK: %[[INNER_ADDR:.*]] = alloca
-      // CHECK: store {{.*}}, {{.*}}** %[[INNER_ADDR]],
-      // CHECK: %[[INNER:.*]] = load {{.*}}*, {{.*}}** %[[INNER_ADDR]]
+      // CHECK: store {{.*}}, ptr %[[INNER_ADDR]],
+      // CHECK: %[[INNER:.*]] = load ptr, ptr %[[INNER_ADDR]]
       //
       // Load capture of 'b'
-      // CHECK: getelementptr inbounds {{.*}}, {{.*}}* %[[INNER]], i32 0, i32 1
-      // CHECK: load i32, i32* %
+      // CHECK: getelementptr inbounds {{.*}}, ptr %[[INNER]], i32 0, i32 1
+      // CHECK: load i32, ptr %
       //
       // Load capture of 'c'
-      // CHECK: getelementptr inbounds {{.*}}, {{.*}}* %[[INNER]], i32 0, i32 0
-      // CHECK: load i32*, i32** %
-      // CHECK: load i32, i32* %
+      // CHECK: getelementptr inbounds {{.*}}, ptr %[[INNER]], i32 0, i32 0
+      // CHECK: load ptr, ptr %
+      // CHECK: load i32, ptr %
       //
       // CHECK: add nsw i32
       return b + c;

diff  --git a/clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp b/clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp
index 325511b6d0b03..4e15657251525 100644
--- a/clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp
+++ b/clang/test/CodeGenCXX/cxx1y-sized-deallocation.cpp
@@ -1,12 +1,12 @@
 // Check that delete exprs call the sized deallocation function if
 // -fsized-deallocation is passed in both C++11 and C++14.
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fsized-deallocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -fsized-deallocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fsized-deallocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -fsized-deallocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s
 
 // Check that we don't used sized deallocation without -fsized-deallocation and
 // C++14.
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefix=CHECK-UNSIZED
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefix=CHECK-UNSIZED
+// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefix=CHECK-UNSIZED
+// RUN: %clang_cc1 -std=c++14 %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefix=CHECK-UNSIZED
 
 // CHECK-UNSIZED-NOT: _ZdlPvm
 // CHECK-UNSIZED-NOT: _ZdaPvm
@@ -50,65 +50,65 @@ template void del<F>();
 D::D() {}
 
 // CHECK-LABEL: define weak_odr void @_Z3delIiEvv()
-// CHECK: call void @_ZdlPvm(i8* noundef %{{[^ ]*}}, i64 noundef 4)
-// CHECK: call void @_ZdaPv(i8* noundef %{{[^ ]*}})
+// CHECK: call void @_ZdlPvm(ptr noundef %{{[^ ]*}}, i64 noundef 4)
+// CHECK: call void @_ZdaPv(ptr noundef %{{[^ ]*}})
 //
-// CHECK: call void @_ZdlPvm(i8* noundef %{{[^ ]*}}, i64 noundef 4)
-// CHECK: call void @_ZdaPv(i8* noundef %{{[^ ]*}})
+// CHECK: call void @_ZdlPvm(ptr noundef %{{[^ ]*}}, i64 noundef 4)
+// CHECK: call void @_ZdaPv(ptr noundef %{{[^ ]*}})
 
-// CHECK-LABEL: declare void @_ZdlPvm(i8*
+// CHECK-LABEL: declare void @_ZdlPvm(ptr
 
 // CHECK-LABEL: define weak_odr void @_Z3delI1BEvv()
-// CHECK: call void @_ZdlPvm(i8* noundef %{{[^ ]*}}, i64 noundef 4)
-// CHECK: call void @_ZdaPv(i8* noundef %{{[^ ]*}})
+// CHECK: call void @_ZdlPvm(ptr noundef %{{[^ ]*}}, i64 noundef 4)
+// CHECK: call void @_ZdaPv(ptr noundef %{{[^ ]*}})
 //
-// CHECK: call void @_ZdlPvm(i8* noundef %{{[^ ]*}}, i64 noundef 4)
-// CHECK: call void @_ZdaPv(i8* noundef %{{[^ ]*}})
+// CHECK: call void @_ZdlPvm(ptr noundef %{{[^ ]*}}, i64 noundef 4)
+// CHECK: call void @_ZdaPv(ptr noundef %{{[^ ]*}})
 
 // CHECK-LABEL: define weak_odr void @_Z3delI1CEvv()
-// CHECK: call void @_ZdlPvm(i8* noundef %{{[^ ]*}}, i64 noundef 1)
+// CHECK: call void @_ZdlPvm(ptr noundef %{{[^ ]*}}, i64 noundef 1)
 // CHECK: mul i64 1, %{{[^ ]*}}
 // CHECK: add i64 %{{[^ ]*}}, 8
-// CHECK: call void @_ZdaPvm(i8* noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
+// CHECK: call void @_ZdaPvm(ptr noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
 //
-// CHECK: call void @_ZdlPvm(i8* noundef %{{[^ ]*}}, i64 noundef 1)
+// CHECK: call void @_ZdlPvm(ptr noundef %{{[^ ]*}}, i64 noundef 1)
 // CHECK: mul i64 1, %{{[^ ]*}}
 // CHECK: add i64 %{{[^ ]*}}, 8
-// CHECK: call void @_ZdaPvm(i8* noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
+// CHECK: call void @_ZdaPvm(ptr noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
 
-// CHECK-LABEL: declare void @_ZdaPvm(i8*
+// CHECK-LABEL: declare void @_ZdaPvm(ptr
 
 // CHECK-LABEL: define weak_odr void @_Z3delI1DEvv()
-// CHECK: call void @_ZdlPvm(i8* noundef %{{[^ ]*}}, i64 noundef 8)
+// CHECK: call void @_ZdlPvm(ptr noundef %{{[^ ]*}}, i64 noundef 8)
 // CHECK: mul i64 8, %{{[^ ]*}}
 // CHECK: add i64 %{{[^ ]*}}, 8
-// CHECK: call void @_ZdaPvm(i8* noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
+// CHECK: call void @_ZdaPvm(ptr noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
 //
 // CHECK-NOT: Zdl
 // CHECK: call void %{{.*}}
 // CHECK-NOT: Zdl
 // CHECK: mul i64 8, %{{[^ ]*}}
 // CHECK: add i64 %{{[^ ]*}}, 8
-// CHECK: call void @_ZdaPvm(i8* noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
+// CHECK: call void @_ZdaPvm(ptr noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
 
 // CHECK-LABEL: define weak_odr void @_Z3delI1EEvv()
-// CHECK: call void @_ZdlPvm(i8* noundef %{{[^ ]*}}, i64 noundef 1)
-// CHECK: call void @_ZdaPv(i8* noundef %{{[^ ]*}})
+// CHECK: call void @_ZdlPvm(ptr noundef %{{[^ ]*}}, i64 noundef 1)
+// CHECK: call void @_ZdaPv(ptr noundef %{{[^ ]*}})
 //
-// CHECK: call void @_ZN1EdlEPv(i8* noundef %{{[^ ]*}})
-// CHECK: call void @_ZN1EdaEPv(i8* noundef %{{[^ ]*}})
+// CHECK: call void @_ZN1EdlEPv(ptr noundef %{{[^ ]*}})
+// CHECK: call void @_ZN1EdaEPv(ptr noundef %{{[^ ]*}})
 
 // CHECK-LABEL: define weak_odr void @_Z3delI1FEvv()
-// CHECK: call void @_ZdlPvm(i8* noundef %{{[^ ]*}}, i64 noundef 1)
+// CHECK: call void @_ZdlPvm(ptr noundef %{{[^ ]*}}, i64 noundef 1)
 // CHECK: mul i64 1, %{{[^ ]*}}
 // CHECK: add i64 %{{[^ ]*}}, 8
-// CHECK: call void @_ZdaPvm(i8* noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
+// CHECK: call void @_ZdaPvm(ptr noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
 //
-// CHECK: call void @_ZN1FdlEPvm(i8* noundef %{{[^ ]*}}, i64 noundef 1)
+// CHECK: call void @_ZN1FdlEPvm(ptr noundef %{{[^ ]*}}, i64 noundef 1)
 // CHECK: mul i64 1, %{{[^ ]*}}
 // CHECK: add i64 %{{[^ ]*}}, 8
-// CHECK: call void @_ZN1FdaEPvm(i8* noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
+// CHECK: call void @_ZN1FdaEPvm(ptr noundef %{{[^ ]*}}, i64 noundef %{{[^ ]*}})
 
 
-// CHECK-LABEL: define linkonce_odr void @_ZN1DD0Ev(%{{[^ ]*}}* {{[^,]*}} %this)
-// CHECK: call void @_ZdlPvm(i8* noundef %{{[^ ]*}}, i64 noundef 8)
+// CHECK-LABEL: define linkonce_odr void @_ZN1DD0Ev(ptr {{[^,]*}} %this)
+// CHECK: call void @_ZdlPvm(ptr noundef %{{[^ ]*}}, i64 noundef 8)

diff  --git a/clang/test/CodeGenCXX/cxx1y-variable-template-linkage.cpp b/clang/test/CodeGenCXX/cxx1y-variable-template-linkage.cpp
index e34e0ceef37c9..ac542870f1f4b 100644
--- a/clang/test/CodeGenCXX/cxx1y-variable-template-linkage.cpp
+++ b/clang/test/CodeGenCXX/cxx1y-variable-template-linkage.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -emit-llvm -std=c++1y -O1 -disable-llvm-passes %s -o - | FileCheck %s -check-prefix=CHECKA -check-prefix=CHECK
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -emit-llvm -std=c++1y -O1 -disable-llvm-passes -fcxx-exceptions %s -o - | FileCheck %s -check-prefix=CHECKB -check-prefix=CHECK
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -std=c++1y -O1 -disable-llvm-passes %s -o - | FileCheck %s -check-prefix=CHECKA -check-prefix=CHECK
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -std=c++1y -O1 -disable-llvm-passes -fcxx-exceptions %s -o - | FileCheck %s -check-prefix=CHECKB -check-prefix=CHECK
 // expected-no-diagnostics
 
 // The variable template specialization x<Foo> generated in each file
@@ -25,7 +25,7 @@ template <typename T> T t = 42;
 
 int mode;
 
-// CHECK-DAG: define internal noundef nonnull align 4 dereferenceable(4) i32* @_ZL3foov(
+// CHECK-DAG: define internal noundef nonnull align 4 dereferenceable(4) ptr @_ZL3foov(
 static const int &foo() {
    struct Foo { };
 
@@ -59,20 +59,20 @@ static const int &foo() {
 
 
 #if !__has_feature(cxx_exceptions) // File A
-// CHECKA-DAG: define{{.*}} nonnull align 4 dereferenceable(4) i32* @_Z3barv(
+// CHECKA-DAG: define{{.*}} nonnull align 4 dereferenceable(4) ptr @_Z3barv(
 const int &bar() {
-	// CHECKA-DAG: call noundef nonnull align 4 dereferenceable(4) i32* @_ZL3foov()
+	// CHECKA-DAG: call noundef nonnull align 4 dereferenceable(4) ptr @_ZL3foov()
 	return foo();
 }
 
 #else // File B
 
-// CHECKB-DAG: declare noundef nonnull align 4 dereferenceable(4) i32* @_Z3barv(
+// CHECKB-DAG: declare noundef nonnull align 4 dereferenceable(4) ptr @_Z3barv(
 const int &bar();
 
 int main() {
-	// CHECKB-DAG: call noundef nonnull align 4 dereferenceable(4) i32* @_Z3barv()
-	// CHECKB-DAG: call noundef nonnull align 4 dereferenceable(4) i32* @_ZL3foov()
+	// CHECKB-DAG: call noundef nonnull align 4 dereferenceable(4) ptr @_Z3barv()
+	// CHECKB-DAG: call noundef nonnull align 4 dereferenceable(4) ptr @_ZL3foov()
 	&bar() == &foo() ? throw 0 : (void)0; // Should not throw exception at runtime.
 }
 

diff  --git a/clang/test/CodeGenCXX/cxx1y-variable-template.cpp b/clang/test/CodeGenCXX/cxx1y-variable-template.cpp
index 23f475ed44e64..4e9e3c0fd4d76 100644
--- a/clang/test/CodeGenCXX/cxx1y-variable-template.cpp
+++ b/clang/test/CodeGenCXX/cxx1y-variable-template.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1y -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++1y -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
 // Check that we keep the 'extern' when we instantiate the definition of this
 // variable template specialization.
@@ -41,8 +41,8 @@ namespace PR42111 {
   // CHECK: icmp eq i8 {{.*}}, 0
   // CHECK: br i1
   // CHECK: call noundef i32 @_ZN7PR421111fEv(
-  // CHECK: [[N_ADDR:%.+]] = call align 4 i32* @llvm.threadlocal.address.p0i32(i32* align 4 @_ZN7PR4211112_GLOBAL__N_11nILi0EEE)
-  // CHECK: store i32 {{.*}}, i32* [[N_ADDR]]
-  // CHECK: store i8 1, i8* @_ZGVN7PR4211112_GLOBAL__N_11nILi0EEE
+  // CHECK: [[N_ADDR:%.+]] = call align 4 ptr @llvm.threadlocal.address.p0(ptr align 4 @_ZN7PR4211112_GLOBAL__N_11nILi0EEE)
+  // CHECK: store i32 {{.*}}, ptr [[N_ADDR]]
+  // CHECK: store i8 1, ptr @_ZGVN7PR4211112_GLOBAL__N_11nILi0EEE
   int g() { return n<> + n<>; }
 }

diff  --git a/clang/test/CodeGenCXX/cxx1z-aligned-allocation.cpp b/clang/test/CodeGenCXX/cxx1z-aligned-allocation.cpp
index c3a8cd2207e2d..ab2e4b3cdbbf9 100644
--- a/clang/test/CodeGenCXX/cxx1z-aligned-allocation.cpp
+++ b/clang/test/CodeGenCXX/cxx1z-aligned-allocation.cpp
@@ -1,14 +1,14 @@
 // Check that delete exprs call aligned (de)allocation functions if
 // -faligned-allocation is passed in both C++11 and C++14.
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fexceptions -fsized-deallocation -faligned-allocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -fexceptions -fsized-deallocation -faligned-allocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1z -fexceptions -fsized-deallocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fexceptions -fsized-deallocation -faligned-allocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++14 -fexceptions -fsized-deallocation -faligned-allocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++1z -fexceptions -fsized-deallocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s
 
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1z -fexceptions -fsized-deallocation %s -emit-llvm -triple x86_64-windows-msvc -o - | FileCheck %s --check-prefix=CHECK-MS
+// RUN: %clang_cc1 -std=c++1z -fexceptions -fsized-deallocation %s -emit-llvm -triple x86_64-windows-msvc -o - | FileCheck %s --check-prefix=CHECK-MS
 
 // Check that we don't used aligned (de)allocation without -faligned-allocation or C++1z.
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++14 -DUNALIGNED -fexceptions %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefix=CHECK-UNALIGNED
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1z -DUNALIGNED -fexceptions -fno-aligned-allocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefix=CHECK-UNALIGNED
+// RUN: %clang_cc1 -std=c++14 -DUNALIGNED -fexceptions %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefix=CHECK-UNALIGNED
+// RUN: %clang_cc1 -std=c++1z -DUNALIGNED -fexceptions -fno-aligned-allocation %s -emit-llvm -triple x86_64-linux-gnu -o - | FileCheck %s --check-prefix=CHECK-UNALIGNED
 
 // CHECK-UNALIGNED-NOT: _Znwm_St11align_val_t
 // CHECK-UNALIGNED-NOT: _Znam_St11align_val_t
@@ -27,38 +27,38 @@ namespace std { enum class align_val_t : size_t {}; }
 struct OVERALIGNED A { A(); int n[128]; };
 
 // CHECK-LABEL: define {{.*}} @_Z2a0v()
-// CHECK: %[[ALLOC:.*]] = call noalias noundef nonnull align 32 i8* @_ZnwmSt11align_val_t(i64 noundef 512, i64 noundef 32)
-// CHECK: call void @_ZdlPvSt11align_val_t(i8* noundef %[[ALLOC]], i64 noundef 32)
+// CHECK: %[[ALLOC:.*]] = call noalias noundef nonnull align 32 ptr @_ZnwmSt11align_val_t(i64 noundef 512, i64 noundef 32)
+// CHECK: call void @_ZdlPvSt11align_val_t(ptr noundef %[[ALLOC]], i64 noundef 32)
 // CHECK-MS-LABEL: define {{.*}} @"?a0@@YAPEAXXZ"()
-// CHECK-MS: %[[ALLOC:.*]] = call noalias noundef nonnull align 32 i8* @"??2 at YAPEAX_KW4align_val_t@std@@@Z"(i64 noundef 512, i64 noundef 32)
+// CHECK-MS: %[[ALLOC:.*]] = call noalias noundef nonnull align 32 ptr @"??2 at YAPEAX_KW4align_val_t@std@@@Z"(i64 noundef 512, i64 noundef 32)
 // CHECK-MS: cleanuppad
-// CHECK-MS: call void @"??3 at YAXPEAXW4align_val_t@std@@@Z"(i8* noundef %[[ALLOC]], i64 noundef 32)
+// CHECK-MS: call void @"??3 at YAXPEAXW4align_val_t@std@@@Z"(ptr noundef %[[ALLOC]], i64 noundef 32)
 void *a0() { return new A; }
 
 // FIXME: Why don't we call the sized array deallocation overload in this case?
 // The size is known.
 //
 // CHECK-LABEL: define {{.*}} @_Z2a1l(
-// CHECK: %[[ALLOC:.*]] = call noalias noundef nonnull align 32 i8* @_ZnamSt11align_val_t(i64 noundef %{{.*}}, i64 noundef 32)
+// CHECK: %[[ALLOC:.*]] = call noalias noundef nonnull align 32 ptr @_ZnamSt11align_val_t(i64 noundef %{{.*}}, i64 noundef 32)
 // No array cookie.
 // CHECK-NOT: store
 // CHECK: invoke void @_ZN1AC1Ev(
-// CHECK: call void @_ZdaPvSt11align_val_t(i8* noundef %[[ALLOC]], i64 noundef 32)
+// CHECK: call void @_ZdaPvSt11align_val_t(ptr noundef %[[ALLOC]], i64 noundef 32)
 // CHECK-MS-LABEL: define {{.*}} @"?a1@@YAPEAXJ at Z"(
-// CHECK-MS: %[[ALLOC:.*]] = call noalias noundef nonnull align 32 i8* @"??_U at YAPEAX_KW4align_val_t@std@@@Z"(i64 noundef %{{.*}}, i64 noundef 32)
+// CHECK-MS: %[[ALLOC:.*]] = call noalias noundef nonnull align 32 ptr @"??_U at YAPEAX_KW4align_val_t@std@@@Z"(i64 noundef %{{.*}}, i64 noundef 32)
 // No array cookie.
 // CHECK-MS-NOT: store
-// CHECK-MS: invoke noundef %struct.A* @"??0A@@QEAA at XZ"(
+// CHECK-MS: invoke noundef ptr @"??0A@@QEAA at XZ"(
 // CHECK-MS: cleanuppad
-// CHECK-MS: call void @"??_V at YAXPEAXW4align_val_t@std@@@Z"(i8* noundef %[[ALLOC]], i64 noundef 32)
+// CHECK-MS: call void @"??_V at YAXPEAXW4align_val_t@std@@@Z"(ptr noundef %[[ALLOC]], i64 noundef 32)
 void *a1(long n) { return new A[n]; }
 
 // CHECK-LABEL: define {{.*}} @_Z2a2P1A(
-// CHECK: call void @_ZdlPvmSt11align_val_t(i8* noundef %{{.*}}, i64 noundef 512, i64 noundef 32) #9
+// CHECK: call void @_ZdlPvmSt11align_val_t(ptr noundef %{{.*}}, i64 noundef 512, i64 noundef 32) #9
 void a2(A *p) { delete p; }
 
 // CHECK-LABEL: define {{.*}} @_Z2a3P1A(
-// CHECK: call void @_ZdaPvSt11align_val_t(i8* noundef %{{.*}}, i64 noundef 32) #9
+// CHECK: call void @_ZdaPvSt11align_val_t(ptr noundef %{{.*}}, i64 noundef 32) #9
 void a3(A *p) { delete[] p; }
 
 
@@ -79,24 +79,24 @@ struct OVERALIGNED B {
 };
 
 // CHECK-LABEL: define {{.*}} @_Z2b0v()
-// CHECK: %[[ALLOC:.*]] = call noundef i8* @_ZN1BnwEmSt11align_val_t(i64 noundef 512, i64 noundef 32)
-// CHECK: call void @_ZN1BdlEPvSt11align_val_t(i8* noundef %[[ALLOC]], i64 noundef 32)
+// CHECK: %[[ALLOC:.*]] = call noundef ptr @_ZN1BnwEmSt11align_val_t(i64 noundef 512, i64 noundef 32)
+// CHECK: call void @_ZN1BdlEPvSt11align_val_t(ptr noundef %[[ALLOC]], i64 noundef 32)
 void *b0() { return new B; }
 
 // CHECK-LABEL: define {{.*}} @_Z2b1l(
-// CHECK: %[[ALLOC:.*]] = call noalias noundef nonnull align 32 i8* @_ZnamSt11align_val_t(i64 noundef %{{.*}}, i64 noundef 32)
+// CHECK: %[[ALLOC:.*]] = call noalias noundef nonnull align 32 ptr @_ZnamSt11align_val_t(i64 noundef %{{.*}}, i64 noundef 32)
 // No array cookie.
 // CHECK-NOT: store
 // CHECK: invoke void @_ZN1BC1Ev(
-// CHECK: call void @_ZN1BdaEPvSt11align_val_t(i8* noundef %[[ALLOC]], i64 noundef 32)
+// CHECK: call void @_ZN1BdaEPvSt11align_val_t(ptr noundef %[[ALLOC]], i64 noundef 32)
 void *b1(long n) { return new B[n]; }
 
 // CHECK-LABEL: define {{.*}} @_Z2b2P1B(
-// CHECK: call void @_ZN1BdlEPvSt11align_val_t(i8* noundef %{{.*}}, i64 noundef 32)
+// CHECK: call void @_ZN1BdlEPvSt11align_val_t(ptr noundef %{{.*}}, i64 noundef 32)
 void b2(B *p) { delete p; }
 
 // CHECK-LABEL: define {{.*}} @_Z2b3P1B(
-// CHECK: call void @_ZN1BdaEPvSt11align_val_t(i8* noundef %{{.*}}, i64 noundef 32)
+// CHECK: call void @_ZN1BdaEPvSt11align_val_t(ptr noundef %{{.*}}, i64 noundef 32)
 void b3(B *p) { delete[] p; }
 
 struct OVERALIGNED C {
@@ -113,7 +113,7 @@ struct OVERALIGNED C {
 // CHECK-LABEL: define {{.*}} @_Z2b4l(
 // CHECK: call {{.*}} @llvm.umul.with.overflow{{.*}}i64 32
 // CHECK: call {{.*}} @llvm.uadd.with.overflow{{.*}}i64 32
-// CHECK: %[[ALLOC:.*]] = call noundef i8* @_ZN1CnaEmSt11align_val_t(i64 noundef %{{.*}}, i64 noundef 32)
+// CHECK: %[[ALLOC:.*]] = call noundef ptr @_ZN1CnaEmSt11align_val_t(i64 noundef %{{.*}}, i64 noundef 32)
 // CHECK: store
 // CHECK: call void @_ZN1CC1Ev(
 //
@@ -142,8 +142,8 @@ void operator delete(void*, Q);
 void operator delete(void*, std::align_val_t, Q);
 
 // CHECK-LABEL: define {{.*}} @_Z2c0v(
-// CHECK: %[[ALLOC:.*]] = call noundef i8* @_ZnwmSt11align_val_t1Q(i64 noundef 512, i64 noundef 32, i32 %
-// CHECK: call void @_ZdlPvSt11align_val_t1Q(i8* noundef %[[ALLOC]], i64 noundef 32, i32 %
+// CHECK: %[[ALLOC:.*]] = call noundef ptr @_ZnwmSt11align_val_t1Q(i64 noundef 512, i64 noundef 32, i32 %
+// CHECK: call void @_ZdlPvSt11align_val_t1Q(ptr noundef %[[ALLOC]], i64 noundef 32, i32 %
 void *c0() { return new (q) A; }
 
 
@@ -159,8 +159,8 @@ struct OVERALIGNED D {
 };
 
 // CHECK-LABEL: define {{.*}} @_Z2d0v(
-// CHECK: %[[ALLOC:.*]] = call noundef i8* @_ZN1DnwEmSt11align_val_t1Q(i64 noundef 32, i64 noundef 32, i32 %
-// CHECK: call void @_ZN1DdlEPvSt11align_val_t1Q(i8* noundef %[[ALLOC]], i64 noundef 32, i32 %
+// CHECK: %[[ALLOC:.*]] = call noundef ptr @_ZN1DnwEmSt11align_val_t1Q(i64 noundef 32, i64 noundef 32, i32 %
+// CHECK: call void @_ZN1DdlEPvSt11align_val_t1Q(ptr noundef %[[ALLOC]], i64 noundef 32, i32 %
 void *d0() { return new (q) D; }
 
 
@@ -169,13 +169,13 @@ void *d0() { return new (q) D; }
 
 #ifndef UNALIGNED
 // CHECK-LABEL: define {{.*}} @_Z2e0v(
-// CHECK: %[[ALLOC:.*]] = call noalias noundef nonnull align 4 i8* @_ZnwmSt11align_val_t(i64 noundef 512, i64 noundef 4)
-// CHECK: call void @_ZdlPvSt11align_val_t(i8* noundef %[[ALLOC]], i64 noundef 4)
+// CHECK: %[[ALLOC:.*]] = call noalias noundef nonnull align 4 ptr @_ZnwmSt11align_val_t(i64 noundef 512, i64 noundef 4)
+// CHECK: call void @_ZdlPvSt11align_val_t(ptr noundef %[[ALLOC]], i64 noundef 4)
 void *e0() { return new (std::align_val_t(4)) A; }
 
 // CHECK-LABEL: define {{.*}} @_Z2e1v(
-// CHECK: %[[ALLOC:.*]] = call noundef i8* @_ZN1BnwEmSt11align_val_t(i64 noundef 512, i64 noundef 4)
-// CHECK: call void @_ZN1BdlEPvSt11align_val_t(i8* noundef %[[ALLOC]], i64 noundef 4)
+// CHECK: %[[ALLOC:.*]] = call noundef ptr @_ZN1BnwEmSt11align_val_t(i64 noundef 512, i64 noundef 4)
+// CHECK: call void @_ZN1BdlEPvSt11align_val_t(ptr noundef %[[ALLOC]], i64 noundef 4)
 void *e1() { return new (std::align_val_t(4)) B; }
 #endif
 
@@ -190,17 +190,17 @@ struct OVERALIGNED F {
 };
 
 // CHECK-LABEL: define {{.*}} @_Z2f0v(
-// CHECK: %[[ALLOC:.*]] = call noundef i8* (i64, ...) @_ZN1FnwEmz(i64 noundef 512, i64 noundef 32)
+// CHECK: %[[ALLOC:.*]] = call noundef ptr (i64, ...) @_ZN1FnwEmz(i64 noundef 512, i64 noundef 32)
 // Non-placement allocation function, uses normal deallocation lookup which
 // cares about whether a parameter has type std::align_val_t.
-// CHECK: call void (i8*, ...) @_ZN1FdlEPvz(i8* noundef %[[ALLOC]])
+// CHECK: call void (ptr, ...) @_ZN1FdlEPvz(ptr noundef %[[ALLOC]])
 void *f0() { return new F; }
 
 // CHECK-LABEL: define {{.*}} @_Z2f1v(
-// CHECK: %[[ALLOC:.*]] = call noundef i8* (i64, ...) @_ZN1FnwEmz(i64 noundef 512, i64 noundef 32, i32 %
+// CHECK: %[[ALLOC:.*]] = call noundef ptr (i64, ...) @_ZN1FnwEmz(i64 noundef 512, i64 noundef 32, i32 %
 // Placement allocation function, uses placement deallocation matching, which
 // passes same arguments and therefore includes alignment.
-// CHECK: call void (i8*, ...) @_ZN1FdlEPvz(i8* noundef %[[ALLOC]], i64 noundef 32, i32 %
+// CHECK: call void (ptr, ...) @_ZN1FdlEPvz(ptr noundef %[[ALLOC]], i64 noundef 32, i32 %
 void *f1() { return new (q) F; }
 
 struct OVERALIGNED G {
@@ -211,12 +211,12 @@ struct OVERALIGNED G {
 };
 #ifndef UNALIGNED
 // CHECK-LABEL: define {{.*}} @_Z2g0v
-// CHECK: %[[ALLOC:.*]] = call noundef i8* (i64, i64, ...) @_ZN1GnwEmSt11align_val_tz(i64 noundef 512, i64 noundef 32)
-// CHECK: call void (i8*, i64, ...) @_ZN1GdlEPvSt11align_val_tz(i8* noundef %[[ALLOC]], i64 noundef 32)
+// CHECK: %[[ALLOC:.*]] = call noundef ptr (i64, i64, ...) @_ZN1GnwEmSt11align_val_tz(i64 noundef 512, i64 noundef 32)
+// CHECK: call void (ptr, i64, ...) @_ZN1GdlEPvSt11align_val_tz(ptr noundef %[[ALLOC]], i64 noundef 32)
 void *g0() { return new G; }
 
 // CHECK-LABEL: define {{.*}} @_Z2g1v
-// CHECK: %[[ALLOC:.*]] = call noundef i8* (i64, i64, ...) @_ZN1GnwEmSt11align_val_tz(i64 noundef 512, i64 noundef 32, i32 %
-// CHECK: call void (i8*, i64, ...) @_ZN1GdlEPvSt11align_val_tz(i8* noundef %[[ALLOC]], i64 noundef 32, i32 %
+// CHECK: %[[ALLOC:.*]] = call noundef ptr (i64, i64, ...) @_ZN1GnwEmSt11align_val_tz(i64 noundef 512, i64 noundef 32, i32 %
+// CHECK: call void (ptr, i64, ...) @_ZN1GdlEPvSt11align_val_tz(ptr noundef %[[ALLOC]], i64 noundef 32, i32 %
 void *g1() { return new (q) G; }
 #endif

diff  --git a/clang/test/CodeGenCXX/cxx1z-init-statement.cpp b/clang/test/CodeGenCXX/cxx1z-init-statement.cpp
index 5c74e051c7ea0..7604541cbbd92 100644
--- a/clang/test/CodeGenCXX/cxx1z-init-statement.cpp
+++ b/clang/test/CodeGenCXX/cxx1z-init-statement.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1z -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
+// RUN: %clang_cc1 -std=c++1z -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
 
 typedef int T;
 void f() {
   // CHECK:      %[[A:.*]] = alloca i32, align 4
-  // CHECK-NEXT: store i32 5, i32* %[[A]], align 4
-  // CHECK-NEXT: %[[B:.*]] = load i32, i32* %[[A]], align 4
+  // CHECK-NEXT: store i32 5, ptr %[[A]], align 4
+  // CHECK-NEXT: %[[B:.*]] = load i32, ptr %[[A]], align 4
   // CHECK-NEXT: %[[C:.*]] = icmp slt i32 %[[B]], 8
   if (int a = 5; a < 8)
     ;
@@ -14,8 +14,8 @@ void f1() {
   // CHECK:      %[[A:.*]] = alloca i32, align 4
   // CHECK-NEXT: %[[B:.*]] = alloca i32, align 4
   // CHECK-NEXT: %[[C:.*]] = alloca i32, align 4
-  // CHECK-NEXT: store i32 5, i32* %[[B]], align 4
-  // CHECK-NEXT: store i32 7, i32* %[[C]], align 4
+  // CHECK-NEXT: store i32 5, ptr %[[B]], align 4
+  // CHECK-NEXT: store i32 7, ptr %[[C]], align 4
   if (int a, b = 5; int c = 7)
     ;
 }
@@ -23,8 +23,8 @@ void f1() {
 int f2() {
   // CHECK:      %[[A:.*]] = alloca i32, align 4
   // CHECK-NEXT: %[[B:.*]] = call noundef i32 @_Z2f2v()
-  // CHECK-NEXT: store i32 7, i32* %[[A]], align 4
-  // CHECK-NEXT: %[[C:.*]] = load i32, i32* %[[A]], align 4
+  // CHECK-NEXT: store i32 7, ptr %[[A]], align 4
+  // CHECK-NEXT: %[[C:.*]] = load i32, ptr %[[A]], align 4
   // CHECK-NEXT: %[[D:.*]] = icmp ne i32 %[[C]], 0
   if (T{f2()}; int c = 7)
     ;
@@ -33,8 +33,8 @@ int f2() {
 
 void g() {
   // CHECK:      %[[A:.*]] = alloca i32, align 4
-  // CHECK-NEXT: store i32 5, i32* %[[A]], align 4
-  // CHECK-NEXT: %[[B:.*]] = load i32, i32* %[[A]], align 4
+  // CHECK-NEXT: store i32 5, ptr %[[A]], align 4
+  // CHECK-NEXT: %[[B:.*]] = load i32, ptr %[[A]], align 4
   // CHECK-NEXT: switch i32 %[[B]], label %[[C:.*]] [
   switch (int a = 5; a) {
     case 0:
@@ -46,9 +46,9 @@ void g1() {
   // CHECK:      %[[A:.*]] = alloca i32, align 4
   // CHECK-NEXT: %[[B:.*]] = alloca i32, align 4
   // CHECK-NEXT: %[[C:.*]] = alloca i32, align 4
-  // CHECK-NEXT: store i32 5, i32* %[[B]], align 4
-  // CHECK-NEXT: store i32 7, i32* %[[C]], align 4
-  // CHECK-NEXT: %[[D:.*]] = load i32, i32* %[[C]], align 4
+  // CHECK-NEXT: store i32 5, ptr %[[B]], align 4
+  // CHECK-NEXT: store i32 7, ptr %[[C]], align 4
+  // CHECK-NEXT: %[[D:.*]] = load i32, ptr %[[C]], align 4
   // CHECK-NEXT: switch i32 %[[D]], label %[[E:.*]] [
   switch (int a, b = 5; int c = 7) {
     case 0:
@@ -59,8 +59,8 @@ void g1() {
 int g2() {
   // CHECK:      %[[A:.*]] = alloca i32, align 4
   // CHECK-NEXT: %[[B:.*]] = call noundef i32 @_Z2f2v()
-  // CHECK-NEXT: store i32 7, i32* %[[A]], align 4
-  // CHECK-NEXT: %[[C:.*]] = load i32, i32* %[[A]], align 4
+  // CHECK-NEXT: store i32 7, ptr %[[A]], align 4
+  // CHECK-NEXT: %[[C:.*]] = load i32, ptr %[[A]], align 4
   // CHECK-NEXT: switch i32 %[[C]], label %[[E:.*]] [
   switch (T{f2()}; int c = 7) {
     case 0:

diff  --git a/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp b/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp
index a02d6f6edccf1..812e438f30c9a 100644
--- a/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp
+++ b/clang/test/CodeGenCXX/cxx1z-inline-variables.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1z %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -std=c++1z %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s
 
 struct Q {
   // CHECK: @_ZN1Q1kE = linkonce_odr constant i32 5, comdat
@@ -93,10 +93,10 @@ const int &yib = Y<int>::b;
 // CHECK-LABEL: define {{.*}}global_var_init{{.*}} comdat($b)
 // CHECK: load atomic {{.*}} acquire, align
 // CHECK: br
-// CHECK: __cxa_guard_acquire(i64* @_ZGV1b)
+// CHECK: __cxa_guard_acquire(ptr @_ZGV1b)
 // CHECK: br
 // CHECK: call noundef i32 @_Z1fv
-// CHECK: __cxa_guard_release(i64* @_ZGV1b)
+// CHECK: __cxa_guard_release(ptr @_ZGV1b)
 
 // CHECK-LABEL: define {{.*}}global_var_init
 // CHECK: call noundef i32 @_Z1fv
@@ -106,9 +106,9 @@ int e = d<int>;
 
 // CHECK-LABEL: define {{.*}}global_var_init{{.*}}comdat
 // CHECK: _ZGV1dIiE
-// CHECK-NOT: __cxa_guard_acquire(i64* @_ZGV1b)
+// CHECK-NOT: __cxa_guard_acquire(ptr @_ZGV1b)
 // CHECK: call noundef i32 @_Z1fv
-// CHECK-NOT: __cxa_guard_release(i64* @_ZGV1b)
+// CHECK-NOT: __cxa_guard_release(ptr @_ZGV1b)
 
 namespace PR35599 {
 struct Marker1 {};

diff  --git a/clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp b/clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp
index 085a89a63b584..63bfe5603b694 100644
--- a/clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp
+++ b/clang/test/CodeGenCXX/cxx1z-lambda-star-this.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1y -triple i686-pc-windows-msvc -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++1y -triple i686-pc-windows-msvc -emit-llvm %s -o - | FileCheck %s
 //CHECK: %[[A_LAMBDA:.*]] = type { %struct.A }
-//CHECK: %[[B_LAMBDA:.*]] = type { %struct.B* }
+//CHECK: %[[B_LAMBDA:.*]] = type { ptr }
 struct A {
   double a = 111;
   auto foo() { return [*this] { return a; }; }
@@ -10,13 +10,11 @@ namespace ns1 {
 int X = A{}.foo()();
 } //end ns1
 
-//CHECK: @"?foo at A@@QAE?A?<auto>@@XZ"(%struct.A* {{[^,]*}} %this, %class.anon* noalias sret(%class.anon) align 8 %[[A_LAMBDA_RETVAL:.*]])
+//CHECK: @"?foo at A@@QAE?A?<auto>@@XZ"(ptr {{[^,]*}} %this, ptr noalias sret(%class.anon) align 8 %[[A_LAMBDA_RETVAL:.*]])
 // get the first object with the closure type, which is of type 'struct.A'
-//CHECK: %[[I0:.+]] = getelementptr inbounds %[[A_LAMBDA]], %[[A_LAMBDA]]* %[[A_LAMBDA_RETVAL]], i32 0, i32 0
-//CHECK: %[[I1:.+]] = bitcast %struct.A* %[[I0]] to i8*
-//CHECK: %[[I2:.+]] = bitcast %struct.A* %this1 to i8*
+//CHECK: %[[I0:.+]] = getelementptr inbounds %[[A_LAMBDA]], ptr %[[A_LAMBDA_RETVAL]], i32 0, i32 0
 // copy the contents ...
-//CHECK: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 8 %[[I1]], i8* align 8 %[[I2]], i32 8, i1 false)
+//CHECK: call void @llvm.memcpy.p0.p0.i32(ptr align 8 %[[I0]], ptr align 8 %this1, i32 8, i1 false)
 
 struct B {
   double b = 222;
@@ -26,6 +24,6 @@ struct B {
 namespace ns2 {
 int X = B{}.bar()();
 }
-//CHECK: @"?bar at B@@QAE?A?<auto>@@XZ"(%struct.B* {{[^,]*}} %this, %class.anon.0* noalias sret(%class.anon.0) align 4 %agg.result)
-//CHECK: %[[I20:.+]] = getelementptr inbounds %class.anon.0, %class.anon.0* %agg.result, i32 0, i32 0
-//CHECK: store %struct.B* %this1, %struct.B** %[[I20]], align 4
+//CHECK: @"?bar at B@@QAE?A?<auto>@@XZ"(ptr {{[^,]*}} %this, ptr noalias sret(%class.anon.0) align 4 %agg.result)
+//CHECK: %[[I20:.+]] = getelementptr inbounds %class.anon.0, ptr %agg.result, i32 0, i32 0
+//CHECK: store ptr %this1, ptr %[[I20]], align 4

diff  --git a/clang/test/CodeGenCXX/cxx20-consteval-crash.cpp b/clang/test/CodeGenCXX/cxx20-consteval-crash.cpp
index da1c78db9af56..44513599ad916 100644
--- a/clang/test/CodeGenCXX/cxx20-consteval-crash.cpp
+++ b/clang/test/CodeGenCXX/cxx20-consteval-crash.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -std=c++20 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -std=c++20 %s -emit-llvm -o - | FileCheck %s
 // RUN: %clang_cc1 -emit-obj -debug-info-kind=constructor -std=c++20 %s -o -
 
 namespace PR50787 {
@@ -9,7 +9,7 @@ constexpr auto& x1 = X();
 auto x2 = X();
 
 // CHECK: @_ZN7PR507872x_E = external global i32, align 4
-// CHECK-NEXT: @_ZN7PR507872x1E = constant i32* @_ZN7PR507872x_E, align 8
+// CHECK-NEXT: @_ZN7PR507872x1E = constant ptr @_ZN7PR507872x_E, align 8
 // CHECK-NEXT: @_ZN7PR507872x2E = global i32 0, align 4
 }
 

diff  --git a/clang/test/CodeGenCXX/cxx20-p0388-unbound-ary.cpp b/clang/test/CodeGenCXX/cxx20-p0388-unbound-ary.cpp
index b4eb101dac229..78f35a024a540 100644
--- a/clang/test/CodeGenCXX/cxx20-p0388-unbound-ary.cpp
+++ b/clang/test/CodeGenCXX/cxx20-p0388-unbound-ary.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple %itanium_abi_triple -std=c++20 -emit-llvm -O2 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -std=c++20 -emit-llvm -O2 -o - | FileCheck %s
 
 // p0388 conversions to unbounded array
 // dcl.init.list/3
@@ -8,7 +8,7 @@ int ga[1];
 
 // CHECK-LABEL: @_ZN3One5frob1Ev
 // CHECK-NEXT: entry:
-// CHECK-NEXT: ret [0 x i32]* bitcast ([1 x i32]* @_ZN3One2gaE to [0 x i32]*)
+// CHECK-NEXT: ret ptr @_ZN3One2gaE
 auto &frob1() {
   int(&r1)[] = ga;
 
@@ -17,8 +17,7 @@ auto &frob1() {
 
 // CHECK-LABEL: @_ZN3One5frob2ERA1_i
 // CHECK-NEXT: entry:
-// CHECK-NEXT: %0 = bitcast [1 x i32]* %arp to [0 x i32]*
-// CHECK-NEXT: ret [0 x i32]* %0
+// CHECK-NEXT: ret ptr %arp
 auto &frob2(int (&arp)[1]) {
   int(&r2)[] = arp;
 

diff  --git a/clang/test/CodeGenCXX/cxx2a-compare.cpp b/clang/test/CodeGenCXX/cxx2a-compare.cpp
index 77659586e139e..60be92dd4b0a7 100644
--- a/clang/test/CodeGenCXX/cxx2a-compare.cpp
+++ b/clang/test/CodeGenCXX/cxx2a-compare.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++2a -emit-llvm %s -o - -triple %itanium_abi_triple | \
+// RUN: %clang_cc1 -std=c++2a -emit-llvm %s -o - -triple %itanium_abi_triple | \
 // RUN:    FileCheck %s \
 // RUN:          '-DSO="class.std::__1::strong_ordering"' \
 // RUN:          '-DPO="class.std::__1::partial_ordering"' \
@@ -18,8 +18,8 @@ auto test_signed(int x, int y) {
   // CHECK: %sel.lt = select i1 %cmp.lt, i8 [[LT]], i8 [[GT]]
   // CHECK: %cmp.eq = icmp eq i32 %{{.+}}, %{{.+}}
   // CHECK: %sel.eq = select i1 %cmp.eq, i8 [[EQ]], i8 %sel.lt
-  // CHECK: %__value_ = getelementptr inbounds %[[SO]], %[[SO]]* %[[DEST]]
-  // CHECK: store i8 %sel.eq, i8* %__value_, align 1
+  // CHECK: %__value_ = getelementptr inbounds %[[SO]], ptr %[[DEST]]
+  // CHECK: store i8 %sel.eq, ptr %__value_, align 1
   // CHECK: ret
   return x <=> y;
 }
@@ -31,8 +31,8 @@ auto test_unsigned(unsigned x, unsigned y) {
   // CHECK: %sel.lt = select i1 %cmp.lt, i8 [[LT]], i8 [[GT]]
   // CHECK: %cmp.eq = icmp eq i32 %{{.+}}, %{{.+}}
   // CHECK: %sel.eq = select i1 %cmp.eq, i8 [[EQ]], i8 %sel.lt
-  // CHECK: %__value_ = getelementptr inbounds %[[SO]], %[[SO]]* %[[DEST]]
-  // CHECK: store i8 %sel.eq, i8* %__value_
+  // CHECK: %__value_ = getelementptr inbounds %[[SO]], ptr %[[DEST]]
+  // CHECK: store i8 %sel.eq, ptr %__value_
   // CHECK: ret
   return x <=> y;
 }
@@ -46,8 +46,8 @@ auto float_test(double x, double y) {
   // CHECK: %sel.gt = select i1 %cmp.gt, i8 [[GT]], i8 %sel.eq
   // CHECK: %cmp.lt = fcmp olt double %{{.+}}, %{{.+}}
   // CHECK: %sel.lt = select i1 %cmp.lt, i8 [[LT]], i8 %sel.gt
-  // CHECK: %__value_ = getelementptr inbounds %[[PO]], %[[PO]]* %[[DEST]]
-  // CHECK: store i8 %sel.lt, i8* %__value_
+  // CHECK: %__value_ = getelementptr inbounds %[[PO]], ptr %[[DEST]]
+  // CHECK: store i8 %sel.lt, ptr %__value_
   // CHECK: ret
   return x <=> y;
 }
@@ -55,12 +55,12 @@ auto float_test(double x, double y) {
 // CHECK-LABEL: @_Z8ptr_testPiS_
 auto ptr_test(int *x, int *y) {
   // CHECK: %[[DEST:retval|agg.result]]
-  // CHECK: %cmp.lt = icmp ult i32* %{{.+}}, %{{.+}}
+  // CHECK: %cmp.lt = icmp ult ptr %{{.+}}, %{{.+}}
   // CHECK: %sel.lt = select i1 %cmp.lt, i8 [[LT]], i8 [[GT]]
-  // CHECK: %cmp.eq = icmp eq i32* %{{.+}}, %{{.+}}
+  // CHECK: %cmp.eq = icmp eq ptr %{{.+}}, %{{.+}}
   // CHECK: %sel.eq = select i1 %cmp.eq, i8 [[EQ]], i8 %sel.lt
-  // CHECK: %__value_ = getelementptr inbounds %[[SO]], %[[SO]]* %[[DEST]]
-  // CHECK: store i8 %sel.eq, i8* %__value_, align 1
+  // CHECK: %__value_ = getelementptr inbounds %[[SO]], ptr %[[DEST]]
+  // CHECK: store i8 %sel.eq, ptr %__value_, align 1
   // CHECK: ret
   return x <=> y;
 }
@@ -69,8 +69,8 @@ auto ptr_test(int *x, int *y) {
 auto test_constant() {
   // CHECK: %[[DEST:retval|agg.result]]
   // CHECK-NOT: icmp
-  // CHECK: %__value_ = getelementptr inbounds %[[SO]], %[[SO]]* %[[DEST]]
-  // CHECK-NEXT: store i8 -1, i8* %__value_
+  // CHECK: %__value_ = getelementptr inbounds %[[SO]], ptr %[[DEST]]
+  // CHECK-NEXT: store i8 -1, ptr %__value_
   // CHECK: ret
   const int x = 42;
   const int y = 101;

diff  --git a/clang/test/CodeGenCXX/cxx2a-consteval.cpp b/clang/test/CodeGenCXX/cxx2a-consteval.cpp
index a2b3509930474..06f1d512accec 100644
--- a/clang/test/CodeGenCXX/cxx2a-consteval.cpp
+++ b/clang/test/CodeGenCXX/cxx2a-consteval.cpp
@@ -1,10 +1,10 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -std=c++2a -triple x86_64-unknown-linux-gnu -o %t.ll
+// RUN: %clang_cc1 -emit-llvm %s -std=c++2a -triple x86_64-unknown-linux-gnu -o %t.ll
 // RUN: FileCheck -check-prefix=EVAL -input-file=%t.ll %s
 // RUN: FileCheck -check-prefix=EVAL-STATIC -input-file=%t.ll %s
 // RUN: FileCheck -check-prefix=EVAL-FN -input-file=%t.ll %s
 //
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -Dconsteval="" -std=c++2a -triple x86_64-unknown-linux-gnu -o %t.ll
+// RUN: %clang_cc1 -emit-llvm %s -Dconsteval="" -std=c++2a -triple x86_64-unknown-linux-gnu -o %t.ll
 // RUN: FileCheck -check-prefix=EXPR -input-file=%t.ll %s
 
 // there is two version of symbol checks to ensure
@@ -21,8 +21,8 @@ consteval int ret7() {
 // EVAL-FN-LABEL: @_Z9test_ret7v(
 // EVAL-FN-NEXT:  entry:
 // EVAL-FN-NEXT:    [[I:%.*]] = alloca i32, align 4
-// EVAL-FN-NEXT:    store i32 7, i32* [[I]], align 4
-// EVAL-FN-NEXT:    [[TMP0:%.*]] = load i32, i32* [[I]], align 4
+// EVAL-FN-NEXT:    store i32 7, ptr [[I]], align 4
+// EVAL-FN-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4
 // EVAL-FN-NEXT:    ret i32 [[TMP0]]
 //
 int test_ret7() {
@@ -42,7 +42,7 @@ consteval const int &retI() {
 
 // EVAL-FN-LABEL: @_Z12test_retRefIv(
 // EVAL-FN-NEXT:  entry:
-// EVAL-FN-NEXT:    ret i32* @_ZL7i_const
+// EVAL-FN-NEXT:    ret ptr @_ZL7i_const
 //
 const int &test_retRefI() {
   return retI();
@@ -50,7 +50,7 @@ const int &test_retRefI() {
 
 // EVAL-FN-LABEL: @_Z9test_retIv(
 // EVAL-FN-NEXT:  entry:
-// EVAL-FN-NEXT:    [[TMP0:%.*]] = load i32, i32* @_ZL7i_const, align 4
+// EVAL-FN-NEXT:    [[TMP0:%.*]] = load i32, ptr @_ZL7i_const, align 4
 // EVAL-FN-NEXT:    ret i32 [[TMP0]]
 //
 int test_retI() {
@@ -65,7 +65,7 @@ consteval const int *retIPtr() {
 
 // EVAL-FN-LABEL: @_Z12test_retIPtrv(
 // EVAL-FN-NEXT:  entry:
-// EVAL-FN-NEXT:    [[TMP0:%.*]] = load i32, i32* @_ZL7i_const, align 4
+// EVAL-FN-NEXT:    [[TMP0:%.*]] = load i32, ptr @_ZL7i_const, align 4
 // EVAL-FN-NEXT:    ret i32 [[TMP0]]
 //
 int test_retIPtr() {
@@ -74,7 +74,7 @@ int test_retIPtr() {
 
 // EVAL-FN-LABEL: @_Z13test_retPIPtrv(
 // EVAL-FN-NEXT:  entry:
-// EVAL-FN-NEXT:    ret i32* @_ZL7i_const
+// EVAL-FN-NEXT:    ret ptr @_ZL7i_const
 //
 const int *test_retPIPtr() {
   return retIPtr();
@@ -88,7 +88,7 @@ consteval const int &&retIRRef() {
 
 // EVAL-FN-LABEL: @_Z13test_retIRRefv(
 // EVAL-FN-NEXT:  entry:
-// EVAL-FN-NEXT:    ret i32* @_ZL7i_const
+// EVAL-FN-NEXT:    ret ptr @_ZL7i_const
 //
 const int &&test_retIRRef() {
   return static_cast<const int &&>(retIRRef());
@@ -96,7 +96,7 @@ const int &&test_retIRRef() {
 
 // EVAL-FN-LABEL: @_Z14test_retIRRefIv(
 // EVAL-FN-NEXT:  entry:
-// EVAL-FN-NEXT:    [[TMP0:%.*]] = load i32, i32* @_ZL7i_const, align 4
+// EVAL-FN-NEXT:    [[TMP0:%.*]] = load i32, ptr @_ZL7i_const, align 4
 // EVAL-FN-NEXT:    ret i32 [[TMP0]]
 //
 int test_retIRRefI() {
@@ -118,12 +118,12 @@ consteval Agg retAgg() {
 // EVAL-FN-NEXT:  entry:
 // EVAL-FN-NEXT:    [[B:%.*]] = alloca i64, align 8
 // EVAL-FN-NEXT:    [[REF_TMP:%.*]] = alloca [[STRUCT_AGG:%.*]], align 8
-// EVAL-FN-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_AGG]], %struct.Agg* [[REF_TMP]], i32 0, i32 0
-// EVAL-FN-NEXT:    store i32 13, i32* [[TMP0]], align 8
-// EVAL-FN-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_AGG]], %struct.Agg* [[REF_TMP]], i32 0, i32 1
-// EVAL-FN-NEXT:    store i64 17, i64* [[TMP1]], align 8
-// EVAL-FN-NEXT:    store i64 17, i64* [[B]], align 8
-// EVAL-FN-NEXT:    [[TMP2:%.*]] = load i64, i64* [[B]], align 8
+// EVAL-FN-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_AGG]], ptr [[REF_TMP]], i32 0, i32 0
+// EVAL-FN-NEXT:    store i32 13, ptr [[TMP0]], align 8
+// EVAL-FN-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_AGG]], ptr [[REF_TMP]], i32 0, i32 1
+// EVAL-FN-NEXT:    store i64 17, ptr [[TMP1]], align 8
+// EVAL-FN-NEXT:    store i64 17, ptr [[B]], align 8
+// EVAL-FN-NEXT:    [[TMP2:%.*]] = load i64, ptr [[B]], align 8
 // EVAL-FN-NEXT:    ret i64 [[TMP2]]
 //
 long test_retAgg() {
@@ -145,12 +145,12 @@ consteval const Agg &retRefAgg() {
 // EVAL-FN-NEXT:  entry:
 // EVAL-FN-NEXT:    [[B:%.*]] = alloca i64, align 8
 // EVAL-FN-NEXT:    [[REF_TMP:%.*]] = alloca [[STRUCT_AGG:%.*]], align 8
-// EVAL-FN-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_AGG]], %struct.Agg* [[REF_TMP]], i32 0, i32 0
-// EVAL-FN-NEXT:    store i32 13, i32* [[TMP0]], align 8
-// EVAL-FN-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_AGG]], %struct.Agg* [[REF_TMP]], i32 0, i32 1
-// EVAL-FN-NEXT:    store i64 17, i64* [[TMP1]], align 8
-// EVAL-FN-NEXT:    store i64 17, i64* [[B]], align 8
-// EVAL-FN-NEXT:    [[TMP2:%.*]] = load i64, i64* [[B]], align 8
+// EVAL-FN-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_AGG]], ptr [[REF_TMP]], i32 0, i32 0
+// EVAL-FN-NEXT:    store i32 13, ptr [[TMP0]], align 8
+// EVAL-FN-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_AGG]], ptr [[REF_TMP]], i32 0, i32 1
+// EVAL-FN-NEXT:    store i64 17, ptr [[TMP1]], align 8
+// EVAL-FN-NEXT:    store i64 17, ptr [[B]], align 8
+// EVAL-FN-NEXT:    [[TMP2:%.*]] = load i64, ptr [[B]], align 8
 // EVAL-FN-NEXT:    ret i64 [[TMP2]]
 //
 long test_retRefAgg() {
@@ -168,12 +168,12 @@ consteval Agg is_const() {
 // EVAL-FN-NEXT:  entry:
 // EVAL-FN-NEXT:    [[B:%.*]] = alloca i64, align 8
 // EVAL-FN-NEXT:    [[REF_TMP:%.*]] = alloca [[STRUCT_AGG:%.*]], align 8
-// EVAL-FN-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_AGG]], %struct.Agg* [[REF_TMP]], i32 0, i32 0
-// EVAL-FN-NEXT:    store i32 5, i32* [[TMP0]], align 8
-// EVAL-FN-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_AGG]], %struct.Agg* [[REF_TMP]], i32 0, i32 1
-// EVAL-FN-NEXT:    store i64 19, i64* [[TMP1]], align 8
-// EVAL-FN-NEXT:    store i64 19, i64* [[B]], align 8
-// EVAL-FN-NEXT:    [[TMP2:%.*]] = load i64, i64* [[B]], align 8
+// EVAL-FN-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_AGG]], ptr [[REF_TMP]], i32 0, i32 0
+// EVAL-FN-NEXT:    store i32 5, ptr [[TMP0]], align 8
+// EVAL-FN-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_AGG]], ptr [[REF_TMP]], i32 0, i32 1
+// EVAL-FN-NEXT:    store i64 19, ptr [[TMP1]], align 8
+// EVAL-FN-NEXT:    store i64 19, ptr [[B]], align 8
+// EVAL-FN-NEXT:    [[TMP2:%.*]] = load i64, ptr [[B]], align 8
 // EVAL-FN-NEXT:    ret i64 [[TMP2]]
 //
 long test_is_const() {
@@ -193,16 +193,16 @@ struct AggCtor {
 // EVAL-FN-NEXT:  entry:
 // EVAL-FN-NEXT:    [[I:%.*]] = alloca i32, align 4
 // EVAL-FN-NEXT:    [[C:%.*]] = alloca [[STRUCT_AGGCTOR:%.*]], align 8
-// EVAL-FN-NEXT:    store i32 2, i32* [[I]], align 4
-// EVAL-FN-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_AGGCTOR]], %struct.AggCtor* [[C]], i32 0, i32 0
-// EVAL-FN-NEXT:    store i32 4, i32* [[TMP0]], align 8
-// EVAL-FN-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_AGGCTOR]], %struct.AggCtor* [[C]], i32 0, i32 1
-// EVAL-FN-NEXT:    store i64 10, i64* [[TMP1]], align 8
-// EVAL-FN-NEXT:    [[A:%.*]] = getelementptr inbounds [[STRUCT_AGGCTOR]], %struct.AggCtor* [[C]], i32 0, i32 0
-// EVAL-FN-NEXT:    [[TMP2:%.*]] = load i32, i32* [[A]], align 8
+// EVAL-FN-NEXT:    store i32 2, ptr [[I]], align 4
+// EVAL-FN-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[STRUCT_AGGCTOR]], ptr [[C]], i32 0, i32 0
+// EVAL-FN-NEXT:    store i32 4, ptr [[TMP0]], align 8
+// EVAL-FN-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[STRUCT_AGGCTOR]], ptr [[C]], i32 0, i32 1
+// EVAL-FN-NEXT:    store i64 10, ptr [[TMP1]], align 8
+// EVAL-FN-NEXT:    [[A:%.*]] = getelementptr inbounds [[STRUCT_AGGCTOR]], ptr [[C]], i32 0, i32 0
+// EVAL-FN-NEXT:    [[TMP2:%.*]] = load i32, ptr [[A]], align 8
 // EVAL-FN-NEXT:    [[CONV:%.*]] = sext i32 [[TMP2]] to i64
-// EVAL-FN-NEXT:    [[B:%.*]] = getelementptr inbounds [[STRUCT_AGGCTOR]], %struct.AggCtor* [[C]], i32 0, i32 1
-// EVAL-FN-NEXT:    [[TMP3:%.*]] = load i64, i64* [[B]], align 8
+// EVAL-FN-NEXT:    [[B:%.*]] = getelementptr inbounds [[STRUCT_AGGCTOR]], ptr [[C]], i32 0, i32 1
+// EVAL-FN-NEXT:    [[TMP3:%.*]] = load i64, ptr [[B]], align 8
 // EVAL-FN-NEXT:    [[ADD:%.*]] = add nsw i64 [[CONV]], [[TMP3]]
 // EVAL-FN-NEXT:    ret i64 [[ADD]]
 //
@@ -227,8 +227,8 @@ int test_UserConv() {
 // EVAL-FN-LABEL: @_Z28test_UserConvOverload_helperi(
 // EVAL-FN-NEXT:  entry:
 // EVAL-FN-NEXT:    [[A_ADDR:%.*]] = alloca i32, align 4
-// EVAL-FN-NEXT:    store i32 [[A:%.*]], i32* [[A_ADDR]], align 4
-// EVAL-FN-NEXT:    [[TMP0:%.*]] = load i32, i32* [[A_ADDR]], align 4
+// EVAL-FN-NEXT:    store i32 [[A:%.*]], ptr [[A_ADDR]], align 4
+// EVAL-FN-NEXT:    [[TMP0:%.*]] = load i32, ptr [[A_ADDR]], align 4
 // EVAL-FN-NEXT:    ret i32 [[TMP0]]
 //
 int test_UserConvOverload_helper(int a) { return a; }

diff  --git a/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp b/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp
index a296b6f0c5c54..0282bdd1a2836 100644
--- a/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp
+++ b/clang/test/CodeGenCXX/debug-info-atexit-stub.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s
 
 struct a {
   ~a();
@@ -16,7 +16,7 @@ c<B> *d() {
 
 // CHECK: define internal void @"??__Ff@?1??d@@YAPEAU?$c at UB@@@@XZ at YAXXZ"()
 // CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] {
-// CHECK: call void @"??1?$c at UB@@@@QEAA at XZ"(%struct.c* @"?f@?1??d@@YAPEAU?$c at UB@@@@XZ at 4U2@A"), !dbg ![[LOCATION:[0-9]+]]
+// CHECK: call void @"??1?$c at UB@@@@QEAA at XZ"(ptr @"?f@?1??d@@YAPEAU?$c at UB@@@@XZ at 4U2@A"), !dbg ![[LOCATION:[0-9]+]]
 // CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "`dynamic atexit destructor for 'f'"
 // CHECK-SAME: flags: DIFlagArtificial
 // CHECK: ![[LOCATION]] = !DILocation(line: 0, scope: ![[SUBPROGRAM]])

diff  --git a/clang/test/CodeGenCXX/debug-info-class.cpp b/clang/test/CodeGenCXX/debug-info-class.cpp
index 2ba99d18405b3..ef84b91b67821 100644
--- a/clang/test/CodeGenCXX/debug-info-class.cpp
+++ b/clang/test/CodeGenCXX/debug-info-class.cpp
@@ -99,18 +99,18 @@ int main(int argc, char **argv) {
   return 0;
 }
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-cygwin -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple armv7l-unknown-linux-gnueabihf -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-cygwin -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple armv7l-unknown-linux-gnueabihf -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK %s
-
-// CHECK98: invoke {{.+}} @_ZN1BD1Ev(%class.B* {{[^,]*}} %b)
+// RUN: %clang_cc1 -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK %s
+// RUN: %clang_cc1 -triple i686-cygwin -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK %s
+// RUN: %clang_cc1 -triple armv7l-unknown-linux-gnueabihf -emit-llvm -debug-info-kind=limited -fexceptions -std=c++98 %s -o - | FileCheck -check-prefix=CHECK98 -check-prefix=CHECK %s
+// RUN: %clang_cc1 -triple x86_64-unknown_unknown -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK %s
+// RUN: %clang_cc1 -triple i686-cygwin -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK %s
+// RUN: %clang_cc1 -triple armv7l-unknown-linux-gnueabihf -emit-llvm -debug-info-kind=limited -fexceptions -std=c++11 %s -o - | FileCheck -check-prefix=CHECK11 -check-prefix=CHECK %s
+
+// CHECK98: invoke {{.+}} @_ZN1BD1Ev(ptr {{[^,]*}} %b)
 // CHECK98-NEXT: unwind label %{{.+}}, !dbg ![[EXCEPTLOC:.*]]
-// CHECK11: call {{.+}} @_ZN1BD1Ev(%class.B* {{[^,]*}} %b){{.*}}, !dbg ![[EXCEPTLOC:.*]]
+// CHECK11: call {{.+}} @_ZN1BD1Ev(ptr {{[^,]*}} %b){{.*}}, !dbg ![[EXCEPTLOC:.*]]
 
-// CHECK: store i32 0, i32* %{{.+}}, !dbg ![[RETLOC:.*]]
+// CHECK: store i32 0, ptr %{{.+}}, !dbg ![[RETLOC:.*]]
 
 // CHECK: [[F:![0-9]*]] = !DICompositeType(tag: DW_TAG_structure_type, name: "F"
 // CHECK-SAME:                             DIFlagFwdDecl

diff  --git a/clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp b/clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp
index 055ac64b9955d..8200a65977dad 100644
--- a/clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp
+++ b/clang/test/CodeGenCXX/debug-info-codeview-display-name.cpp
@@ -1,18 +1,18 @@
 // RUN: %clang_cc1 -fblocks -debug-info-kind=limited -gcodeview -emit-llvm %s \
 // RUN:       -o - -triple=x86_64-pc-win32 -Wno-new-returns-null -std=c++98 | \
-// RUN:    grep -E 'DISubprogram|DICompositeType' | sed -e 's/.*name: "\([^"]*\)".*/"\1"/' | \
+// RUN:    grep -E 'DISubprogram|DICompositeType' | sed -e 's/.*name: "\(ptr\)".*/"\1"/' | \
 // RUN:    FileCheck %s --check-prefixes=CHECK,UNQUAL
 // RUN: %clang_cc1 -fblocks -debug-info-kind=line-tables-only -gcodeview -emit-llvm %s \
 // RUN:       -o - -triple=x86_64-pc-win32 -Wno-new-returns-null -std=c++98 | \
-// RUN:    grep 'DISubprogram' | sed -e 's/.*name: "\([^"]*\)".*/"\1"/' | \
+// RUN:    grep 'DISubprogram' | sed -e 's/.*name: "\(ptr\)".*/"\1"/' | \
 // RUN:    FileCheck %s
 // RUN: %clang_cc1 -fblocks -debug-info-kind=limited -gcodeview -emit-llvm %s \
 // RUN:       -o - -triple=x86_64-pc-win32 -Wno-new-returns-null -std=c++11 | \
-// RUN:    grep -E 'DISubprogram|DICompositeType' | sed -e 's/.*name: "\([^"]*\)".*/"\1"/' | \
+// RUN:    grep -E 'DISubprogram|DICompositeType' | sed -e 's/.*name: "\(ptr\)".*/"\1"/' | \
 // RUN:    FileCheck %s --check-prefixes=CHECK,UNQUAL
 // RUN: %clang_cc1 -fblocks -debug-info-kind=limited -gcodeview -emit-llvm %s \
 // RUN:       -o - -triple=x86_64-pc-win32 -Wno-new-returns-null | \
-// RUN:    grep -E 'DISubprogram|DICompositeType' | sed -e 's/.*name: "\([^"]*\)".*/"\1"/' | \
+// RUN:    grep -E 'DISubprogram|DICompositeType' | sed -e 's/.*name: "\(ptr\)".*/"\1"/' | \
 // RUN:    FileCheck %s --check-prefixes=CHECK,UNQUAL
 
 void freefunc() { }

diff  --git a/clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp b/clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp
index eea8b885451e3..b22e28fc1501f 100644
--- a/clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp
+++ b/clang/test/CodeGenCXX/debug-info-codeview-heapallocsite.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fexceptions -triple x86_64-windows-msvc -debug-info-kind=limited -gcodeview -fdeclspec -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fexceptions -triple x86_64-windows-msvc -debug-info-kind=limited -gcodeview -fdeclspec -S -emit-llvm %s -o - | FileCheck %s
 
 struct Foo {
   int x;
@@ -14,8 +14,8 @@ extern "C" void doit() {
 }
 
 // CHECK-LABEL: define {{.*}}void @doit
-// CHECK: call {{.*}} i8* {{.*}}@"??2 at YAPEAX_K@Z"(i64 noundef 4) {{.*}} !heapallocsite [[DBG_FOO:!.*]]
-// CHECK: call {{.*}} i8* {{.*}}@"??2 at YAPEAX_K@Z"(i64 noundef 4) {{.*}} !heapallocsite [[DBG_BAR:!.*]]
+// CHECK: call {{.*}} ptr {{.*}}@"??2 at YAPEAX_K@Z"(i64 noundef 4) {{.*}} !heapallocsite [[DBG_FOO:!.*]]
+// CHECK: call {{.*}} ptr {{.*}}@"??2 at YAPEAX_K@Z"(i64 noundef 4) {{.*}} !heapallocsite [[DBG_BAR:!.*]]
 
 extern "C" void useinvoke() {
   struct HasDtor {
@@ -25,7 +25,7 @@ extern "C" void useinvoke() {
 }
 
 // CHECK-LABEL: define {{.*}}void @useinvoke
-// CHECK: invoke {{.*}} i8* {{.*}}@"??2 at YAPEAX_K@Z"(i64 noundef 4)
+// CHECK: invoke {{.*}} ptr {{.*}}@"??2 at YAPEAX_K@Z"(i64 noundef 4)
 // CHECK-NEXT: to label {{.*}} unwind label {{.*}} !heapallocsite [[DBG_FOO]]
 
 // CHECK: [[DBG_FOO]] = distinct !DICompositeType(tag: DW_TAG_structure_type,

diff  --git a/clang/test/CodeGenCXX/debug-info-ctor.cpp b/clang/test/CodeGenCXX/debug-info-ctor.cpp
index c31eebe163ca5..16bc54d153cd9 100644
--- a/clang/test/CodeGenCXX/debug-info-ctor.cpp
+++ b/clang/test/CodeGenCXX/debug-info-ctor.cpp
@@ -7,7 +7,7 @@ struct X {
 };
 
 X::X(int v) {
-  // CHECK_TEMPORARILY_DISABLED: call void @_ZN1XC2Ei(%struct.X* %this1, i32 %tmp), !dbg
+  // CHECK_TEMPORARILY_DISABLED: call void @_ZN1XC2Ei(ptr %this1, i32 %tmp), !dbg
   // TEMPORARY CHECK: X
   value = v;
 }

diff  --git a/clang/test/CodeGenCXX/debug-info-destroy-helper.cpp b/clang/test/CodeGenCXX/debug-info-destroy-helper.cpp
index 36b4f27d2abfd..d685e6169997d 100644
--- a/clang/test/CodeGenCXX/debug-info-destroy-helper.cpp
+++ b/clang/test/CodeGenCXX/debug-info-destroy-helper.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s
 
 struct b {
   b(char *);
@@ -12,12 +12,12 @@ struct {
   const a &d;
 } e[]{nullptr, {}};
 
-// CHECK: define internal void @__cxx_global_array_dtor(i8* noundef %0)
+// CHECK: define internal void @__cxx_global_array_dtor(ptr noundef %0)
 // CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] {
 // CHECK: arraydestroy.body
 // CHECK: %arraydestroy.elementPast =
 // CHECK-SAME: !dbg ![[LOCATION:[0-9]+]]
-// CHECK: call void @"??1<unnamed-type-e>@@QEAA at XZ"(%struct.anon* {{[^,]*}} %arraydestroy.element)
+// CHECK: call void @"??1<unnamed-type-e>@@QEAA at XZ"(ptr {{[^,]*}} %arraydestroy.element)
 // CHECK-SAME: !dbg ![[LOCATION]]
 // CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "__cxx_global_array_dtor"
 // CHECK-SAME: flags: DIFlagArtificial

diff  --git a/clang/test/CodeGenCXX/debug-info-globalinit.cpp b/clang/test/CodeGenCXX/debug-info-globalinit.cpp
index 407e97d594c5c..bcadc6b0b28b9 100644
--- a/clang/test/CodeGenCXX/debug-info-globalinit.cpp
+++ b/clang/test/CodeGenCXX/debug-info-globalinit.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -std=c++11 -debug-info-kind=limited | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -emit-llvm -o - %s -std=c++11 -debug-info-kind=limited | FileCheck %s
 
 void crash() {
   volatile char *ptr = 0;
@@ -20,19 +20,19 @@ int main(void) {}
 // CHECK-NOT: __cxx_global_var_init
 // CHECK: %[[C0:.+]] = call noundef i32 @_Z4testv(), !dbg ![[LINE:.*]]
 // CHECK-NOT: __cxx_global_var_init
-// CHECK: store i32 %[[C0]], i32* @_ZL1i, align 4, !dbg
+// CHECK: store i32 %[[C0]], ptr @_ZL1i, align 4, !dbg
 // 
 // CHECK-LABEL: define internal void @__cxx_global_var_init.1()
 // CHECK-NOT: dbg
 // CHECK: %[[C1:.+]] = call noundef i32 @_Z4testv()
 // CHECK-NOT: dbg
-// CHECK: store i32 %[[C1]], i32* @_ZL1j, align 4
+// CHECK: store i32 %[[C1]], ptr @_ZL1j, align 4
 //
 // CHECK-LABEL: define internal void @__cxx_global_var_init.2()
 // CHECK-NOT: __cxx_global_var_init
 // CHECK: %[[C2:.+]] = call noundef i32 @_Z4testv(), !dbg ![[LINE2:.*]]
 // CHECK-NOT: __cxx_global_var_init
-// CHECK: store i32 %[[C2]], i32* @_ZL1k, align 4, !dbg
+// CHECK: store i32 %[[C2]], ptr @_ZL1k, align 4, !dbg
 // 
 // CHECK: ![[LINE]] = !DILocation(line: 13,
 // CHECK: ![[LINE2]] = !DILocation(line: 15,

diff  --git a/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp b/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
index 06d68f34eb265..78b99f86ee292 100644
--- a/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
+++ b/clang/test/CodeGenCXX/debug-info-inheriting-constructor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -debug-info-kind=standalone -std=c++11 -triple x86_64-darwin -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=standalone -std=c++11 -triple x86_64-darwin -emit-llvm -o - %s | FileCheck %s
 
 struct A {
   A(int, ...);
@@ -12,7 +12,7 @@ A::A(int i, ...) {}
 // CHECK-NOT: ret void
 // CHECK: call void @llvm.dbg.declare
 // CHECK-NOT: ret void
-// CHECK: call void @llvm.dbg.declare(metadata %{{.*}}** %{{[^,]+}},
+// CHECK: call void @llvm.dbg.declare(metadata ptr %{{[^,]+}},
 // CHECK-SAME: metadata ![[THIS:[0-9]+]], metadata !DIExpression()), !dbg ![[LOC:[0-9]+]]
 // CHECK: ret void, !dbg ![[NOINL:[0-9]+]]
 // CHECK: ![[FOO:.*]] = distinct !DISubprogram(name: "foo"

diff  --git a/clang/test/CodeGenCXX/debug-info-lambda.cpp b/clang/test/CodeGenCXX/debug-info-lambda.cpp
index 7752fe4ce249e..5239b12afa56d 100644
--- a/clang/test/CodeGenCXX/debug-info-lambda.cpp
+++ b/clang/test/CodeGenCXX/debug-info-lambda.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -emit-llvm \
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm \
 // RUN:   -debug-info-kind=line-tables-only -std=c++11 %s -o - | FileCheck %s
 
 // CHECK-LABEL: define{{.*}}lambda_in_func
 void lambda_in_func(int &ref) {
-  // CHECK: [[ref_slot:%.*]] = getelementptr inbounds %class.anon, %class.anon* {{.*}}, i32 0, i32 0, !dbg [[lambda_decl_loc:![0-9]+]]
-  // CHECK-NEXT: %1 = load i32*, i32** %ref.addr, align {{.*}}, !dbg [[capture_init_loc:![0-9]+]]
-  // CHECK-NEXT: store i32* %1, i32** %0, align {{.*}}, !dbg [[lambda_decl_loc]]
+  // CHECK: [[ref_slot:%.*]] = getelementptr inbounds %class.anon, ptr {{.*}}, i32 0, i32 0, !dbg [[lambda_decl_loc:![0-9]+]]
+  // CHECK-NEXT: %1 = load ptr, ptr %ref.addr, align {{.*}}, !dbg [[capture_init_loc:![0-9]+]]
+  // CHECK-NEXT: store ptr %1, ptr %0, align {{.*}}, !dbg [[lambda_decl_loc]]
   // CHECK-NEXT: call {{.*}}void {{.*}}, !dbg [[lambda_call_loc:![0-9]+]]
 
   auto helper = [       // CHECK: [[lambda_decl_loc]] = !DILocation(line: [[@LINE]], column: 17

diff  --git a/clang/test/CodeGenCXX/debug-info-line.cpp b/clang/test/CodeGenCXX/debug-info-line.cpp
index 0796198040dbc..09abb0fd1a425 100644
--- a/clang/test/CodeGenCXX/debug-info-line.cpp
+++ b/clang/test/CodeGenCXX/debug-info-line.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -w -debug-info-kind=line-tables-only -std=c++11 -fexceptions -fcxx-exceptions -S -mllvm -no-discriminators -emit-llvm %s -o - -triple %itanium_abi_triple | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -w -debug-info-kind=line-tables-only -std=c++11 -fexceptions -fcxx-exceptions -S -mllvm -no-discriminators -emit-llvm %s -o - -triple i686-linux-gnu | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -w -debug-info-kind=line-directives-only -std=c++11 -fexceptions -fcxx-exceptions -S -mllvm -no-discriminators -emit-llvm %s -o - -triple %itanium_abi_triple | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -w -debug-info-kind=line-directives-only -std=c++11 -fexceptions -fcxx-exceptions -S -mllvm -no-discriminators -emit-llvm %s -o - -triple i686-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -w -debug-info-kind=line-tables-only -std=c++11 -fexceptions -fcxx-exceptions -S -mllvm -no-discriminators -emit-llvm %s -o - -triple %itanium_abi_triple | FileCheck %s
+// RUN: %clang_cc1 -w -debug-info-kind=line-tables-only -std=c++11 -fexceptions -fcxx-exceptions -S -mllvm -no-discriminators -emit-llvm %s -o - -triple i686-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -w -debug-info-kind=line-directives-only -std=c++11 -fexceptions -fcxx-exceptions -S -mllvm -no-discriminators -emit-llvm %s -o - -triple %itanium_abi_triple | FileCheck %s
+// RUN: %clang_cc1 -w -debug-info-kind=line-directives-only -std=c++11 -fexceptions -fcxx-exceptions -S -mllvm -no-discriminators -emit-llvm %s -o - -triple i686-linux-gnu | FileCheck %s
 
 int &src();
 int *sink();
@@ -30,7 +30,7 @@ foo::foo()
 #line 200
       i // CHECK: store i32 {{.*}} !dbg [[DBG_FOO_VALUE:!.*]]
       (src()),
-      j // CHECK: store i32* {{.*}} !dbg [[DBG_FOO_REF:!.*]]
+      j // CHECK: store ptr {{.*}} !dbg [[DBG_FOO_REF:!.*]]
       (src()),
       k // CHECK: store float {{.*}} !dbg [[DBG_FOO_COMPLEX:!.*]]
       (complex_src()) {

diff  --git a/clang/test/CodeGenCXX/debug-info-ms-dtor-thunks.cpp b/clang/test/CodeGenCXX/debug-info-ms-dtor-thunks.cpp
index 9d8b86f3e84a5..701874580d07d 100644
--- a/clang/test/CodeGenCXX/debug-info-ms-dtor-thunks.cpp
+++ b/clang/test/CodeGenCXX/debug-info-ms-dtor-thunks.cpp
@@ -1,15 +1,15 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686--windows -emit-llvm -debug-info-kind=line-tables-only -x c++ %s -fms-extensions -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686--windows -emit-llvm -debug-info-kind=line-directives-only -x c++ %s -fms-extensions -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i686--windows -emit-llvm -debug-info-kind=line-tables-only -x c++ %s -fms-extensions -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i686--windows -emit-llvm -debug-info-kind=line-directives-only -x c++ %s -fms-extensions -o - | FileCheck %s
 
 struct __declspec(dllexport) S { virtual ~S(); };
 struct __declspec(dllexport) T { virtual ~T(); };
 struct __declspec(dllexport) U : S, T { virtual ~U(); };
 
 // CHECK-LABEL: define {{.*}} @"??_GS@@UAEPAXI at Z"
-// CHECK: call x86_thiscallcc void @"??1S@@UAE at XZ"(%struct.S* {{[^,]*}} %this1){{.*}}!dbg !{{[0-9]+}}
+// CHECK: call x86_thiscallcc void @"??1S@@UAE at XZ"(ptr {{[^,]*}} %this1){{.*}}!dbg !{{[0-9]+}}
 
 // CHECK-LABEL: define {{.*}} @"??_GT@@UAEPAXI at Z"
-// CHECK: call x86_thiscallcc void @"??1T@@UAE at XZ"(%struct.T* {{[^,]*}} %this1){{.*}}!dbg !{{[0-9]+}}
+// CHECK: call x86_thiscallcc void @"??1T@@UAE at XZ"(ptr {{[^,]*}} %this1){{.*}}!dbg !{{[0-9]+}}
 
 // CHECK-LABEL: define {{.*}} @"??_GU@@UAEPAXI at Z"
-// CHECK: call x86_thiscallcc void @"??1U@@UAE at XZ"(%struct.U* {{[^,]*}} %this1){{.*}}!dbg !{{[0-9]+}}
+// CHECK: call x86_thiscallcc void @"??1U@@UAE at XZ"(ptr {{[^,]*}} %this1){{.*}}!dbg !{{[0-9]+}}

diff  --git a/clang/test/CodeGenCXX/debug-info-nested-exprs.cpp b/clang/test/CodeGenCXX/debug-info-nested-exprs.cpp
index 7a4afd00626fa..8f07508be3465 100644
--- a/clang/test/CodeGenCXX/debug-info-nested-exprs.cpp
+++ b/clang/test/CodeGenCXX/debug-info-nested-exprs.cpp
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-pc-windows-msvc -debug-info-kind=limited \
+// RUN: %clang_cc1 -triple=x86_64-pc-windows-msvc -debug-info-kind=limited \
 // RUN:    -std=c++11 -gcodeview -gno-column-info -emit-llvm -o - %s \
 // RUN:    | FileCheck -check-prefix=NONEST %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-pc-windows-msvc -debug-info-kind=limited \
+// RUN: %clang_cc1 -triple=x86_64-pc-windows-msvc -debug-info-kind=limited \
 // RUN:    -std=c++11 -gcodeview -emit-llvm -o - %s \
 // RUN:    | FileCheck -check-prefix=COLUMNS %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-unknown-linux-gnu -debug-info-kind=limited \
+// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -debug-info-kind=limited \
 // RUN:    -std=c++11 -gno-column-info -emit-llvm -o - %s | FileCheck -check-prefix=NESTED %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-unknown-linux-gnu -debug-info-kind=limited \
+// RUN: %clang_cc1 -triple=x86_64-unknown-linux-gnu -debug-info-kind=limited \
 // RUN:    -std=c++11 -emit-llvm -o - %s \
 // RUN:    | FileCheck -check-prefix=COLUMNS %s
 
@@ -33,37 +33,37 @@ int foo(int x, int y, int z) {
   // NONEST: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[LOC:[0-9]+]]
   // NONEST: call noundef i32 @{{.*}}baz{{.*}}, !dbg ![[LOC]]
   // NONEST: call noundef i32 @{{.*}}qux{{.*}}, !dbg ![[LOC]]
-  // NONEST: store i32 {{.*}}, i32* %a,{{.*}} !dbg ![[LOC]]
+  // NONEST: store i32 {{.*}}, ptr %a,{{.*}} !dbg ![[LOC]]
   // NESTED: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[BAR:[0-9]+]]
   // NESTED: call noundef i32 @{{.*}}baz{{.*}}, !dbg ![[BAZ:[0-9]+]]
   // NESTED: call noundef i32 @{{.*}}qux{{.*}}, !dbg ![[QUX:[0-9]+]]
-  // NESTED: store i32 {{.*}}, i32* %a,{{.*}} !dbg ![[BAR]]
+  // NESTED: store i32 {{.*}}, ptr %a,{{.*}} !dbg ![[BAR]]
   // COLUMNS: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[BAR:[0-9]+]]
   // COLUMNS: call noundef i32 @{{.*}}baz{{.*}}, !dbg ![[BAZ:[0-9]+]]
   // COLUMNS: call noundef i32 @{{.*}}qux{{.*}}, !dbg ![[QUX:[0-9]+]]
-  // COLUMNS: store i32 {{.*}}, i32* %a,{{.*}} !dbg ![[DECLA:[0-9]+]]
+  // COLUMNS: store i32 {{.*}}, ptr %a,{{.*}} !dbg ![[DECLA:[0-9]+]]
 
   int i = 1, b = 0, c = 0;
-  // NONEST: store i32 1, i32* %i,{{.*}} !dbg ![[ILOC:[0-9]+]]
-  // NONEST: store i32 0, i32* %b,{{.*}} !dbg ![[ILOC]]
-  // NONEST: store i32 0, i32* %c,{{.*}} !dbg ![[ILOC]]
-  // NESTED: store i32 1, i32* %i,{{.*}} !dbg ![[ILOC:[0-9]+]]
-  // NESTED: store i32 0, i32* %b,{{.*}} !dbg ![[ILOC]]
-  // NESTED: store i32 0, i32* %c,{{.*}} !dbg ![[ILOC]]
-  // COLUMNS: store i32 1, i32* %i,{{.*}} !dbg ![[ILOC:[0-9]+]]
-  // COLUMNS: store i32 0, i32* %b,{{.*}} !dbg ![[BLOC:[0-9]+]]
-  // COLUMNS: store i32 0, i32* %c,{{.*}} !dbg ![[CLOC:[0-9]+]]
+  // NONEST: store i32 1, ptr %i,{{.*}} !dbg ![[ILOC:[0-9]+]]
+  // NONEST: store i32 0, ptr %b,{{.*}} !dbg ![[ILOC]]
+  // NONEST: store i32 0, ptr %c,{{.*}} !dbg ![[ILOC]]
+  // NESTED: store i32 1, ptr %i,{{.*}} !dbg ![[ILOC:[0-9]+]]
+  // NESTED: store i32 0, ptr %b,{{.*}} !dbg ![[ILOC]]
+  // NESTED: store i32 0, ptr %c,{{.*}} !dbg ![[ILOC]]
+  // COLUMNS: store i32 1, ptr %i,{{.*}} !dbg ![[ILOC:[0-9]+]]
+  // COLUMNS: store i32 0, ptr %b,{{.*}} !dbg ![[BLOC:[0-9]+]]
+  // COLUMNS: store i32 0, ptr %c,{{.*}} !dbg ![[CLOC:[0-9]+]]
 
   while (i > 0) {
     b = bar(a, b);
     --i;
   }
   // NONEST: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[WHILE1:[0-9]+]]
-  // NONEST: store i32 %{{[^,]+}}, i32* %i,{{.*}} !dbg ![[WHILE2:[0-9]+]]
+  // NONEST: store i32 %{{[^,]+}}, ptr %i,{{.*}} !dbg ![[WHILE2:[0-9]+]]
   // NESTED: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[WHILE1:[0-9]+]]
-  // NESTED: store i32 %{{[^,]+}}, i32* %i,{{.*}} !dbg ![[WHILE2:[0-9]+]]
+  // NESTED: store i32 %{{[^,]+}}, ptr %i,{{.*}} !dbg ![[WHILE2:[0-9]+]]
   // COLUMNS: call noundef i32 @{{.*}}bar{{.*}}, !dbg ![[WHILE1:[0-9]+]]
-  // COLUMNS: store i32 %{{[^,]+}}, i32* %i,{{.*}} !dbg ![[WHILE2:[0-9]+]]
+  // COLUMNS: store i32 %{{[^,]+}}, ptr %i,{{.*}} !dbg ![[WHILE2:[0-9]+]]
 
   for (i = 0; i < 1; i++) {
     b = bar(a, b);
@@ -81,38 +81,38 @@ int foo(int x, int y, int z) {
     a = b;
     b = t;
   }
-  // NONEST: store i32 %{{[^,]+}}, i32* %t,{{.*}} !dbg ![[IF1:[0-9]+]]
-  // NONEST: store i32 %{{[^,]+}}, i32* %a,{{.*}} !dbg ![[IF2:[0-9]+]]
-  // NONEST: store i32 %{{[^,]+}}, i32* %b,{{.*}} !dbg ![[IF3:[0-9]+]]
-  // NESTED: store i32 %{{[^,]+}}, i32* %t,{{.*}} !dbg ![[IF1:[0-9]+]]
-  // NESTED: store i32 %{{[^,]+}}, i32* %a,{{.*}} !dbg ![[IF2:[0-9]+]]
-  // NESTED: store i32 %{{[^,]+}}, i32* %b,{{.*}} !dbg ![[IF3:[0-9]+]]
-  // COLUMNS: store i32 %{{[^,]+}}, i32* %t,{{.*}} !dbg ![[IF1:[0-9]+]]
-  // COLUMNS: store i32 %{{[^,]+}}, i32* %a,{{.*}} !dbg ![[IF2:[0-9]+]]
-  // COLUMNS: store i32 %{{[^,]+}}, i32* %b,{{.*}} !dbg ![[IF3:[0-9]+]]
+  // NONEST: store i32 %{{[^,]+}}, ptr %t,{{.*}} !dbg ![[IF1:[0-9]+]]
+  // NONEST: store i32 %{{[^,]+}}, ptr %a,{{.*}} !dbg ![[IF2:[0-9]+]]
+  // NONEST: store i32 %{{[^,]+}}, ptr %b,{{.*}} !dbg ![[IF3:[0-9]+]]
+  // NESTED: store i32 %{{[^,]+}}, ptr %t,{{.*}} !dbg ![[IF1:[0-9]+]]
+  // NESTED: store i32 %{{[^,]+}}, ptr %a,{{.*}} !dbg ![[IF2:[0-9]+]]
+  // NESTED: store i32 %{{[^,]+}}, ptr %b,{{.*}} !dbg ![[IF3:[0-9]+]]
+  // COLUMNS: store i32 %{{[^,]+}}, ptr %t,{{.*}} !dbg ![[IF1:[0-9]+]]
+  // COLUMNS: store i32 %{{[^,]+}}, ptr %a,{{.*}} !dbg ![[IF2:[0-9]+]]
+  // COLUMNS: store i32 %{{[^,]+}}, ptr %b,{{.*}} !dbg ![[IF3:[0-9]+]]
 
   int d = onearg(
       noargs());
   // NONEST: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[DECLD:[0-9]+]]
   // NONEST: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[DECLD]]
-  // NONEST: store i32 %{{[^,]+}}, i32* %d,{{.*}} !dbg ![[DECLD]]
+  // NONEST: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[DECLD]]
   // NESTED: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[DNOARGS:[0-9]+]]
   // NESTED: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[DECLD:[0-9]+]]
-  // NESTED: store i32 %{{[^,]+}}, i32* %d,{{.*}} !dbg ![[DECLD]]
+  // NESTED: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[DECLD]]
   // COLUMNS: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[DNOARGS:[0-9]+]]
   // COLUMNS: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[DONEARG:[0-9]+]]
-  // COLUMNS: store i32 %{{[^,]+}}, i32* %d,{{.*}} !dbg ![[DECLD:[0-9]+]]
+  // COLUMNS: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[DECLD:[0-9]+]]
   
   d = onearg(noargs());
   // NONEST: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[SETD:[0-9]+]]
   // NONEST: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[SETD]]
-  // NONEST: store i32 %{{[^,]+}}, i32* %d,{{.*}} !dbg ![[SETD]]
+  // NONEST: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[SETD]]
   // NESTED: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[SETD:[0-9]+]]
   // NESTED: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[SETD]]
-  // NESTED: store i32 %{{[^,]+}}, i32* %d,{{.*}} !dbg ![[SETD]]
+  // NESTED: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[SETD]]
   // COLUMNS: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[SETDNOARGS:[0-9]+]]
   // COLUMNS: call noundef i32 @{{.*}}onearg{{.*}}, !dbg ![[SETDONEARG:[0-9]+]]
-  // COLUMNS: store i32 %{{[^,]+}}, i32* %d,{{.*}} !dbg ![[SETD:[0-9]+]]
+  // COLUMNS: store i32 %{{[^,]+}}, ptr %d,{{.*}} !dbg ![[SETD:[0-9]+]]
 
   for (const auto x : range(noargs())) noargs1();
   // NONEST: call noundef i32 @{{.*}}noargs{{.*}}, !dbg ![[RANGEFOR:[0-9]+]]

diff  --git a/clang/test/CodeGenCXX/debug-info-structured-binding.cpp b/clang/test/CodeGenCXX/debug-info-structured-binding.cpp
index e0fbf0bf3647a..8d4ae0aaf3263 100644
--- a/clang/test/CodeGenCXX/debug-info-structured-binding.cpp
+++ b/clang/test/CodeGenCXX/debug-info-structured-binding.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -debug-info-kind=standalone -triple %itanium_abi_triple %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=standalone -triple %itanium_abi_triple %s -o - | FileCheck %s
 
-// CHECK: call void @llvm.dbg.declare(metadata %struct.A* %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression())
-// CHECK: call void @llvm.dbg.declare(metadata %struct.A* %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression(DW_OP_plus_uconst, {{[0-9]+}}))
-// CHECK: call void @llvm.dbg.declare(metadata %struct.A* %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression())
-// CHECK: call void @llvm.dbg.declare(metadata %struct.A** %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression(DW_OP_deref))
-// CHECK: call void @llvm.dbg.declare(metadata %struct.A** %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression(DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}))
-// CHECK: call void @llvm.dbg.declare(metadata %struct.A** %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression())
+// CHECK: call void @llvm.dbg.declare(metadata ptr %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression())
+// CHECK: call void @llvm.dbg.declare(metadata ptr %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression(DW_OP_plus_uconst, {{[0-9]+}}))
+// CHECK: call void @llvm.dbg.declare(metadata ptr %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression())
+// CHECK: call void @llvm.dbg.declare(metadata ptr %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression(DW_OP_deref))
+// CHECK: call void @llvm.dbg.declare(metadata ptr %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression(DW_OP_deref, DW_OP_plus_uconst, {{[0-9]+}}))
+// CHECK: call void @llvm.dbg.declare(metadata ptr %{{[0-9]+}}, metadata !{{[0-9]+}}, metadata !DIExpression())
 struct A {
   int x;
   int y;

diff  --git a/clang/test/CodeGenCXX/debug-info-thunk-msabi.cpp b/clang/test/CodeGenCXX/debug-info-thunk-msabi.cpp
index bfa3443cb1aa1..cc59f0ba84d13 100644
--- a/clang/test/CodeGenCXX/debug-info-thunk-msabi.cpp
+++ b/clang/test/CodeGenCXX/debug-info-thunk-msabi.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple i386-pc-windows-msvc19.0.0 -emit-llvm \
+// RUN: %clang_cc1 %s -triple i386-pc-windows-msvc19.0.0 -emit-llvm \
 // RUN:     -debug-info-kind=line-tables-only -fms-extensions -o - | FileCheck %s
 class __declspec(dllexport) A {
   A(int * = new int) {}
@@ -6,7 +6,7 @@ class __declspec(dllexport) A {
 // CHECK: define {{.*}}void @"??_FA@@AAEXXZ"
 // CHECK-SAME: !dbg ![[SP:[0-9]+]]
 // CHECK-NOT: {{ret }}
-// CHECK: call x86_thiscallcc noundef %class.A* @"??0A@@AAE at PAH@Z"
+// CHECK: call x86_thiscallcc noundef ptr @"??0A@@AAE at PAH@Z"
 // CHECK-SAME: !dbg ![[DBG:[0-9]+]]
 // CHECK: ret void, !dbg
 //

diff  --git a/clang/test/CodeGenCXX/debug-info-uuid.cpp b/clang/test/CodeGenCXX/debug-info-uuid.cpp
index 835d59bb6ee27..09279f20f140a 100644
--- a/clang/test/CodeGenCXX/debug-info-uuid.cpp
+++ b/clang/test/CodeGenCXX/debug-info-uuid.cpp
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -debug-info-kind=limited %s -o - -std=c++11 | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -fms-extensions -triple=x86_64-unknown-unknown -debug-info-kind=limited %s -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-ITANIUM
+// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-pc-win32 -debug-info-kind=limited %s -o - -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -fms-extensions -triple=x86_64-unknown-unknown -debug-info-kind=limited %s -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=CHECK-ITANIUM
 
 // CHECK: !DICompositeType(tag: DW_TAG_structure_type, name: "tmpl_guid2<GUID{12345678-1234-1234-1234-1234567890ab}>"
 // CHECK-SAME:             templateParams: [[TGI2ARGS:![0-9]*]]
 // CHECK: [[TGI2ARGS]] = !{[[TGI2ARG1:![0-9]*]]}
 // CHECK: [[TGI2ARG1]] = !DITemplateValueParameter(
 // CHECK-SAME:                                     type: [[CONST_GUID_REF:![0-9]*]]
-// CHECK-SAME:                                     value: %struct._GUID* @_GUID_12345678_1234_1234_1234_1234567890ab
+// CHECK-SAME:                                     value: ptr @_GUID_12345678_1234_1234_1234_1234567890ab
 // CHECK: [[CONST_GUID_REF]] = !DIDerivedType(tag: DW_TAG_reference_type,
 // CHECK-SAME:                                baseType: [[CONST_GUID:![0-9]*]]
 // CHECK: [[CONST_GUID]] = !DIDerivedType(tag: DW_TAG_const_type
@@ -18,7 +18,7 @@
 // CHECK: [[TGIARGS]] = !{[[TGIARG1:![0-9]*]]}
 // CHECK: [[TGIARG1]] = !DITemplateValueParameter(
 // CHECK-SAME:                                    type: [[CONST_GUID_PTR:![0-9]*]]
-// CHECK-SAME:                                    value: %struct._GUID* @_GUID_12345678_1234_1234_1234_1234567890ab
+// CHECK-SAME:                                    value: ptr @_GUID_12345678_1234_1234_1234_1234567890ab
 // CHECK: [[CONST_GUID_PTR]] = !DIDerivedType(tag: DW_TAG_pointer_type
 // CHECK-SAME:                                baseType: [[CONST_GUID:![0-9]*]]
 // CHECK-SAME:                                size: 64

diff  --git a/clang/test/CodeGenCXX/debug-info.cpp b/clang/test/CodeGenCXX/debug-info.cpp
index f58d049a558e0..128b56e9150f3 100644
--- a/clang/test/CodeGenCXX/debug-info.cpp
+++ b/clang/test/CodeGenCXX/debug-info.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=BOTH
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-pc-windows-msvc -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=MSVC --check-prefix=BOTH
+// RUN: %clang_cc1 -triple x86_64-none-linux-gnu -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=CHECK --check-prefix=BOTH
+// RUN: %clang_cc1 -triple i686-pc-windows-msvc -emit-llvm -debug-info-kind=limited %s -o - | FileCheck %s --check-prefix=MSVC --check-prefix=BOTH
 
-// CHECK: @_ZN6pr96081xE ={{.*}} global [3 x i8]* null, align 8, !dbg [[X:![0-9]+]]
+// CHECK: @_ZN6pr96081xE ={{.*}} global ptr null, align 8, !dbg [[X:![0-9]+]]
 
 // CHECK: define{{.*}} void @_ZN7pr147634funcENS_3fooE
 // CHECK: call void @llvm.dbg.declare({{.*}}, metadata ![[F:[0-9]+]], metadata !DIExpression())

diff  --git a/clang/test/CodeGenCXX/decl-ref-init.cpp b/clang/test/CodeGenCXX/decl-ref-init.cpp
index 05d87906c41c0..1d1fad4657d3a 100644
--- a/clang/test/CodeGenCXX/decl-ref-init.cpp
+++ b/clang/test/CodeGenCXX/decl-ref-init.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -emit-llvm %s -o - | \
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm %s -o - | \
 // RUN: FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-apple-darwin -emit-llvm %s -o - | \
+// RUN: %clang_cc1 -triple i386-apple-darwin -emit-llvm %s -o - | \
 // RUN: FileCheck %s
 
 struct A {};
@@ -23,5 +23,5 @@ int main() {
 	const A& rca2 = d();
 }
 
-// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
-// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.A* @_ZN1BcvR1AEv
+// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN1BcvR1AEv
+// CHECK: call noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN1BcvR1AEv

diff  --git a/clang/test/CodeGenCXX/default-arguments.cpp b/clang/test/CodeGenCXX/default-arguments.cpp
index 4fcd80aad190e..215bcd882e962 100644
--- a/clang/test/CodeGenCXX/default-arguments.cpp
+++ b/clang/test/CodeGenCXX/default-arguments.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
 
 // PR5484
 namespace PR5484 {
@@ -42,14 +42,14 @@ struct C {
  C();
 };
 
-// CHECK-LABEL: define{{.*}} void @_ZN1CC2Ev(%struct.C* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1CC2Ev(ptr {{[^,]*}} %this) unnamed_addr
 // CHECK: call void @_ZN2A1C1Ev(
 // CHECK: call void @_ZN2A2C1Ev(
 // CHECK: call void @_ZN1BC1ERK2A1RK2A2(
 // CHECK: call void @_ZN2A2D1Ev
 // CHECK: call void @_ZN2A1D1Ev
 
-// CHECK-LABEL: define{{.*}} void @_ZN1CC1Ev(%struct.C* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1CC1Ev(ptr {{[^,]*}} %this) unnamed_addr
 // CHECK: call void @_ZN1CC2Ev(
 C::C() { }
 

diff  --git a/clang/test/CodeGenCXX/default-constructor-template-member.cpp b/clang/test/CodeGenCXX/default-constructor-template-member.cpp
index 0c62e0520ad2e..d60d0bee15180 100644
--- a/clang/test/CodeGenCXX/default-constructor-template-member.cpp
+++ b/clang/test/CodeGenCXX/default-constructor-template-member.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple %itanium_abi_triple -emit-llvm %s -o - | FileCheck %s
 
 template <class T> struct A { A(); };
 struct B { A<int> x; };
@@ -7,5 +7,5 @@ void a() {
 }
 
 // CHECK: call {{.*}} @_ZN1BC1Ev
-// CHECK: define linkonce_odr {{.*}} @_ZN1BC1Ev(%struct.B* {{.*}}%this) unnamed_addr
+// CHECK: define linkonce_odr {{.*}} @_ZN1BC1Ev(ptr {{.*}}%this) unnamed_addr
 // CHECK: call {{.*}} @_ZN1AIiEC1Ev

diff  --git a/clang/test/CodeGenCXX/deferred-global-init.cpp b/clang/test/CodeGenCXX/deferred-global-init.cpp
index 09fe31c565acd..ace76ccd79ac6 100644
--- a/clang/test/CodeGenCXX/deferred-global-init.cpp
+++ b/clang/test/CodeGenCXX/deferred-global-init.cpp
@@ -1,14 +1,14 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
 // PR5967
 
 extern void* foo;
 static void* const a = foo;
 void* bar() { return a; }
 
-// CHECK: @_ZL1a = internal global i8* null
+// CHECK: @_ZL1a = internal global ptr null
 
 // CHECK-LABEL: define internal {{.*}}void @__cxx_global_var_init
-// CHECK: load i8*, i8** @foo
+// CHECK: load ptr, ptr @foo
 // CHECK: ret void
 
 // CHECK-LABEL: define internal {{.*}}void @_GLOBAL__sub_I_deferred_global_init.cpp

diff  --git a/clang/test/CodeGenCXX/derived-cast.cpp b/clang/test/CodeGenCXX/derived-cast.cpp
index e3e40a103a497..44a5a08c28804 100644
--- a/clang/test/CodeGenCXX/derived-cast.cpp
+++ b/clang/test/CodeGenCXX/derived-cast.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm %s -o - | FileCheck %s
 
 class A {
     int a;
@@ -19,9 +19,8 @@ class X : public A, public B {
 A *B::getAsA() {
   return static_cast<X*>(this);
 
-  // CHECK-LABEL: define{{.*}} %class.A* @_ZN1B6getAsAEv
-  // CHECK: %[[THIS:.*]] = load %class.B*, %class.B**
-  // CHECK-NEXT: %[[BC:.*]] = bitcast %class.B* %[[THIS]] to i8*
-  // CHECK-NEXT: getelementptr inbounds i8, i8* %[[BC]], i64 -4
+  // CHECK-LABEL: define{{.*}} ptr @_ZN1B6getAsAEv
+  // CHECK: %[[THIS:.*]] = load ptr, ptr
+  // CHECK-NEXT: getelementptr inbounds i8, ptr %[[THIS]], i64 -4
 }
 

diff  --git a/clang/test/CodeGenCXX/derived-to-base.cpp b/clang/test/CodeGenCXX/derived-to-base.cpp
index a7775dabbc0a9..c8dbd5bf5cb05 100644
--- a/clang/test/CodeGenCXX/derived-to-base.cpp
+++ b/clang/test/CodeGenCXX/derived-to-base.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
 struct A { 
   void f(); 
   
@@ -15,20 +15,20 @@ void f() {
   b.f();
 }
 
-// CHECK: define{{.*}} %struct.B* @_Z1fP1A(%struct.A* noundef %a) [[NUW:#[0-9]+]]
+// CHECK: define{{.*}} ptr @_Z1fP1A(ptr noundef %a) [[NUW:#[0-9]+]]
 B *f(A *a) {
   // CHECK-NOT: br label
-  // CHECK: ret %struct.B*
+  // CHECK: ret ptr
   return static_cast<B*>(a);
 }
 
 // PR5965
 namespace PR5965 {
 
-// CHECK: define{{.*}} %struct.A* @_ZN6PR59651fEP1B(%struct.B* noundef %b) [[NUW]]
+// CHECK: define{{.*}} ptr @_ZN6PR59651fEP1B(ptr noundef %b) [[NUW]]
 A *f(B* b) {
   // CHECK-NOT: br label
-  // CHECK: ret %struct.A*
+  // CHECK: ret ptr
   return b;
 }
 

diff  --git a/clang/test/CodeGenCXX/devirtualize-ms-dtor.cpp b/clang/test/CodeGenCXX/devirtualize-ms-dtor.cpp
index 4e9e855744a86..ad0416f0c9784 100644
--- a/clang/test/CodeGenCXX/devirtualize-ms-dtor.cpp
+++ b/clang/test/CodeGenCXX/devirtualize-ms-dtor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-msvc %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-msvc %s -emit-llvm -o - | FileCheck %s
 
 // If we de-virtualize ~Foo, we still need to call ??1Foo, not ??_DFoo.
 
@@ -11,6 +11,6 @@ void f(Foo *p) {
   p->~Foo();
 }
 
-// CHECK-LABEL: define{{.*}} void @"?f@@YAXPEAUFoo@@@Z"(%struct.Foo* noundef %p)
+// CHECK-LABEL: define{{.*}} void @"?f@@YAXPEAUFoo@@@Z"(ptr noundef %p)
 // CHECK: call void @"??1Foo@@UEAA at XZ"
 // CHECK: ret void

diff  --git a/clang/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp b/clang/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp
index 5dfd6de1f52a7..b50881db63e05 100644
--- a/clang/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp
+++ b/clang/test/CodeGenCXX/devirtualize-virtual-function-calls.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++98 %s -triple armv7-none-eabi -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 %s -triple armv7-none-eabi -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1z %s -triple armv7-none-eabi -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++98 %s -triple armv7-none-eabi -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 %s -triple armv7-none-eabi -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++1z %s -triple armv7-none-eabi -emit-llvm -o - | FileCheck %s
 
 struct A {
   virtual void f();
@@ -15,7 +15,7 @@ A g();
 void f(A a, A *ap, A& ar) {
   // This should not be a virtual function call.
   
-  // CHECK: call void @_ZN1A1fEv(%struct.A* {{[^,]*}} %a)
+  // CHECK: call void @_ZN1A1fEv(ptr {{[^,]*}} %a)
   a.f();
 
   // CHECK: call void %  
@@ -46,10 +46,10 @@ struct XD { D d; };
 D gd();
 
 void fd(D d, XD xd, D *p) {
-  // CHECK: call void @_ZN1A1fEv(%struct.A*
+  // CHECK: call void @_ZN1A1fEv(ptr
   d.f();
 
-  // CHECK: call void @_ZN1D1gEv(%struct.D*
+  // CHECK: call void @_ZN1D1gEv(ptr
   d.g();
 
   // CHECK: call void @_ZN1A1fEv
@@ -127,7 +127,7 @@ namespace test2 {
 
   void f(bar *b) {
     // CHECK: call void @_ZN5test23foo1fEv
-    // CHECK: call noundef %"struct.test2::foo"* @_ZN5test23fooD1Ev
+    // CHECK: call noundef ptr @_ZN5test23fooD1Ev
     b->foo::f();
     b->foo::~foo();
   }

diff  --git a/clang/test/CodeGenCXX/dllexport-alias.cpp b/clang/test/CodeGenCXX/dllexport-alias.cpp
index 6feac1171ed1f..6f659e5fd3b83 100644
--- a/clang/test/CodeGenCXX/dllexport-alias.cpp
+++ b/clang/test/CodeGenCXX/dllexport-alias.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-gnu -mconstructor-aliases %s -S -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-gnu -mconstructor-aliases %s -S -emit-llvm -o - | FileCheck %s
 
 // This test assumes that the C1 constructor will be aliased to the C2
 // constructor, and the D1 destructor to the D2. It then checks that the aliases
@@ -14,5 +14,5 @@ A::A() {}
 
 A::~A() {}
 
-// CHECK: @_ZN1AC1Ev = dso_local dllexport unnamed_addr alias void (%class.A*), void (%class.A*)* @_ZN1AC2Ev
-// CHECK: @_ZN1AD1Ev = dso_local dllexport unnamed_addr alias void (%class.A*), void (%class.A*)* @_ZN1AD2Ev
+// CHECK: @_ZN1AC1Ev = dso_local dllexport unnamed_addr alias void (ptr), ptr @_ZN1AC2Ev
+// CHECK: @_ZN1AD1Ev = dso_local dllexport unnamed_addr alias void (ptr), ptr @_ZN1AD2Ev

diff  --git a/clang/test/CodeGenCXX/dllexport-ctor-closure.cpp b/clang/test/CodeGenCXX/dllexport-ctor-closure.cpp
index 50cc2237ae2e0..8aeb9b9176fcd 100644
--- a/clang/test/CodeGenCXX/dllexport-ctor-closure.cpp
+++ b/clang/test/CodeGenCXX/dllexport-ctor-closure.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-msvc -emit-llvm -std=c++14 \
+// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++14 \
 // RUN:    -fno-threadsafe-statics -fms-extensions -O1 -mconstructor-aliases \
 // RUN:    -disable-llvm-passes -o - %s -w -fms-compatibility-version=19.00 | \
 // RUN:    FileCheck %s
@@ -6,10 +6,10 @@
 struct CtorWithClosure {
   __declspec(dllexport) CtorWithClosure(...) {}
 // CHECK-LABEL: define weak_odr dso_local dllexport x86_thiscallcc void @"??_FCtorWithClosure@@QAEXXZ"({{.*}}) {{#[0-9]+}} comdat
-// CHECK:   %[[this_addr:.*]] = alloca %struct.CtorWithClosure*, align 4
-// CHECK:   store %struct.CtorWithClosure* %this, %struct.CtorWithClosure** %[[this_addr]], align 4
-// CHECK:   %[[this:.*]] = load %struct.CtorWithClosure*, %struct.CtorWithClosure** %[[this_addr]]
-// CHECK:   call noundef %struct.CtorWithClosure* (%struct.CtorWithClosure*, ...) @"??0CtorWithClosure@@QAA at ZZ"(%struct.CtorWithClosure* {{[^,]*}} %[[this]])
+// CHECK:   %[[this_addr:.*]] = alloca ptr, align 4
+// CHECK:   store ptr %this, ptr %[[this_addr]], align 4
+// CHECK:   %[[this:.*]] = load ptr, ptr %[[this_addr]]
+// CHECK:   call noundef ptr (ptr, ...) @"??0CtorWithClosure@@QAA at ZZ"(ptr {{[^,]*}} %[[this]])
 // CHECK:   ret void
 };
 
@@ -29,10 +29,10 @@ struct __declspec(dllexport) ClassWithClosure {
   DELETE_IMPLICIT_MEMBERS(ClassWithClosure);
   ClassWithClosure(...) {}
 // CHECK-LABEL: define weak_odr dso_local dllexport x86_thiscallcc void @"??_FClassWithClosure@@QAEXXZ"({{.*}}) {{#[0-9]+}} comdat
-// CHECK:   %[[this_addr:.*]] = alloca %struct.ClassWithClosure*, align 4
-// CHECK:   store %struct.ClassWithClosure* %this, %struct.ClassWithClosure** %[[this_addr]], align 4
-// CHECK:   %[[this:.*]] = load %struct.ClassWithClosure*, %struct.ClassWithClosure** %[[this_addr]]
-// CHECK:   call noundef %struct.ClassWithClosure* (%struct.ClassWithClosure*, ...) @"??0ClassWithClosure@@QAA at ZZ"(%struct.ClassWithClosure* {{[^,]*}} %[[this]])
+// CHECK:   %[[this_addr:.*]] = alloca ptr, align 4
+// CHECK:   store ptr %this, ptr %[[this_addr]], align 4
+// CHECK:   %[[this:.*]] = load ptr, ptr %[[this_addr]]
+// CHECK:   call noundef ptr (ptr, ...) @"??0ClassWithClosure@@QAA at ZZ"(ptr {{[^,]*}} %[[this]])
 // CHECK:   ret void
 };
 

diff  --git a/clang/test/CodeGenCXX/dllexport-dtor-thunks.cpp b/clang/test/CodeGenCXX/dllexport-dtor-thunks.cpp
index 971749f16fb3a..68ab2cff1c052 100644
--- a/clang/test/CodeGenCXX/dllexport-dtor-thunks.cpp
+++ b/clang/test/CodeGenCXX/dllexport-dtor-thunks.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -mconstructor-aliases -fms-extensions %s -emit-llvm -o - -triple x86_64-windows-msvc | FileCheck %s
+// RUN: %clang_cc1 -mconstructor-aliases -fms-extensions %s -emit-llvm -o - -triple x86_64-windows-msvc | FileCheck %s
 
 namespace test1 {
 struct A { ~A(); };
@@ -14,4 +14,4 @@ C::~C() {}
 
 // CHECK: define dso_local dllexport void @"??1C@@UEAA at XZ"
 // This thunk should *not* be dllexport.
-// CHECK: define linkonce_odr dso_local noundef i8* @"??_EC@@W7EAAPEAXI at Z"
+// CHECK: define linkonce_odr dso_local noundef ptr @"??_EC@@W7EAAPEAXI at Z"

diff  --git a/clang/test/CodeGenCXX/dllexport-members.cpp b/clang/test/CodeGenCXX/dllexport-members.cpp
index 66108e62b9048..2ce41d025c3d3 100644
--- a/clang/test/CodeGenCXX/dllexport-members.cpp
+++ b/clang/test/CodeGenCXX/dllexport-members.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-msvc   -fms-compatibility -fms-compatibility-version=18 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-msvc -fms-compatibility -fms-compatibility-version=18 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M64 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-msvc   -fms-compatibility -fms-compatibility-version=19 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=M32VS2015 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-msvc -fms-compatibility -fms-compatibility-version=19 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=M64VS2015 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-gnu                       -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-gnu                     -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc   -fms-compatibility -fms-compatibility-version=18 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M32 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-msvc -fms-compatibility -fms-compatibility-version=18 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=MSC --check-prefix=M64 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc   -fms-compatibility -fms-compatibility-version=19 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=M32VS2015 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-msvc -fms-compatibility -fms-compatibility-version=19 -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=M64VS2015 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu                       -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G32 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-gnu                     -emit-llvm -std=c++1y -O0 -o - %s | FileCheck --check-prefix=GNU --check-prefix=G64 %s
 
 // Helper structs to make templates more expressive.
 struct ImplicitInst_Exported {};
@@ -26,22 +26,22 @@ extern "C" void free(void* p);
 struct ExportMembers {
   struct Nested;
 
-  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?normalDef at ExportMembers@@QAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define          dso_local dllexport                void @"?normalDef at ExportMembers@@QEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInclass at ExportMembers@@QAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInclass at ExportMembers@@QEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDef at ExportMembers@@QAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInlineDef at ExportMembers@@QEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDecl at ExportMembers@@QAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInlineDecl at ExportMembers@@QEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers9normalDefEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers9normalDefEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers13normalInclassEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers13normalInclassEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers15normalInlineDefEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers15normalInlineDefEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers16normalInlineDeclEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers16normalInlineDeclEv(%struct.ExportMembers* {{[^,]*}} %this)
+  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?normalDef at ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define          dso_local dllexport                void @"?normalDef at ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInclass at ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInclass at ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDef at ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInlineDef at ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDecl at ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInlineDecl at ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers9normalDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers9normalDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers13normalInclassEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers13normalInclassEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers15normalInlineDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers15normalInlineDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this)
   // M32-DAG: define linkonce_odr dso_local       x86_thiscallcc void @"?referencedNonExportedInClass at ExportMembers@@QAEXXZ"
   __declspec(dllexport)                void normalDef();
   __declspec(dllexport)                void normalInclass() { referencedNonExportedInClass(); }
@@ -49,22 +49,22 @@ struct ExportMembers {
   __declspec(dllexport)         inline void normalInlineDecl();
                                        void referencedNonExportedInClass() {}
 
-  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?virtualDef at ExportMembers@@UAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define          dso_local dllexport                void @"?virtualDef at ExportMembers@@UEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInclass at ExportMembers@@UAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInclass at ExportMembers@@UEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDef at ExportMembers@@UAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInlineDef at ExportMembers@@UEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDecl at ExportMembers@@UAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInlineDecl at ExportMembers@@UEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers10virtualDefEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers10virtualDefEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers14virtualInclassEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers14virtualInclassEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers16virtualInlineDefEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers16virtualInlineDefEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers17virtualInlineDeclEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers17virtualInlineDeclEv(%struct.ExportMembers* {{[^,]*}} %this)
+  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?virtualDef at ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define          dso_local dllexport                void @"?virtualDef at ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInclass at ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInclass at ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDef at ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInlineDef at ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDecl at ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInlineDecl at ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers10virtualDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers10virtualDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers14virtualInclassEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers14virtualInclassEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this)
   __declspec(dllexport) virtual        void virtualDef();
   __declspec(dllexport) virtual        void virtualInclass() {}
   __declspec(dllexport) virtual        void virtualInlineDef();
@@ -83,30 +83,30 @@ struct ExportMembers {
   __declspec(dllexport) static         void staticInlineDef();
   __declspec(dllexport) static  inline void staticInlineDecl();
 
-  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?protectedDef at ExportMembers@@IAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define          dso_local dllexport                void @"?protectedDef at ExportMembers@@IEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers12protectedDefEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers12protectedDefEv(%struct.ExportMembers* {{[^,]*}} %this)
+  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?protectedDef at ExportMembers@@IAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define          dso_local dllexport                void @"?protectedDef at ExportMembers@@IEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers12protectedDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers12protectedDefEv(ptr {{[^,]*}} %this)
   // MSC-DAG: define          dso_local dllexport                void @"?protectedStaticDef at ExportMembers@@KAXXZ"()
   // GNU-DAG: define          dso_local dllexport                void @_ZN13ExportMembers18protectedStaticDefEv()
 protected:
   __declspec(dllexport)                void protectedDef();
   __declspec(dllexport) static         void protectedStaticDef();
 
-  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?privateDef at ExportMembers@@AAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define          dso_local dllexport                void @"?privateDef at ExportMembers@@AEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers10privateDefEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers10privateDefEv(%struct.ExportMembers* {{[^,]*}} %this)
+  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?privateDef at ExportMembers@@AAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define          dso_local dllexport                void @"?privateDef at ExportMembers@@AEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers10privateDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers10privateDefEv(ptr {{[^,]*}} %this)
   // MSC-DAG: define          dso_local dllexport                void @"?privateStaticDef at ExportMembers@@CAXXZ"()
   // GNU-DAG: define          dso_local dllexport                void @_ZN13ExportMembers16privateStaticDefEv()
 private:
   __declspec(dllexport)                void privateDef();
   __declspec(dllexport) static         void privateStaticDef();
 
-  // M32-DAG: define          dso_local x86_thiscallcc void @"?ignored at ExportMembers@@QAEXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // M64-DAG: define          dso_local                void @"?ignored at ExportMembers@@QEAAXXZ"(%struct.ExportMembers* {{[^,]*}} %this)
-  // G32-DAG: define          dso_local x86_thiscallcc void @_ZN13ExportMembers7ignoredEv(%struct.ExportMembers* {{[^,]*}} %this)
-  // G64-DAG: define          dso_local                void @_ZN13ExportMembers7ignoredEv(%struct.ExportMembers* {{[^,]*}} %this)
+  // M32-DAG: define          dso_local x86_thiscallcc void @"?ignored at ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define          dso_local                void @"?ignored at ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define          dso_local x86_thiscallcc void @_ZN13ExportMembers7ignoredEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define          dso_local                void @_ZN13ExportMembers7ignoredEv(ptr {{[^,]*}} %this)
 public:
   void ignored();
 
@@ -154,43 +154,43 @@ constexpr int ExportMembers::ConstexprField;
 
 // Export individual members of a nested class.
 struct ExportMembers::Nested {
-  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?normalDef at Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define          dso_local dllexport                void @"?normalDef at Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInclass at Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInclass at Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDef at Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInlineDef at Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDecl at Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInlineDecl at Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested9normalDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers6Nested9normalDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested13normalInclassEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested13normalInclassEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested15normalInlineDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested15normalInlineDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16normalInlineDeclEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested16normalInlineDeclEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
+  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?normalDef at Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define          dso_local dllexport                void @"?normalDef at Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInclass at Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInclass at Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDef at Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInlineDef at Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?normalInlineDecl at Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?normalInlineDecl at Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this)
   __declspec(dllexport)                void normalDef();
   __declspec(dllexport)                void normalInclass() {}
   __declspec(dllexport)                void normalInlineDef();
   __declspec(dllexport)         inline void normalInlineDecl();
 
-  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?virtualDef at Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define          dso_local dllexport                void @"?virtualDef at Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInclass at Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInclass at Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDef at Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInlineDef at Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDecl at Nested@ExportMembers@@UAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInlineDecl at Nested@ExportMembers@@UEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10virtualDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers6Nested10virtualDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested14virtualInclassEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested14virtualInclassEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16virtualInlineDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested16virtualInlineDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
+  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?virtualDef at Nested@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define          dso_local dllexport                void @"?virtualDef at Nested@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInclass at Nested@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInclass at Nested@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDef at Nested@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInlineDef at Nested@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?virtualInlineDecl at Nested@ExportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"?virtualInlineDecl at Nested@ExportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN13ExportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this)
   __declspec(dllexport) virtual        void virtualDef();
   __declspec(dllexport) virtual        void virtualInclass() {}
   __declspec(dllexport) virtual        void virtualInlineDef();
@@ -209,30 +209,30 @@ struct ExportMembers::Nested {
   __declspec(dllexport) static         void staticInlineDef();
   __declspec(dllexport) static  inline void staticInlineDecl();
 
-  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?protectedDef at Nested@ExportMembers@@IAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define          dso_local dllexport                void @"?protectedDef at Nested@ExportMembers@@IEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested12protectedDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers6Nested12protectedDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
+  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?protectedDef at Nested@ExportMembers@@IAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define          dso_local dllexport                void @"?protectedDef at Nested@ExportMembers@@IEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested12protectedDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers6Nested12protectedDefEv(ptr {{[^,]*}} %this)
   // MSC-DAG: define          dso_local dllexport                void @"?protectedStaticDef at Nested@ExportMembers@@KAXXZ"()
   // GNU-DAG: define          dso_local dllexport                void @_ZN13ExportMembers6Nested18protectedStaticDefEv()
 protected:
   __declspec(dllexport)                void protectedDef();
   __declspec(dllexport) static         void protectedStaticDef();
 
-  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?privateDef at Nested@ExportMembers@@AAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define          dso_local dllexport                void @"?privateDef at Nested@ExportMembers@@AEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10privateDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers6Nested10privateDefEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
+  // M32-DAG: define          dso_local dllexport x86_thiscallcc void @"?privateDef at Nested@ExportMembers@@AAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define          dso_local dllexport                void @"?privateDef at Nested@ExportMembers@@AEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN13ExportMembers6Nested10privateDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define          dso_local dllexport                void @_ZN13ExportMembers6Nested10privateDefEv(ptr {{[^,]*}} %this)
   // MSC-DAG: define          dso_local dllexport                void @"?privateStaticDef at Nested@ExportMembers@@CAXXZ"()
   // GNU-DAG: define          dso_local dllexport                void @_ZN13ExportMembers6Nested16privateStaticDefEv()
 private:
   __declspec(dllexport)                void privateDef();
   __declspec(dllexport) static         void privateStaticDef();
 
-  // M32-DAG: define          dso_local x86_thiscallcc void @"?ignored at Nested@ExportMembers@@QAEXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define          dso_local                void @"?ignored at Nested@ExportMembers@@QEAAXXZ"(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define          dso_local x86_thiscallcc void @_ZN13ExportMembers6Nested7ignoredEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define          dso_local                void @_ZN13ExportMembers6Nested7ignoredEv(%"struct.ExportMembers::Nested"* {{[^,]*}} %this)
+  // M32-DAG: define          dso_local x86_thiscallcc void @"?ignored at Nested@ExportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define          dso_local                void @"?ignored at Nested@ExportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define          dso_local x86_thiscallcc void @_ZN13ExportMembers6Nested7ignoredEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define          dso_local                void @_ZN13ExportMembers6Nested7ignoredEv(ptr {{[^,]*}} %this)
 public:
   void ignored();
 
@@ -280,48 +280,48 @@ constexpr int ExportMembers::Nested::ConstexprField;
 
 // Export special member functions.
 struct ExportSpecials {
-  // M32-DAG: define dso_local dllexport x86_thiscallcc %struct.ExportSpecials* @"??0ExportSpecials@@QAE at XZ"(%struct.ExportSpecials* {{[^,]*}} returned {{[^,]*}} %this)
-  // M64-DAG: define dso_local dllexport                %struct.ExportSpecials* @"??0ExportSpecials@@QEAA at XZ"(%struct.ExportSpecials* {{[^,]*}} returned {{[^,]*}} %this)
-  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1Ev(%struct.ExportSpecials* {{[^,]*}} %this)
-  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC1Ev(%struct.ExportSpecials* {{[^,]*}} %this)
-  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2Ev(%struct.ExportSpecials* {{[^,]*}} %this)
-  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC2Ev(%struct.ExportSpecials* {{[^,]*}} %this)
+  // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportSpecials@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
+  // M64-DAG: define dso_local dllexport                ptr @"??0ExportSpecials@@QEAA at XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
+  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1Ev(ptr {{[^,]*}} %this)
+  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC1Ev(ptr {{[^,]*}} %this)
+  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2Ev(ptr {{[^,]*}} %this)
+  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC2Ev(ptr {{[^,]*}} %this)
   __declspec(dllexport) ExportSpecials();
 
-  // M32-DAG: define dso_local dllexport x86_thiscallcc void @"??1ExportSpecials@@QAE at XZ"(%struct.ExportSpecials* {{[^,]*}} %this)
-  // M64-DAG: define dso_local dllexport                void @"??1ExportSpecials@@QEAA at XZ"(%struct.ExportSpecials* {{[^,]*}} %this)
-  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsD1Ev(%struct.ExportSpecials* {{[^,]*}} %this)
-  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsD1Ev(%struct.ExportSpecials* {{[^,]*}} %this)
-  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsD2Ev(%struct.ExportSpecials* {{[^,]*}} %this)
-  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsD2Ev(%struct.ExportSpecials* {{[^,]*}} %this)
+  // M32-DAG: define dso_local dllexport x86_thiscallcc void @"??1ExportSpecials@@QAE at XZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define dso_local dllexport                void @"??1ExportSpecials@@QEAA at XZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsD1Ev(ptr {{[^,]*}} %this)
+  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsD1Ev(ptr {{[^,]*}} %this)
+  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsD2Ev(ptr {{[^,]*}} %this)
+  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsD2Ev(ptr {{[^,]*}} %this)
   __declspec(dllexport) ~ExportSpecials();
 
-  // M32-DAG: define dso_local dllexport x86_thiscallcc %struct.ExportSpecials* @"??0ExportSpecials@@QAE at ABU0@@Z"(%struct.ExportSpecials* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // M64-DAG: define dso_local dllexport                %struct.ExportSpecials* @"??0ExportSpecials@@QEAA at AEBU0@@Z"(%struct.ExportSpecials* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1ERKS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC1ERKS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2ERKS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC2ERKS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportSpecials@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M64-DAG: define dso_local dllexport                ptr @"??0ExportSpecials@@QEAA at AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
   __declspec(dllexport) ExportSpecials(const ExportSpecials&);
 
-  // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"??4ExportSpecials@@QAEAAU0 at ABU0@@Z"(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // M64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"??4ExportSpecials@@QEAAAEAU0 at AEBU0@@Z"(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSERKS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSERKS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QAEAAU0 at ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QEAAAEAU0 at AEBU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
   __declspec(dllexport) ExportSpecials& operator=(const ExportSpecials&);
 
-  // M32-DAG: define dso_local dllexport x86_thiscallcc %struct.ExportSpecials* @"??0ExportSpecials@@QAE@$$QAU0@@Z"(%struct.ExportSpecials* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // M64-DAG: define dso_local dllexport                %struct.ExportSpecials* @"??0ExportSpecials@@QEAA@$$QEAU0@@Z"(%struct.ExportSpecials* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1EOS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC1EOS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2EOS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC2EOS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportSpecials@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M64-DAG: define dso_local dllexport                ptr @"??0ExportSpecials@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN14ExportSpecialsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define dso_local dllexport                void @_ZN14ExportSpecialsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
   __declspec(dllexport) ExportSpecials(ExportSpecials&&);
 
-  // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"??4ExportSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // M64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @"??4ExportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSEOS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportSpecials* @_ZN14ExportSpecialsaSEOS_(%struct.ExportSpecials* {{[^,]*}} %this, %struct.ExportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ExportSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
   __declspec(dllexport) ExportSpecials& operator=(ExportSpecials&&);
 };
 ExportSpecials::ExportSpecials() {}
@@ -334,8 +334,8 @@ ExportSpecials& ExportSpecials::operator=(ExportSpecials&&) { return *this; }
 
 // Export class with inline special member functions.
 struct ExportInlineSpecials {
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportInlineSpecials* @"??0ExportInlineSpecials@@QAE at XZ"(%struct.ExportInlineSpecials* {{[^,]*}} returned {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                %struct.ExportInlineSpecials* @"??0ExportInlineSpecials@@QEAA at XZ"(
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportInlineSpecials@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                ptr @"??0ExportInlineSpecials@@QEAA at XZ"(
   // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1Ev(
   // G64-DAG: define weak_odr dso_local dllexport                void @_ZN20ExportInlineSpecialsC1Ev(
   __declspec(dllexport) ExportInlineSpecials() {}
@@ -346,28 +346,28 @@ struct ExportInlineSpecials {
   // G64-DAG: define weak_odr dso_local dllexport                void @_ZN20ExportInlineSpecialsD1Ev(
   __declspec(dllexport) ~ExportInlineSpecials() {}
 
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportInlineSpecials* @"??0ExportInlineSpecials@@QAE at ABU0@@Z"(
-  // M64-DAG: define weak_odr dso_local dllexport                %struct.ExportInlineSpecials* @"??0ExportInlineSpecials@@QEAA at AEBU0@@Z"(
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportInlineSpecials@@QAE at ABU0@@Z"(
+  // M64-DAG: define weak_odr dso_local dllexport                ptr @"??0ExportInlineSpecials@@QEAA at AEBU0@@Z"(
   // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1ERKS_(
   // G64-DAG: define weak_odr dso_local dllexport                void @_ZN20ExportInlineSpecialsC1ERKS_(
   __declspec(dllexport) inline ExportInlineSpecials(const ExportInlineSpecials&);
 
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"??4ExportInlineSpecials@@QAEAAU0 at ABU0@@Z"(
-  // M64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"??4ExportInlineSpecials@@QEAAAEAU0 at AEBU0@@Z"(
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSERKS_(
-  // G64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSERKS_(
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QAEAAU0 at ABU0@@Z"(
+  // M64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QEAAAEAU0 at AEBU0@@Z"(
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSERKS_(
+  // G64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSERKS_(
   __declspec(dllexport) ExportInlineSpecials& operator=(const ExportInlineSpecials&);
 
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportInlineSpecials* @"??0ExportInlineSpecials@@QAE@$$QAU0@@Z"(
-  // M64-DAG: define weak_odr dso_local dllexport                %struct.ExportInlineSpecials* @"??0ExportInlineSpecials@@QEAA@$$QEAU0@@Z"(
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportInlineSpecials@@QAE@$$QAU0@@Z"(
+  // M64-DAG: define weak_odr dso_local dllexport                ptr @"??0ExportInlineSpecials@@QEAA@$$QEAU0@@Z"(
   // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN20ExportInlineSpecialsC1EOS_(
   // G64-DAG: define weak_odr dso_local dllexport                void @_ZN20ExportInlineSpecialsC1EOS_(
   __declspec(dllexport) ExportInlineSpecials(ExportInlineSpecials&&) {}
 
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"??4ExportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
-  // M64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @"??4ExportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSEOS_(
-  // G64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportInlineSpecials* @_ZN20ExportInlineSpecialsaSEOS_(
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
+  // M64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSEOS_(
+  // G64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ExportInlineSpecialsaSEOS_(
   __declspec(dllexport) ExportInlineSpecials& operator=(ExportInlineSpecials&&) { return *this; }
 };
 ExportInlineSpecials::ExportInlineSpecials(const ExportInlineSpecials&) {}
@@ -384,74 +384,74 @@ struct ExportDefaultedDefs {
   __declspec(dllexport) ExportDefaultedDefs& operator=(ExportDefaultedDefs&&);
 };
 
-// M32-DAG: define dso_local dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"??0ExportDefaultedDefs@@QAE at XZ"(%struct.ExportDefaultedDefs* {{[^,]*}} returned {{[^,]*}} %this)
-// M64-DAG: define dso_local dllexport                %struct.ExportDefaultedDefs* @"??0ExportDefaultedDefs@@QEAA at XZ"(%struct.ExportDefaultedDefs* {{[^,]*}} returned {{[^,]*}} %this)
-// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1Ev(%struct.ExportDefaultedDefs* {{[^,]*}} %this)
-// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsC1Ev(%struct.ExportDefaultedDefs* {{[^,]*}} %this)
-// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2Ev(%struct.ExportDefaultedDefs* {{[^,]*}} %this)
-// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsC2Ev(%struct.ExportDefaultedDefs* {{[^,]*}} %this)
+// M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedDefs@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
+// M64-DAG: define dso_local dllexport                ptr @"??0ExportDefaultedDefs@@QEAA at XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
+// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1Ev(ptr {{[^,]*}} %this)
+// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsC1Ev(ptr {{[^,]*}} %this)
+// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2Ev(ptr {{[^,]*}} %this)
+// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsC2Ev(ptr {{[^,]*}} %this)
 __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs() = default;
 
-// M32-DAG: define dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedDefs@@QAE at XZ"(%struct.ExportDefaultedDefs* {{[^,]*}} %this)
-// M64-DAG: define dso_local dllexport                void @"??1ExportDefaultedDefs@@QEAA at XZ"(%struct.ExportDefaultedDefs* {{[^,]*}} %this)
-// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD1Ev(%struct.ExportDefaultedDefs* {{[^,]*}} %this)
-// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsD1Ev(%struct.ExportDefaultedDefs* {{[^,]*}} %this)
-// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD2Ev(%struct.ExportDefaultedDefs* {{[^,]*}} %this)
-// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsD2Ev(%struct.ExportDefaultedDefs* {{[^,]*}} %this)
+// M32-DAG: define dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedDefs@@QAE at XZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define dso_local dllexport                void @"??1ExportDefaultedDefs@@QEAA at XZ"(ptr {{[^,]*}} %this)
+// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD1Ev(ptr {{[^,]*}} %this)
+// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsD1Ev(ptr {{[^,]*}} %this)
+// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsD2Ev(ptr {{[^,]*}} %this)
+// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsD2Ev(ptr {{[^,]*}} %this)
 ExportDefaultedDefs::~ExportDefaultedDefs() = default;
 
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"??0ExportDefaultedDefs@@QAE at ABU0@@Z"(%struct.ExportDefaultedDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// M64-DAG: define weak_odr dso_local dllexport                %struct.ExportDefaultedDefs* @"??0ExportDefaultedDefs@@QEAA at AEBU0@@Z"(%struct.ExportDefaultedDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1ERKS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define weak_odr dso_local dllexport                void @_ZN19ExportDefaultedDefsC1ERKS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2ERKS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define weak_odr dso_local dllexport                void @_ZN19ExportDefaultedDefsC2ERKS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedDefs@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M64-DAG: define weak_odr dso_local dllexport                ptr @"??0ExportDefaultedDefs@@QEAA at AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define weak_odr dso_local dllexport                void @_ZN19ExportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define weak_odr dso_local dllexport                void @_ZN19ExportDefaultedDefsC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(const ExportDefaultedDefs&) = default;
 
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"??4ExportDefaultedDefs@@QAEAAU0 at ABU0@@Z"(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// M64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"??4ExportDefaultedDefs@@QEAAAEAU0 at AEBU0@@Z"(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSERKS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSERKS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QAEAAU0 at ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QEAAAEAU0 at AEBU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 inline ExportDefaultedDefs& ExportDefaultedDefs::operator=(const ExportDefaultedDefs&) = default;
 
-// M32-DAG: define dso_local dllexport x86_thiscallcc %struct.ExportDefaultedDefs* @"??0ExportDefaultedDefs@@QAE@$$QAU0@@Z"(%struct.ExportDefaultedDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// M64-DAG: define dso_local dllexport                %struct.ExportDefaultedDefs* @"??0ExportDefaultedDefs@@QEAA@$$QEAU0@@Z"(%struct.ExportDefaultedDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1EOS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsC1EOS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2EOS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsC2EOS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedDefs@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M64-DAG: define dso_local dllexport                ptr @"??0ExportDefaultedDefs@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G32-DAG: define dso_local dllexport x86_thiscallcc void @_ZN19ExportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define dso_local dllexport                void @_ZN19ExportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 __declspec(dllexport) ExportDefaultedDefs::ExportDefaultedDefs(ExportDefaultedDefs&&) = default;
 
-// M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"??4ExportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// M64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @"??4ExportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSEOS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedDefs* @_ZN19ExportDefaultedDefsaSEOS_(%struct.ExportDefaultedDefs* {{[^,]*}} %this, %struct.ExportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ExportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 ExportDefaultedDefs& ExportDefaultedDefs::operator=(ExportDefaultedDefs&&) = default;
 
 
 // Export defaulted member function definitions declared inside class.
 struct ExportDefaultedInclassDefs {
   __declspec(dllexport) ExportDefaultedInclassDefs() = default;
-  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QAE at XZ"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this)
-  // M64VS2013-DAG: define weak_odr dso_local dllexport                %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QEAA at XZ"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this)
-  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QAE at XZ"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this)
-  // M64VS2015-NOT: define weak_odr dso_local dllexport                %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QEAA at XZ"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this)
+  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
+  // M64VS2013-DAG: define weak_odr dso_local dllexport                ptr @"??0ExportDefaultedInclassDefs@@QEAA at XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
+  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
+  // M64VS2015-NOT: define weak_odr dso_local dllexport                ptr @"??0ExportDefaultedInclassDefs@@QEAA at XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
 
   __declspec(dllexport) ~ExportDefaultedInclassDefs() = default;
-  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedInclassDefs@@QAE at XZ"(%struct.ExportDefaultedInclassDefs* %this)
-  // M64VS2013-DAG: define weak_odr dso_local dllexport                void @"??1ExportDefaultedInclassDefs@@QEAA at XZ"(%struct.ExportDefaultedInclassDefs* %this)
-  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedInclassDefs@@QAE at XZ"(%struct.ExportDefaultedInclassDefs* %this)
-  // M64VS2015-NOT: define weak_odr dso_local dllexport                void @"??1ExportDefaultedInclassDefs@@QEAA at XZ"(%struct.ExportDefaultedInclassDefs* %this)
+  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedInclassDefs@@QAE at XZ"(ptr %this)
+  // M64VS2013-DAG: define weak_odr dso_local dllexport                void @"??1ExportDefaultedInclassDefs@@QEAA at XZ"(ptr %this)
+  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedInclassDefs@@QAE at XZ"(ptr %this)
+  // M64VS2015-NOT: define weak_odr dso_local dllexport                void @"??1ExportDefaultedInclassDefs@@QEAA at XZ"(ptr %this)
 
   __declspec(dllexport) ExportDefaultedInclassDefs(const ExportDefaultedInclassDefs&) = default;
-  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QAE at ABU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // M64VS2013-DAG: define weak_odr dso_local dllexport                %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QEAA at AEBU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QAE at ABU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // M64VS2015-NOT: define weak_odr dso_local dllexport                %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QEAA at AEBU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M64VS2013-DAG: define weak_odr dso_local dllexport                ptr @"??0ExportDefaultedInclassDefs@@QEAA at AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M64VS2015-NOT: define weak_odr dso_local dllexport                ptr @"??0ExportDefaultedInclassDefs@@QEAA at AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 
   __declspec(dllexport) ExportDefaultedInclassDefs& operator=(const ExportDefaultedInclassDefs&) = default;
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedInclassDefs* @"??4ExportDefaultedInclassDefs@@QAEAAU0 at ABU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // M64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedInclassDefs* @"??4ExportDefaultedInclassDefs@@QEAAAEAU0 at AEBU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedInclassDefs@@QAEAAU0 at ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedInclassDefs@@QEAAAEAU0 at AEBU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 };
 
 
@@ -463,28 +463,28 @@ struct ExportAlloc {
   __declspec(dllexport) void operator delete[](void*);
 };
 
-// M32-DAG: define dso_local dllexport i8* @"??2ExportAlloc@@SAPAXI at Z"(i32 %n)
-// M64-DAG: define dso_local dllexport i8* @"??2ExportAlloc@@SAPEAX_K at Z"(i64 %n)
-// G32-DAG: define dso_local dllexport i8* @_ZN11ExportAllocnwEj(i32 %n)
-// G64-DAG: define dso_local dllexport i8* @_ZN11ExportAllocnwEy(i64 %n)
+// M32-DAG: define dso_local dllexport ptr @"??2ExportAlloc@@SAPAXI at Z"(i32 %n)
+// M64-DAG: define dso_local dllexport ptr @"??2ExportAlloc@@SAPEAX_K at Z"(i64 %n)
+// G32-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnwEj(i32 %n)
+// G64-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnwEy(i64 %n)
 void* ExportAlloc::operator new(__SIZE_TYPE__ n) { return malloc(n); }
 
-// M32-DAG: define dso_local dllexport i8* @"??_UExportAlloc@@SAPAXI at Z"(i32 %n)
-// M64-DAG: define dso_local dllexport i8* @"??_UExportAlloc@@SAPEAX_K at Z"(i64 %n)
-// G32-DAG: define dso_local dllexport i8* @_ZN11ExportAllocnaEj(i32 %n)
-// G64-DAG: define dso_local dllexport i8* @_ZN11ExportAllocnaEy(i64 %n)
+// M32-DAG: define dso_local dllexport ptr @"??_UExportAlloc@@SAPAXI at Z"(i32 %n)
+// M64-DAG: define dso_local dllexport ptr @"??_UExportAlloc@@SAPEAX_K at Z"(i64 %n)
+// G32-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnaEj(i32 %n)
+// G64-DAG: define dso_local dllexport ptr @_ZN11ExportAllocnaEy(i64 %n)
 void* ExportAlloc::operator new[](__SIZE_TYPE__ n) { return malloc(n); }
 
-// M32-DAG: define dso_local dllexport void @"??3ExportAlloc@@SAXPAX at Z"(i8* %p)
-// M64-DAG: define dso_local dllexport void @"??3ExportAlloc@@SAXPEAX at Z"(i8* %p)
-// G32-DAG: define dso_local dllexport void @_ZN11ExportAllocdlEPv(i8* %p)
-// G64-DAG: define dso_local dllexport void @_ZN11ExportAllocdlEPv(i8* %p)
+// M32-DAG: define dso_local dllexport void @"??3ExportAlloc@@SAXPAX at Z"(ptr %p)
+// M64-DAG: define dso_local dllexport void @"??3ExportAlloc@@SAXPEAX at Z"(ptr %p)
+// G32-DAG: define dso_local dllexport void @_ZN11ExportAllocdlEPv(ptr %p)
+// G64-DAG: define dso_local dllexport void @_ZN11ExportAllocdlEPv(ptr %p)
 void ExportAlloc::operator delete(void* p) { free(p); }
 
-// M32-DAG: define dso_local dllexport void @"??_VExportAlloc@@SAXPAX at Z"(i8* %p)
-// M64-DAG: define dso_local dllexport void @"??_VExportAlloc@@SAXPEAX at Z"(i8* %p)
-// G32-DAG: define dso_local dllexport void @_ZN11ExportAllocdaEPv(i8* %p)
-// G64-DAG: define dso_local dllexport void @_ZN11ExportAllocdaEPv(i8* %p)
+// M32-DAG: define dso_local dllexport void @"??_VExportAlloc@@SAXPAX at Z"(ptr %p)
+// M64-DAG: define dso_local dllexport void @"??_VExportAlloc@@SAXPEAX at Z"(ptr %p)
+// G32-DAG: define dso_local dllexport void @_ZN11ExportAllocdaEPv(ptr %p)
+// G64-DAG: define dso_local dllexport void @_ZN11ExportAllocdaEPv(ptr %p)
 void ExportAlloc::operator delete[](void* p) { free(p); }
 
 
@@ -501,10 +501,10 @@ struct MemFunTmpl {
 
 // Export implicit instantiation of an exported member function template.
 void useMemFunTmpl() {
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal at UImplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-  // M64-DAG: define weak_odr dso_local dllexport                void @"??$exportedNormal at UImplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal at UImplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define weak_odr dso_local dllexport                void @"??$exportedNormal at UImplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
+  // G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl14exportedNormalI21ImplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
   MemFunTmpl().exportedNormal<ImplicitInst_Exported>();
 
   // MSC-DAG: define weak_odr dso_local dllexport                void @"??$exportedStatic at UImplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
@@ -515,10 +515,10 @@ void useMemFunTmpl() {
 
 // Export explicit instantiation declaration of an exported member function
 // template.
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal at UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M64-DAG: define weak_odr dso_local dllexport                void @"??$exportedNormal at UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal at UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define weak_odr dso_local dllexport                void @"??$exportedNormal at UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl14exportedNormalI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this)
 extern template void MemFunTmpl::exportedNormal<ExplicitDecl_Exported>();
        template void MemFunTmpl::exportedNormal<ExplicitDecl_Exported>();
 
@@ -530,10 +530,10 @@ extern template void MemFunTmpl::exportedStatic<ExplicitDecl_Exported>();
 
 // Export explicit instantiation definition of an exported member function
 // template.
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal at UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M64-DAG: define weak_odr dso_local dllexport                void @"??$exportedNormal at UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal at UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define weak_odr dso_local dllexport                void @"??$exportedNormal at UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl14exportedNormalI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
 template void MemFunTmpl::exportedNormal<ExplicitInst_Exported>();
 
 // MSC-DAG: define weak_odr dso_local dllexport                void @"??$exportedStatic at UExplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
@@ -542,16 +542,16 @@ template void MemFunTmpl::exportedStatic<ExplicitInst_Exported>();
 
 
 // Export specialization of an exported member function template.
-// M32-DAG: define          dso_local dllexport x86_thiscallcc void @"??$exportedNormal at UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M64-DAG: define          dso_local dllexport                void @"??$exportedNormal at UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define          dso_local dllexport                void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: define          dso_local dllexport x86_thiscallcc void @"??$exportedNormal at UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define          dso_local dllexport                void @"??$exportedNormal at UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+// G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define          dso_local dllexport                void @_ZN10MemFunTmpl14exportedNormalI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this)
 template<> __declspec(dllexport) void MemFunTmpl::exportedNormal<ExplicitSpec_Def_Exported>() {}
 
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal at UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M64-DAG: define weak_odr dso_local dllexport                void @"??$exportedNormal at UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$exportedNormal at UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define weak_odr dso_local dllexport                void @"??$exportedNormal at UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl14exportedNormalI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this)
 template<> __declspec(dllexport) inline void MemFunTmpl::exportedNormal<ExplicitSpec_InlineDef_Exported>() {}
 
 // MSC-DAG: define          dso_local dllexport                void @"??$exportedStatic at UExplicitSpec_Def_Exported@@@MemFunTmpl@@SAXXZ"()
@@ -565,10 +565,10 @@ template<> __declspec(dllexport) inline void MemFunTmpl::exportedStatic<Explicit
 
 // Not exporting specialization of an exported member function template without
 // explicit dso_local dllexport.
-// M32-DAG: define          dso_local x86_thiscallcc void @"??$exportedNormal at UExplicitSpec_NotExported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M64-DAG: define          dso_local                void @"??$exportedNormal at UExplicitSpec_NotExported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G32-DAG: define          dso_local x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI24ExplicitSpec_NotExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define          dso_local                void @_ZN10MemFunTmpl14exportedNormalI24ExplicitSpec_NotExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: define          dso_local x86_thiscallcc void @"??$exportedNormal at UExplicitSpec_NotExported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define          dso_local                void @"??$exportedNormal at UExplicitSpec_NotExported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+// G32-DAG: define          dso_local x86_thiscallcc void @_ZN10MemFunTmpl14exportedNormalI24ExplicitSpec_NotExportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define          dso_local                void @_ZN10MemFunTmpl14exportedNormalI24ExplicitSpec_NotExportedEEvv(ptr {{[^,]*}} %this)
 template<> void MemFunTmpl::exportedNormal<ExplicitSpec_NotExported>() {}
 
 // M32-DAG: define          dso_local                void @"??$exportedStatic at UExplicitSpec_NotExported@@@MemFunTmpl@@SAXXZ"()
@@ -578,10 +578,10 @@ template<> void MemFunTmpl::exportedStatic<ExplicitSpec_NotExported>() {}
 
 // Export explicit instantiation declaration of a non-exported member function
 // template.
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef at UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M64-DAG: define weak_odr dso_local dllexport                void @"??$normalDef at UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef at UExplicitDecl_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define weak_odr dso_local dllexport                void @"??$normalDef at UExplicitDecl_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ExportedEEvv(ptr {{[^,]*}} %this)
 extern template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitDecl_Exported>();
        template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitDecl_Exported>();
 
@@ -593,10 +593,10 @@ extern template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitDecl_Ex
 
 // Export explicit instantiation definition of a non-exported member function
 // template.
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef at UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M64-DAG: define weak_odr dso_local dllexport                void @"??$normalDef at UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef at UExplicitInst_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define weak_odr dso_local dllexport                void @"??$normalDef at UExplicitInst_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ExportedEEvv(ptr {{[^,]*}} %this)
 template __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitInst_Exported>();
 
 // MSC-DAG: define weak_odr dso_local dllexport                void @"??$staticDef at UExplicitInst_Exported@@@MemFunTmpl@@SAXXZ"()
@@ -605,14 +605,14 @@ template __declspec(dllexport) void MemFunTmpl::staticDef<ExplicitInst_Exported>
 
 
 // Export specialization of a non-exported member function template.
-// M32-DAG: define          dso_local dllexport x86_thiscallcc void @"??$normalDef at UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M64-DAG: define          dso_local dllexport                void @"??$normalDef at UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef at UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M64-DAG: define weak_odr dso_local dllexport                void @"??$normalDef at UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define          dso_local dllexport                void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: define          dso_local dllexport x86_thiscallcc void @"??$normalDef at UExplicitSpec_Def_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define          dso_local dllexport                void @"??$normalDef at UExplicitSpec_Def_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??$normalDef at UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define weak_odr dso_local dllexport                void @"??$normalDef at UExplicitSpec_InlineDef_Exported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+// G32-DAG: define          dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define          dso_local dllexport                void @_ZN10MemFunTmpl9normalDefI25ExplicitSpec_Def_ExportedEEvv(ptr {{[^,]*}} %this)
+// G32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define weak_odr dso_local dllexport                void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ExportedEEvv(ptr {{[^,]*}} %this)
 template<> __declspec(dllexport) void MemFunTmpl::normalDef<ExplicitSpec_Def_Exported>() {}
 template<> __declspec(dllexport) inline void MemFunTmpl::normalDef<ExplicitSpec_InlineDef_Exported>() {}
 

diff  --git a/clang/test/CodeGenCXX/dllexport-pr26549.cpp b/clang/test/CodeGenCXX/dllexport-pr26549.cpp
index 4ebf917408f32..711fc2cdafa80 100644
--- a/clang/test/CodeGenCXX/dllexport-pr26549.cpp
+++ b/clang/test/CodeGenCXX/dllexport-pr26549.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -fms-extensions -triple x86_64-windows-msvc -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -fms-extensions -triple x86_64-windows-msvc -emit-llvm -o - | FileCheck %s
 
 template <typename> struct MessageT { };
 extern template struct MessageT<int>;
 
-// CHECK: define weak_odr dso_local dllexport {{.*}} %struct.MessageT* @"??4?$MessageT at H@@QEAAAEAU0 at AEBU0@@Z"(
+// CHECK: define weak_odr dso_local dllexport {{.*}} ptr @"??4?$MessageT at H@@QEAAAEAU0 at AEBU0@@Z"(
 template struct __declspec(dllexport) MessageT<int>;
 // Previously we crashed when this dllexport was the last thing in the file.
 // DO NOT ADD MORE TESTS AFTER THIS LINE!

diff  --git a/clang/test/CodeGenCXX/dllexport.cpp b/clang/test/CodeGenCXX/dllexport.cpp
index 973cfa86e6ad4..b4e42ed7abab2 100644
--- a/clang/test/CodeGenCXX/dllexport.cpp
+++ b/clang/test/CodeGenCXX/dllexport.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-msvc   -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O1 -mconstructor-aliases -disable-llvm-passes -o - %s -w -fms-compatibility-version=19.00 | FileCheck -allow-deprecated-dag-overlap --check-prefix=MSC --check-prefix=M32 -check-prefix=MSVC2015 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-msvc   -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O1 -mconstructor-aliases -disable-llvm-passes -o - %s -w -fms-compatibility-version=18.00 | FileCheck -allow-deprecated-dag-overlap --check-prefix=MSC --check-prefix=M32 -check-prefix=MSVC2013 -check-prefix=M32MSVC2013 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc   -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O1 -mconstructor-aliases -disable-llvm-passes -o - %s -w -fms-compatibility-version=19.00 | FileCheck -allow-deprecated-dag-overlap --check-prefix=MSC --check-prefix=M32 -check-prefix=MSVC2015 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc   -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O1 -mconstructor-aliases -disable-llvm-passes -o - %s -w -fms-compatibility-version=18.00 | FileCheck -allow-deprecated-dag-overlap --check-prefix=MSC --check-prefix=M32 -check-prefix=MSVC2013 -check-prefix=M32MSVC2013 %s
 
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-msvc -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w -fms-compatibility-version=19.00 | FileCheck -allow-deprecated-dag-overlap --check-prefix=MSC --check-prefix=M64 -check-prefix=MSVC2015 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-msvc -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w -fms-compatibility-version=18.00 | FileCheck -allow-deprecated-dag-overlap --check-prefix=MSC --check-prefix=M64 -check-prefix=MSVC2013 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-msvc -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w -fms-compatibility-version=19.00 | FileCheck -allow-deprecated-dag-overlap --check-prefix=MSC --check-prefix=M64 -check-prefix=MSVC2015 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-msvc -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w -fms-compatibility-version=18.00 | FileCheck -allow-deprecated-dag-overlap --check-prefix=MSC --check-prefix=M64 -check-prefix=MSVC2013 %s
 
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-gnu    -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=GNU --check-prefix=G32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-gnu  -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=GNU %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu    -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=GNU --check-prefix=G32 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-gnu  -emit-llvm -std=c++1y -fno-threadsafe-statics -fms-extensions -O0 -o - %s -w | FileCheck -allow-deprecated-dag-overlap --check-prefix=GNU %s
 
 // Helper structs to make templates more expressive.
 struct ImplicitInst_Exported {};
@@ -305,8 +305,8 @@ struct __declspec(dllexport) Befriended {
 void Befriended::func() {}
 
 // Implicit declarations can be redeclared with dllexport.
-// MSC-DAG: define dso_local dllexport nonnull i8* @"??2@{{YAPAXI|YAPEAX_K}}@Z"(
-// GNU-DAG: define dso_local dllexport nonnull i8* @_Znw{{[yj]}}(
+// MSC-DAG: define dso_local dllexport nonnull ptr @"??2@{{YAPAXI|YAPEAX_K}}@Z"(
+// GNU-DAG: define dso_local dllexport nonnull ptr @_Znw{{[yj]}}(
 void* alloc(__SIZE_TYPE__ n);
 __declspec(dllexport) void* operator new(__SIZE_TYPE__ n) { return alloc(n); }
 
@@ -556,11 +556,11 @@ struct __declspec(dllexport) B {
 
 struct __declspec(dllexport) T {
   // Copy assignment operator:
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.T* @"??4T@@QAEAAU0 at ABU0@@Z"
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4T@@QAEAAU0 at ABU0@@Z"
 
   // Explicitly defaulted copy constructur:
   T(const T&) = default;
-  // M32MSVC2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.T* @"??0T@@QAE at ABU0@@Z"
+  // M32MSVC2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0T@@QAE at ABU0@@Z"
 
   void a() {}
   // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?a at T@@QAEXXZ"
@@ -602,18 +602,18 @@ int useExportedTmplStaticAndFun()
 template <typename T> struct __declspec(dllexport) U { void foo() {} };
 struct __declspec(dllexport) V : public U<int> { };
 // U<int>'s assignment operator is emitted.
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.U* @"??4?$U at H@@QAEAAU0 at ABU0@@Z"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4?$U at H@@QAEAAU0 at ABU0@@Z"
 
 struct __declspec(dllexport) W { virtual void foo(); };
 void W::foo() {}
 // Default ctor:
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.W* @"??0W@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0W@@QAE at XZ"
 // Copy ctor:
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.W* @"??0W@@QAE at ABU0@@Z"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0W@@QAE at ABU0@@Z"
 // vftable:
-// M32-DAG: [[W_VTABLE:@.*]] = private unnamed_addr constant { [2 x i8*] } { [2 x i8*] [i8* bitcast (%rtti.CompleteObjectLocator* @"??_R4W@@6B@" to i8*), i8* bitcast (void (%struct.W*)* @"?foo at W@@UAEXXZ" to i8*)] }, comdat($"??_7W@@6B@")
-// M32-DAG: @"??_7W@@6B@" = dllexport unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* [[W_VTABLE]], i32 0, i32 0, i32 1)
-// G32-DAG: @_ZTV1W = dso_local dllexport unnamed_addr constant { [3 x i8*] } { [3 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1W to i8*), i8* bitcast (void (%struct.W*)* @_ZN1W3fooEv to i8*)] }
+// M32-DAG: [[W_VTABLE:@.*]] = private unnamed_addr constant { [2 x ptr] } { [2 x ptr] [ptr @"??_R4W@@6B@", ptr @"?foo at W@@UAEXXZ"] }, comdat($"??_7W@@6B@")
+// M32-DAG: @"??_7W@@6B@" = dllexport unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr [[W_VTABLE]], i32 0, i32 0, i32 1)
+// G32-DAG: @_ZTV1W = dso_local dllexport unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI1W, ptr @_ZN1W3fooEv] }
 
 struct __declspec(dllexport) X : public virtual W {};
 // vbtable:
@@ -629,7 +629,7 @@ struct __declspec(dllexport) Y {
 
 struct __declspec(dllexport) Z { virtual ~Z() {} };
 // The scalar deleting dtor does not get exported:
-// M32-DAG: define linkonce_odr dso_local x86_thiscallcc i8* @"??_GZ@@UAEPAXI at Z"
+// M32-DAG: define linkonce_odr dso_local x86_thiscallcc ptr @"??_GZ@@UAEPAXI at Z"
 
 
 // The user-defined dtor does get exported:
@@ -646,7 +646,7 @@ namespace UseDtorAlias {
 
 struct __declspec(dllexport) DefaultedCtorsDtors {
   DefaultedCtorsDtors() = default;
-  // M32MSVC2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.DefaultedCtorsDtors* @"??0DefaultedCtorsDtors@@QAE at XZ"
+  // M32MSVC2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0DefaultedCtorsDtors@@QAE at XZ"
   ~DefaultedCtorsDtors() = default;
   // M32MSVC2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??1DefaultedCtorsDtors@@QAE at XZ"
 };
@@ -654,26 +654,26 @@ struct __declspec(dllexport) DefaultedCtorsDtors {
 // Export defaulted member function definitions declared inside class.
 struct __declspec(dllexport) ExportDefaultedInclassDefs {
   ExportDefaultedInclassDefs() = default;
-  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QAE at XZ"(%struct.ExportDefaultedInclassDefs* returned %this)
-  // M64VS2013-DAG: define weak_odr dso_local dllexport                %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QEAA at XZ"(%struct.ExportDefaultedInclassDefs* returned %this)
-  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QAE at XZ"(%struct.ExportDefaultedInclassDefs* returned %this)
-  // M64VS2015-NOT: define weak_odr dso_local dllexport                %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QEAA at XZ"(%struct.ExportDefaultedInclassDefs* returned %this)
+  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE at XZ"(ptr returned %this)
+  // M64VS2013-DAG: define weak_odr dso_local dllexport                ptr @"??0ExportDefaultedInclassDefs@@QEAA at XZ"(ptr returned %this)
+  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE at XZ"(ptr returned %this)
+  // M64VS2015-NOT: define weak_odr dso_local dllexport                ptr @"??0ExportDefaultedInclassDefs@@QEAA at XZ"(ptr returned %this)
 
   ~ExportDefaultedInclassDefs() = default;
-  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedInclassDefs@@QAE at XZ"(%struct.ExportDefaultedInclassDefs* %this)
-  // M64VS2013-DAG: define weak_odr dso_local dllexport                void @"??1ExportDefaultedInclassDefs@@QEAA at XZ"(%struct.ExportDefaultedInclassDefs* %this)
-  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedInclassDefs@@QAE at XZ"(%struct.ExportDefaultedInclassDefs* %this)
-  // M64VS2015-NOT: define weak_odr dso_local dllexport                void @"??1ExportDefaultedInclassDefs@@QEAA at XZ"(%struct.ExportDefaultedInclassDefs* %this)
+  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedInclassDefs@@QAE at XZ"(ptr %this)
+  // M64VS2013-DAG: define weak_odr dso_local dllexport                void @"??1ExportDefaultedInclassDefs@@QEAA at XZ"(ptr %this)
+  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc void @"??1ExportDefaultedInclassDefs@@QAE at XZ"(ptr %this)
+  // M64VS2015-NOT: define weak_odr dso_local dllexport                void @"??1ExportDefaultedInclassDefs@@QEAA at XZ"(ptr %this)
 
   ExportDefaultedInclassDefs(const ExportDefaultedInclassDefs&) = default;
-  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QAE at ABU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64VS2013-DAG: define weak_odr dso_local dllexport                %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QEAA at AEBU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QAE at ABU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64VS2015-NOT: define weak_odr dso_local dllexport                %struct.ExportDefaultedInclassDefs* @"??0ExportDefaultedInclassDefs@@QEAA at AEBU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M32VS2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64VS2013-DAG: define weak_odr dso_local dllexport                ptr @"??0ExportDefaultedInclassDefs@@QEAA at AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M32VS2015-NOT: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ExportDefaultedInclassDefs@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64VS2015-NOT: define weak_odr dso_local dllexport                ptr @"??0ExportDefaultedInclassDefs@@QEAA at AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
 
   ExportDefaultedInclassDefs& operator=(const ExportDefaultedInclassDefs&) = default;
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedInclassDefs* @"??4ExportDefaultedInclassDefs@@QAEAAU0 at ABU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // M64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ExportDefaultedInclassDefs* @"??4ExportDefaultedInclassDefs@@QEAAAEAU0 at AEBU0@@Z"(%struct.ExportDefaultedInclassDefs* {{[^,]*}} %this, %struct.ExportDefaultedInclassDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedInclassDefs@@QAEAAU0 at ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M64-DAG: define weak_odr dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ExportDefaultedInclassDefs@@QEAAAEAU0 at AEBU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 };
 
 namespace ReferencedInlineMethodInNestedClass {
@@ -739,13 +739,13 @@ struct __declspec(dllexport) ExportedDerivedClass : NonExportedBaseClass {};
 // Do not assert about generating code for constexpr functions twice during explicit instantiation (PR21718).
 template <typename T> struct ExplicitInstConstexprMembers {
   // Copy assignment operator
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align 1 dereferenceable(1) %struct.ExplicitInstConstexprMembers* @"??4?$ExplicitInstConstexprMembers at X@@QAEAAU0 at ABU0@@Z"
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align 1 dereferenceable(1) ptr @"??4?$ExplicitInstConstexprMembers at X@@QAEAAU0 at ABU0@@Z"
 
   constexpr ExplicitInstConstexprMembers() {}
-  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExplicitInstConstexprMembers* @"??0?$ExplicitInstConstexprMembers at X@@QAE at XZ"
+  // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0?$ExplicitInstConstexprMembers at X@@QAE at XZ"
 
   ExplicitInstConstexprMembers(const ExplicitInstConstexprMembers&) = default;
-  // M32MSVC2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExplicitInstConstexprMembers* @"??0?$ExplicitInstConstexprMembers at X@@QAE at ABU0@@Z"
+  // M32MSVC2013-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0?$ExplicitInstConstexprMembers at X@@QAE at ABU0@@Z"
 
   constexpr int f() const { return 42; }
   // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc i32 @"?f@?$ExplicitInstConstexprMembers at X@@QBEHXZ"
@@ -767,7 +767,7 @@ extern template struct ExplicitInstantiationDeclExportedDefTemplate<int>;
 template struct __declspec(dllexport) ExplicitInstantiationDeclExportedDefTemplate<int>;
 USEMEMFUNC(ExplicitInstantiationDeclExportedDefTemplate<int>, f);
 // M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc void @"?f@?$ExplicitInstantiationDeclExportedDefTemplate at H@@QAEXXZ"
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %struct.ExplicitInstantiationDeclExportedDefTemplate* @"??0?$ExplicitInstantiationDeclExportedDefTemplate at H@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0?$ExplicitInstantiationDeclExportedDefTemplate at H@@QAE at XZ"
 // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN44ExplicitInstantiationDeclExportedDefTemplateIiE1fEv
 
 template <typename T> struct ImplicitInstantiationExportedExplicitInstantiationDefTemplate { virtual void f() {} };
@@ -810,7 +810,7 @@ namespace InClassInits {
 struct __declspec(dllexport) S {
   int x = 42;
 };
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.InClassInits::S"* @"??0S at InClassInits@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0S at InClassInits@@QAE at XZ"
 
 // dllexport an already instantiated class template.
 template <typename T> struct Base {
@@ -818,7 +818,7 @@ template <typename T> struct Base {
 };
 Base<int> base;
 struct __declspec(dllexport) T : Base<int> { };
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.InClassInits::Base"* @"??0?$Base at H@InClassInits@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0?$Base at H@InClassInits@@QAE at XZ"
 
 struct A { A(int); };
 struct __declspec(dllexport) U {
@@ -826,7 +826,7 @@ struct __declspec(dllexport) U {
   U(A = 0) {}
   int x = 0;
 };
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.InClassInits::U"* @"??0U at InClassInits@@QAE at UA@1@@Z"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0U at InClassInits@@QAE at UA@1@@Z"
 
 struct Evil {
   template <typename T> struct Base {
@@ -838,7 +838,7 @@ struct Evil {
   // the default ctor must still be delayed.
   struct __declspec(dllexport) T : Base<int> {};
 };
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.InClassInits::Evil::Base"* @"??0?$Base at H@Evil at InClassInits@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0?$Base at H@Evil at InClassInits@@QAE at XZ"
 
 template <typename T> struct Foo {};
 template <typename T> struct Bar {
@@ -850,7 +850,7 @@ struct __declspec(dllexport) Baz {
 // After parsing Baz, in ActOnFinishCXXNonNestedClass we would synthesize
 // Baz's operator=, causing instantiation of Foo<int> after which
 // ActOnFinishCXXNonNestedClass is called, and we would bite our own tail.
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align 1 dereferenceable(1) %"struct.InClassInits::Baz"* @"??4Baz at InClassInits@@QAEAAU01 at ABU01@@Z"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc nonnull align 1 dereferenceable(1) ptr @"??4Baz at InClassInits@@QAEAAU01 at ABU01@@Z"
 
 // Trying to define the explicitly defaulted ctor must be delayed until the
 // in-class initializer for x has been processed.
@@ -858,7 +858,7 @@ struct PR40006 {
   __declspec(dllexport) PR40006() = default;
   int x = 42;
 };
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.InClassInits::PR40006"* @"??0PR40006 at InClassInits@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0PR40006 at InClassInits@@QAE at XZ"
 
 namespace pr40006 {
 // Delay emitting the method also past the instantiation of Tmpl<Inner>, i.e.
@@ -871,7 +871,7 @@ struct Outer {
     };
     Tmpl<Inner> y;
 };
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.InClassInits::pr40006::Outer::Inner"* @"??0Inner at Outer@pr40006 at InClassInits@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0Inner at Outer@pr40006 at InClassInits@@QAE at XZ"
 }
 
 // PR42857: Clang would try to emit the non-trivial explicitly defaulted
@@ -879,7 +879,7 @@ struct Outer {
 struct Qux { Qux(); };
 template <typename T> struct PR42857 { __declspec(dllexport) PR42857() = default; Qux q; };
 template struct PR42857<int>;
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.InClassInits::PR42857"* @"??0?$PR42857 at H@InClassInits@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0?$PR42857 at H@InClassInits@@QAE at XZ"
 
 }
 
@@ -923,7 +923,7 @@ template <typename> struct S {
   X x;
 };
 template struct __declspec(dllexport) S<int>;
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.pr47683::S"* @"??0?$S at H@pr47683@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0?$S at H@pr47683@@QAE at XZ"
 
 template <typename> struct T {
   T() = default;
@@ -932,7 +932,7 @@ template <typename> struct T {
 extern template struct T<int>;
 template struct __declspec(dllexport) T<int>;
 // Don't assert about multiple codegen for explicitly defaulted method in explicit instantiation def.
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.pr47683::T"* @"??0?$T at H@pr47683@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0?$T at H@pr47683@@QAE at XZ"
 
 template <typename> struct U {
   U();
@@ -942,7 +942,7 @@ template <typename T> U<T>::U() = default;
 extern template struct U<int>;
 template struct __declspec(dllexport) U<int>;
 // Same as T, but with out-of-line ctor.
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.pr47683::U"* @"??0?$U at H@pr47683@@QAE at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0?$U at H@pr47683@@QAE at XZ"
 }
 
 //===----------------------------------------------------------------------===//
@@ -1069,8 +1069,8 @@ struct __declspec(dllexport) LayerTreeImpl {
   };
   LayerSelection foo;
 };
-// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc %"struct.LayerTreeImpl::ElementLayers"* @"??0ElementLayers at LayerTreeImpl@@QAE at XZ"
-// M64-DAG: define weak_odr dso_local dllexport %"struct.LayerTreeImpl::ElementLayers"* @"??0ElementLayers at LayerTreeImpl@@QEAA at XZ"
+// M32-DAG: define weak_odr dso_local dllexport x86_thiscallcc ptr @"??0ElementLayers at LayerTreeImpl@@QAE at XZ"
+// M64-DAG: define weak_odr dso_local dllexport ptr @"??0ElementLayers at LayerTreeImpl@@QEAA at XZ"
 
 namespace pr39496 {
 // Make sure dll attribute are inherited by static locals also in template

diff  --git a/clang/test/CodeGenCXX/dllimport-dtor-thunks.cpp b/clang/test/CodeGenCXX/dllimport-dtor-thunks.cpp
index 17e66874c5a4e..1cad5c93dc27e 100644
--- a/clang/test/CodeGenCXX/dllimport-dtor-thunks.cpp
+++ b/clang/test/CodeGenCXX/dllimport-dtor-thunks.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -mconstructor-aliases %s -triple x86_64-windows-msvc -fms-extensions -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -mconstructor-aliases %s -triple x86_64-windows-msvc -fms-extensions -emit-llvm -o - | FileCheck %s
 
 // PR32990
 
@@ -36,9 +36,9 @@ extern "C" void testit() {
 // The destructors are called in reverse order of construction. Only the third
 // needs the complete destructor (_D).
 // CHECK-LABEL: define dso_local void @testit()
-// CHECK:  call void @"??_DImportVBaseOverrideVDtor@@QEAAXXZ"(%struct.ImportVBaseOverrideVDtor* {{[^,]*}} %{{.*}})
-// CHECK:  call void @"??1ImportOverrideVDtor@@UEAA at XZ"(%struct.ImportOverrideVDtor* {{[^,]*}} %{{.*}})
-// CHECK:  call void @"??1ImportIntroVDtor@@UEAA at XZ"(%struct.ImportIntroVDtor* {{[^,]*}} %{{.*}})
+// CHECK:  call void @"??_DImportVBaseOverrideVDtor@@QEAAXXZ"(ptr {{[^,]*}} %{{.*}})
+// CHECK:  call void @"??1ImportOverrideVDtor@@UEAA at XZ"(ptr {{[^,]*}} %{{.*}})
+// CHECK:  call void @"??1ImportIntroVDtor@@UEAA at XZ"(ptr {{[^,]*}} %{{.*}})
 
 // CHECK-LABEL: declare dllimport void @"??_DImportVBaseOverrideVDtor@@QEAAXXZ"
 // CHECK-LABEL: declare dllimport void @"??1ImportOverrideVDtor@@UEAA at XZ"

diff  --git a/clang/test/CodeGenCXX/dllimport-members.cpp b/clang/test/CodeGenCXX/dllimport-members.cpp
index 4785c22edb1ff..3f8a592e24fe0 100644
--- a/clang/test/CodeGenCXX/dllimport-members.cpp
+++ b/clang/test/CodeGenCXX/dllimport-members.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-msvc -fms-compatibility   -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | FileCheck --check-prefix=MSC --check-prefix=M32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -disable-llvm-passes -triple x86_64-windows-msvc -fms-compatibility -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | FileCheck --check-prefix=MSC --check-prefix=M64 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-gnu                       -emit-llvm -std=c++1y -O0 -o - %s         | FileCheck --check-prefix=GNU --check-prefix=G32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -disable-llvm-passes -triple x86_64-windows-gnu                     -emit-llvm -std=c++1y -O0 -o - %s         | FileCheck --check-prefix=GNU --check-prefix=G64 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-msvc -fms-compatibility   -emit-llvm -std=c++1y -O1 -o - %s -DMSABI | FileCheck --check-prefix=MO1 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-gnu                       -emit-llvm -std=c++1y -O1 -o - %s         | FileCheck --check-prefix=GO1 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-msvc -fms-compatibility   -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | FileCheck --check-prefix=MSC --check-prefix=M32 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple x86_64-windows-msvc -fms-compatibility -emit-llvm -std=c++1y -O0 -o - %s -DMSABI | FileCheck --check-prefix=MSC --check-prefix=M64 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-gnu                       -emit-llvm -std=c++1y -O0 -o - %s         | FileCheck --check-prefix=GNU --check-prefix=G32 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple x86_64-windows-gnu                     -emit-llvm -std=c++1y -O0 -o - %s         | FileCheck --check-prefix=GNU --check-prefix=G64 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-msvc -fms-compatibility   -emit-llvm -std=c++1y -O1 -o - %s -DMSABI | FileCheck --check-prefix=MO1 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -disable-llvm-passes -triple i686-windows-gnu                       -emit-llvm -std=c++1y -O1 -o - %s         | FileCheck --check-prefix=GO1 %s
 
 // Helper structs to make templates more expressive.
 struct ImplicitInst_Imported {};
@@ -63,26 +63,26 @@ struct __declspec(dllimport) ForceNonTrivial {
 struct ImportMembers {
   struct Nested;
 
-  // M32-DAG: define  dso_local dllexport   x86_thiscallcc void @"?normalDef at ImportMembers@@QAEXXZ"(%struct.ImportMembers* {{[^,]*}} %this)
-  // M64-DAG: define  dso_local dllexport                  void @"?normalDef at ImportMembers@@QEAAXXZ"(%struct.ImportMembers* {{[^,]*}} %this)
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalDecl at ImportMembers@@QAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?normalDecl at ImportMembers@@QEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInclass at ImportMembers@@QAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?normalInclass at ImportMembers@@QEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInlineDef at ImportMembers@@QAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?normalInlineDef at ImportMembers@@QEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInlineDecl at ImportMembers@@QAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?normalInlineDecl at ImportMembers@@QEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // G32-DAG: define  dso_local             x86_thiscallcc void @_ZN13ImportMembers9normalDefEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G64-DAG: define  dso_local                            void @_ZN13ImportMembers9normalDefEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G32-DAG: declare           dllimport   x86_thiscallcc void @_ZN13ImportMembers10normalDeclEv(%struct.ImportMembers* {{[^,]*}})
-  // G64-DAG: declare           dllimport                  void @_ZN13ImportMembers10normalDeclEv(%struct.ImportMembers* {{[^,]*}})
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers13normalInclassEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers13normalInclassEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers15normalInlineDefEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers15normalInlineDefEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers16normalInlineDeclEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                 void @_ZN13ImportMembers16normalInlineDeclEv(%struct.ImportMembers* {{[^,]*}} %this)
+  // M32-DAG: define  dso_local dllexport   x86_thiscallcc void @"?normalDef at ImportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define  dso_local dllexport                  void @"?normalDef at ImportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalDecl at ImportMembers@@QAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?normalDecl at ImportMembers@@QEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInclass at ImportMembers@@QAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?normalInclass at ImportMembers@@QEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInlineDef at ImportMembers@@QAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?normalInlineDef at ImportMembers@@QEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInlineDecl at ImportMembers@@QAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?normalInlineDecl at ImportMembers@@QEAAXXZ"(ptr {{[^,]*}})
+  // G32-DAG: define  dso_local             x86_thiscallcc void @_ZN13ImportMembers9normalDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define  dso_local                            void @_ZN13ImportMembers9normalDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: declare           dllimport   x86_thiscallcc void @_ZN13ImportMembers10normalDeclEv(ptr {{[^,]*}})
+  // G64-DAG: declare           dllimport                  void @_ZN13ImportMembers10normalDeclEv(ptr {{[^,]*}})
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers13normalInclassEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers13normalInclassEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers15normalInlineDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers15normalInlineDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                 void @_ZN13ImportMembers16normalInlineDeclEv(ptr {{[^,]*}} %this)
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInclass at ImportMembers@@QAEXXZ"(
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInlineDef at ImportMembers@@QAEXXZ"(
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInlineDecl at ImportMembers@@QAEXXZ"(
@@ -95,26 +95,26 @@ struct ImportMembers {
   __declspec(dllimport)                void normalInlineDef();
   __declspec(dllimport)         inline void normalInlineDecl();
 
-  // M32-DAG: define  dso_local dllexport   x86_thiscallcc void @"?virtualDef at ImportMembers@@UAEXXZ"(%struct.ImportMembers* {{[^,]*}} %this)
-  // M64-DAG: define  dso_local dllexport                  void @"?virtualDef at ImportMembers@@UEAAXXZ"(%struct.ImportMembers* {{[^,]*}} %this)
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualDecl at ImportMembers@@UAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?virtualDecl at ImportMembers@@UEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInclass at ImportMembers@@UAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?virtualInclass at ImportMembers@@UEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInlineDef at ImportMembers@@UAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?virtualInlineDef at ImportMembers@@UEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInlineDecl at ImportMembers@@UAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?virtualInlineDecl at ImportMembers@@UEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // G32-DAG: define  dso_local             x86_thiscallcc void @_ZN13ImportMembers10virtualDefEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G64-DAG: define  dso_local                            void @_ZN13ImportMembers10virtualDefEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G32-DAG: declare dllimport   x86_thiscallcc void @_ZN13ImportMembers11virtualDeclEv(%struct.ImportMembers* {{[^,]*}})
-  // G64-DAG: declare dllimport                  void @_ZN13ImportMembers11virtualDeclEv(%struct.ImportMembers* {{[^,]*}})
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers14virtualInclassEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers14virtualInclassEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers16virtualInlineDefEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers16virtualInlineDefEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers17virtualInlineDeclEv(%struct.ImportMembers* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers17virtualInlineDeclEv(%struct.ImportMembers* {{[^,]*}} %this)
+  // M32-DAG: define  dso_local dllexport   x86_thiscallcc void @"?virtualDef at ImportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define  dso_local dllexport                  void @"?virtualDef at ImportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualDecl at ImportMembers@@UAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?virtualDecl at ImportMembers@@UEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInclass at ImportMembers@@UAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?virtualInclass at ImportMembers@@UEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInlineDef at ImportMembers@@UAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?virtualInlineDef at ImportMembers@@UEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInlineDecl at ImportMembers@@UAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?virtualInlineDecl at ImportMembers@@UEAAXXZ"(ptr {{[^,]*}})
+  // G32-DAG: define  dso_local             x86_thiscallcc void @_ZN13ImportMembers10virtualDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define  dso_local                            void @_ZN13ImportMembers10virtualDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: declare dllimport   x86_thiscallcc void @_ZN13ImportMembers11virtualDeclEv(ptr {{[^,]*}})
+  // G64-DAG: declare dllimport                  void @_ZN13ImportMembers11virtualDeclEv(ptr {{[^,]*}})
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers14virtualInclassEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers14virtualInclassEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers16virtualInlineDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers17virtualInlineDeclEv(ptr {{[^,]*}} %this)
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?virtualInclass at ImportMembers@@UAEXXZ"(
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?virtualInlineDef at ImportMembers@@UAEXXZ"(
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?virtualInlineDecl at ImportMembers@@UAEXXZ"(
@@ -149,30 +149,30 @@ struct ImportMembers {
   __declspec(dllimport) static         void staticInlineDef();
   __declspec(dllimport) static  inline void staticInlineDecl();
 
-  // M32-DAG: declare dllimport x86_thiscallcc void @"?protectedNormalDecl at ImportMembers@@IAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare dllimport                void @"?protectedNormalDecl at ImportMembers@@IEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers19protectedNormalDeclEv(%struct.ImportMembers* {{[^,]*}})
-  // G64-DAG: declare dllimport                void @_ZN13ImportMembers19protectedNormalDeclEv(%struct.ImportMembers* {{[^,]*}})
+  // M32-DAG: declare dllimport x86_thiscallcc void @"?protectedNormalDecl at ImportMembers@@IAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare dllimport                void @"?protectedNormalDecl at ImportMembers@@IEAAXXZ"(ptr {{[^,]*}})
+  // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers19protectedNormalDeclEv(ptr {{[^,]*}})
+  // G64-DAG: declare dllimport                void @_ZN13ImportMembers19protectedNormalDeclEv(ptr {{[^,]*}})
   // MSC-DAG: declare dllimport                void @"?protectedStaticDecl at ImportMembers@@KAXXZ"()
   // GNU-DAG: declare dllimport                void @_ZN13ImportMembers19protectedStaticDeclEv()
 protected:
   __declspec(dllimport)                void protectedNormalDecl();
   __declspec(dllimport) static         void protectedStaticDecl();
 
-  // M32-DAG: declare dllimport x86_thiscallcc void @"?privateNormalDecl at ImportMembers@@AAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare dllimport                void @"?privateNormalDecl at ImportMembers@@AEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers17privateNormalDeclEv(%struct.ImportMembers* {{[^,]*}})
-  // G64-DAG: declare dllimport                void @_ZN13ImportMembers17privateNormalDeclEv(%struct.ImportMembers* {{[^,]*}})
+  // M32-DAG: declare dllimport x86_thiscallcc void @"?privateNormalDecl at ImportMembers@@AAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare dllimport                void @"?privateNormalDecl at ImportMembers@@AEAAXXZ"(ptr {{[^,]*}})
+  // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers17privateNormalDeclEv(ptr {{[^,]*}})
+  // G64-DAG: declare dllimport                void @_ZN13ImportMembers17privateNormalDeclEv(ptr {{[^,]*}})
   // MSC-DAG: declare dllimport                void @"?privateStaticDecl at ImportMembers@@CAXXZ"()
   // GNU-DAG: declare dllimport                void @_ZN13ImportMembers17privateStaticDeclEv()
 private:
   __declspec(dllimport)                void privateNormalDecl();
   __declspec(dllimport) static         void privateStaticDecl();
 
-  // M32-DAG: declare dso_local          x86_thiscallcc void @"?ignored at ImportMembers@@QAEXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // M64-DAG: declare dso_local                         void @"?ignored at ImportMembers@@QEAAXXZ"(%struct.ImportMembers* {{[^,]*}})
-  // G32-DAG: declare dso_local          x86_thiscallcc void @_ZN13ImportMembers7ignoredEv(%struct.ImportMembers* {{[^,]*}})
-  // G64-DAG: declare dso_local                         void @_ZN13ImportMembers7ignoredEv(%struct.ImportMembers* {{[^,]*}})
+  // M32-DAG: declare dso_local          x86_thiscallcc void @"?ignored at ImportMembers@@QAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare dso_local                         void @"?ignored at ImportMembers@@QEAAXXZ"(ptr {{[^,]*}})
+  // G32-DAG: declare dso_local          x86_thiscallcc void @_ZN13ImportMembers7ignoredEv(ptr {{[^,]*}})
+  // G64-DAG: declare dso_local                         void @_ZN13ImportMembers7ignoredEv(ptr {{[^,]*}})
 public:
   void ignored();
 
@@ -235,26 +235,26 @@ USEMV(ImportMembers, ConstexprField)
 
 // Import individual members of a nested class.
 struct ImportMembers::Nested {
-  // M32-DAG: define  dso_local dllexport   x86_thiscallcc void @"?normalDef at Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define  dso_local dllexport                  void @"?normalDef at Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalDecl at Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?normalDecl at Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInclass at Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?normalInclass at Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInlineDef at Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?normalInlineDef at Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInlineDecl at Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?normalInlineDecl at Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G32-DAG: define  dso_local             x86_thiscallcc void @_ZN13ImportMembers6Nested9normalDefEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define  dso_local                            void @_ZN13ImportMembers6Nested9normalDefEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: declare dllimport   x86_thiscallcc void @_ZN13ImportMembers6Nested10normalDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G64-DAG: declare dllimport                  void @_ZN13ImportMembers6Nested10normalDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested13normalInclassEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested13normalInclassEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested15normalInlineDefEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested15normalInlineDefEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested16normalInlineDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested16normalInlineDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
+  // M32-DAG: define  dso_local dllexport   x86_thiscallcc void @"?normalDef at Nested@ImportMembers@@QAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define  dso_local dllexport                  void @"?normalDef at Nested@ImportMembers@@QEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalDecl at Nested@ImportMembers@@QAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?normalDecl at Nested@ImportMembers@@QEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInclass at Nested@ImportMembers@@QAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?normalInclass at Nested@ImportMembers@@QEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInlineDef at Nested@ImportMembers@@QAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?normalInlineDef at Nested@ImportMembers@@QEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?normalInlineDecl at Nested@ImportMembers@@QAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?normalInlineDecl at Nested@ImportMembers@@QEAAXXZ"(ptr {{[^,]*}})
+  // G32-DAG: define  dso_local             x86_thiscallcc void @_ZN13ImportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define  dso_local                            void @_ZN13ImportMembers6Nested9normalDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: declare dllimport   x86_thiscallcc void @_ZN13ImportMembers6Nested10normalDeclEv(ptr {{[^,]*}})
+  // G64-DAG: declare dllimport                  void @_ZN13ImportMembers6Nested10normalDeclEv(ptr {{[^,]*}})
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested13normalInclassEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested15normalInlineDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested16normalInlineDeclEv(ptr {{[^,]*}} %this)
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInclass at Nested@ImportMembers@@QAEXXZ"(
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInlineDef at Nested@ImportMembers@@QAEXXZ"(
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?normalInlineDecl at Nested@ImportMembers@@QAEXXZ"(
@@ -267,26 +267,26 @@ struct ImportMembers::Nested {
   __declspec(dllimport)                void normalInlineDef();
   __declspec(dllimport)         inline void normalInlineDecl();
 
-  // M32-DAG: define  dso_local dllexport   x86_thiscallcc void @"?virtualDef at Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // M64-DAG: define  dso_local dllexport                  void @"?virtualDef at Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualDecl at Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?virtualDecl at Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInclass at Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?virtualInclass at Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInlineDef at Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?virtualInlineDef at Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInlineDecl at Nested@ImportMembers@@UAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare           dllimport                  void @"?virtualInlineDecl at Nested@ImportMembers@@UEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G32-DAG: define  dso_local             x86_thiscallcc void @_ZN13ImportMembers6Nested10virtualDefEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define  dso_local                            void @_ZN13ImportMembers6Nested10virtualDefEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: declare dllimport   x86_thiscallcc void @_ZN13ImportMembers6Nested11virtualDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G64-DAG: declare dllimport                  void @_ZN13ImportMembers6Nested11virtualDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested14virtualInclassEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested14virtualInclassEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested16virtualInlineDefEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested16virtualInlineDefEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}} %this)
+  // M32-DAG: define  dso_local dllexport   x86_thiscallcc void @"?virtualDef at Nested@ImportMembers@@UAEXXZ"(ptr {{[^,]*}} %this)
+  // M64-DAG: define  dso_local dllexport                  void @"?virtualDef at Nested@ImportMembers@@UEAAXXZ"(ptr {{[^,]*}} %this)
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualDecl at Nested@ImportMembers@@UAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?virtualDecl at Nested@ImportMembers@@UEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInclass at Nested@ImportMembers@@UAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?virtualInclass at Nested@ImportMembers@@UEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInlineDef at Nested@ImportMembers@@UAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?virtualInlineDef at Nested@ImportMembers@@UEAAXXZ"(ptr {{[^,]*}})
+  // M32-DAG: declare           dllimport   x86_thiscallcc void @"?virtualInlineDecl at Nested@ImportMembers@@UAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare           dllimport                  void @"?virtualInlineDecl at Nested@ImportMembers@@UEAAXXZ"(ptr {{[^,]*}})
+  // G32-DAG: define  dso_local             x86_thiscallcc void @_ZN13ImportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define  dso_local                            void @_ZN13ImportMembers6Nested10virtualDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: declare dllimport   x86_thiscallcc void @_ZN13ImportMembers6Nested11virtualDeclEv(ptr {{[^,]*}})
+  // G64-DAG: declare dllimport                  void @_ZN13ImportMembers6Nested11virtualDeclEv(ptr {{[^,]*}})
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested14virtualInclassEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested16virtualInlineDefEv(ptr {{[^,]*}} %this)
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN13ImportMembers6Nested17virtualInlineDeclEv(ptr {{[^,]*}} %this)
 
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?virtualInclass at Nested@ImportMembers@@UAEXXZ"(
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"?virtualInlineDef at Nested@ImportMembers@@UAEXXZ"(
@@ -322,30 +322,30 @@ struct ImportMembers::Nested {
   __declspec(dllimport) static         void staticInlineDef();
   __declspec(dllimport) static  inline void staticInlineDecl();
 
-  // M32-DAG: declare dllimport x86_thiscallcc void @"?protectedNormalDecl at Nested@ImportMembers@@IAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare dllimport                void @"?protectedNormalDecl at Nested@ImportMembers@@IEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}}
-  // G64-DAG: declare dllimport                void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}})
+  // M32-DAG: declare dllimport x86_thiscallcc void @"?protectedNormalDecl at Nested@ImportMembers@@IAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare dllimport                void @"?protectedNormalDecl at Nested@ImportMembers@@IEAAXXZ"(ptr {{[^,]*}})
+  // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(ptr {{[^,]*}}
+  // G64-DAG: declare dllimport                void @_ZN13ImportMembers6Nested19protectedNormalDeclEv(ptr {{[^,]*}})
   // MSC-DAG: declare dllimport                void @"?protectedStaticDecl at Nested@ImportMembers@@KAXXZ"()
   // GNU-DAG: declare dllimport                void @_ZN13ImportMembers6Nested19protectedStaticDeclEv()
 protected:
   __declspec(dllimport)                void protectedNormalDecl();
   __declspec(dllimport) static         void protectedStaticDecl();
 
-  // M32-DAG: declare dllimport x86_thiscallcc void @"?privateNormalDecl at Nested@ImportMembers@@AAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare dllimport                void @"?privateNormalDecl at Nested@ImportMembers@@AEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested17privateNormalDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G64-DAG: declare dllimport                void @_ZN13ImportMembers6Nested17privateNormalDeclEv(%"struct.ImportMembers::Nested"* {{[^,]*}})
+  // M32-DAG: declare dllimport x86_thiscallcc void @"?privateNormalDecl at Nested@ImportMembers@@AAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare dllimport                void @"?privateNormalDecl at Nested@ImportMembers@@AEAAXXZ"(ptr {{[^,]*}})
+  // G32-DAG: declare dllimport x86_thiscallcc void @_ZN13ImportMembers6Nested17privateNormalDeclEv(ptr {{[^,]*}})
+  // G64-DAG: declare dllimport                void @_ZN13ImportMembers6Nested17privateNormalDeclEv(ptr {{[^,]*}})
   // MSC-DAG: declare dllimport                void @"?privateStaticDecl at Nested@ImportMembers@@CAXXZ"()
   // GNU-DAG: declare dllimport                void @_ZN13ImportMembers6Nested17privateStaticDeclEv()
 private:
   __declspec(dllimport)                void privateNormalDecl();
   __declspec(dllimport) static         void privateStaticDecl();
 
-  // M32-DAG: declare dso_local           x86_thiscallcc void @"?ignored at Nested@ImportMembers@@QAEXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // M64-DAG: declare dso_local                          void @"?ignored at Nested@ImportMembers@@QEAAXXZ"(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G32-DAG: declare dso_local           x86_thiscallcc void @_ZN13ImportMembers6Nested7ignoredEv(%"struct.ImportMembers::Nested"* {{[^,]*}})
-  // G64-DAG: declare dso_local                          void @_ZN13ImportMembers6Nested7ignoredEv(%"struct.ImportMembers::Nested"* {{[^,]*}})
+  // M32-DAG: declare dso_local           x86_thiscallcc void @"?ignored at Nested@ImportMembers@@QAEXXZ"(ptr {{[^,]*}})
+  // M64-DAG: declare dso_local                          void @"?ignored at Nested@ImportMembers@@QEAAXXZ"(ptr {{[^,]*}})
+  // G32-DAG: declare dso_local           x86_thiscallcc void @_ZN13ImportMembers6Nested7ignoredEv(ptr {{[^,]*}})
+  // G64-DAG: declare dso_local                          void @_ZN13ImportMembers6Nested7ignoredEv(ptr {{[^,]*}})
 public:
   void ignored();
 
@@ -408,40 +408,40 @@ USEMV(ImportMembers::Nested, ConstexprField)
 
 // Import special member functions.
 struct ImportSpecials {
-  // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"??0ImportSpecials@@QAE at XZ"(%struct.ImportSpecials* {{[^,]*}} returned {{[^,]*}})
-  // M64-DAG: declare dllimport                %struct.ImportSpecials* @"??0ImportSpecials@@QEAA at XZ"(%struct.ImportSpecials* {{[^,]*}} returned {{[^,]*}})
-  // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsC1Ev(%struct.ImportSpecials* {{[^,]*}})
-  // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsC1Ev(%struct.ImportSpecials* {{[^,]*}})
+  // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportSpecials@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}})
+  // M64-DAG: declare dllimport                ptr @"??0ImportSpecials@@QEAA at XZ"(ptr {{[^,]*}} returned {{[^,]*}})
+  // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsC1Ev(ptr {{[^,]*}})
+  // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsC1Ev(ptr {{[^,]*}})
   __declspec(dllimport) ImportSpecials();
 
-  // M32-DAG: declare dllimport x86_thiscallcc void @"??1ImportSpecials@@QAE at XZ"(%struct.ImportSpecials* {{[^,]*}})
-  // M64-DAG: declare dllimport                void @"??1ImportSpecials@@QEAA at XZ"(%struct.ImportSpecials* {{[^,]*}})
-  // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsD1Ev(%struct.ImportSpecials* {{[^,]*}})
-  // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsD1Ev(%struct.ImportSpecials* {{[^,]*}})
+  // M32-DAG: declare dllimport x86_thiscallcc void @"??1ImportSpecials@@QAE at XZ"(ptr {{[^,]*}})
+  // M64-DAG: declare dllimport                void @"??1ImportSpecials@@QEAA at XZ"(ptr {{[^,]*}})
+  // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsD1Ev(ptr {{[^,]*}})
+  // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsD1Ev(ptr {{[^,]*}})
   __declspec(dllimport) ~ImportSpecials();
 
-  // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"??0ImportSpecials@@QAE at ABU0@@Z"(%struct.ImportSpecials* {{[^,]*}} returned {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                %struct.ImportSpecials* @"??0ImportSpecials@@QEAA at AEBU0@@Z"(%struct.ImportSpecials* {{[^,]*}} returned {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsC1ERKS_(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsC1ERKS_(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportSpecials@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                ptr @"??0ImportSpecials@@QEAA at AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsC1ERKS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsC1ERKS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
   __declspec(dllimport) ImportSpecials(const ImportSpecials&);
 
-  // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"??4ImportSpecials@@QAEAAU0 at ABU0@@Z"(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"??4ImportSpecials@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSERKS_(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G64-DAG: declare dllimport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSERKS_(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportSpecials@@QAEAAU0 at ABU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportSpecials@@QEAAAEAU0 at AEBU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ImportSpecialsaSERKS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G64-DAG: declare dllimport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ImportSpecialsaSERKS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
   __declspec(dllimport) ImportSpecials& operator=(const ImportSpecials&);
 
-  // M32-DAG: declare dllimport x86_thiscallcc %struct.ImportSpecials* @"??0ImportSpecials@@QAE@$$QAU0@@Z"(%struct.ImportSpecials* {{[^,]*}} returned {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                %struct.ImportSpecials* @"??0ImportSpecials@@QEAA@$$QEAU0@@Z"(%struct.ImportSpecials* {{[^,]*}} returned {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsC1EOS_(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsC1EOS_(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportSpecials@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                ptr @"??0ImportSpecials@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: declare dllimport x86_thiscallcc void                    @_ZN14ImportSpecialsC1EOS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G64-DAG: declare dllimport                void                    @_ZN14ImportSpecialsC1EOS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
   __declspec(dllimport) ImportSpecials(ImportSpecials&&);
 
-  // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"??4ImportSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @"??4ImportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSEOS_(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G64-DAG: declare dllimport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportSpecials* @_ZN14ImportSpecialsaSEOS_(%struct.ImportSpecials* {{[^,]*}}, %struct.ImportSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportSpecials@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportSpecials@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: declare dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ImportSpecialsaSEOS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G64-DAG: declare dllimport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14ImportSpecialsaSEOS_(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
   __declspec(dllimport) ImportSpecials& operator=(ImportSpecials&&);
 };
 USESPECIALS(ImportSpecials)
@@ -449,52 +449,52 @@ USESPECIALS(ImportSpecials)
 
 // Export inline special member functions.
 struct ImportInlineSpecials {
-  // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportInlineSpecials* @"??0ImportInlineSpecials@@QAE at XZ"(%struct.ImportInlineSpecials* {{[^,]*}} returned {{[^,]*}})
-  // M64-DAG: declare dllimport                  %struct.ImportInlineSpecials* @"??0ImportInlineSpecials@@QEAA at XZ"(%struct.ImportInlineSpecials* {{[^,]*}} returned {{[^,]*}})
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1Ev(%struct.ImportInlineSpecials* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN20ImportInlineSpecialsC1Ev(%struct.ImportInlineSpecials* {{[^,]*}} %this)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"??0ImportInlineSpecials@@QAE at XZ"(
+  // M32-DAG: declare dllimport   x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}})
+  // M64-DAG: declare dllimport                  ptr @"??0ImportInlineSpecials@@QEAA at XZ"(ptr {{[^,]*}} returned {{[^,]*}})
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1Ev(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN20ImportInlineSpecialsC1Ev(ptr {{[^,]*}} %this)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE at XZ"(
   // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1Ev(
   __declspec(dllimport) ImportInlineSpecials() {}
 
-  // M32-DAG: declare dllimport   x86_thiscallcc void @"??1ImportInlineSpecials@@QAE at XZ"(%struct.ImportInlineSpecials* {{[^,]*}})
-  // M64-DAG: declare dllimport                  void @"??1ImportInlineSpecials@@QEAA at XZ"(%struct.ImportInlineSpecials* {{[^,]*}})
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsD1Ev(%struct.ImportInlineSpecials* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN20ImportInlineSpecialsD1Ev(%struct.ImportInlineSpecials* {{[^,]*}} %this)
+  // M32-DAG: declare dllimport   x86_thiscallcc void @"??1ImportInlineSpecials@@QAE at XZ"(ptr {{[^,]*}})
+  // M64-DAG: declare dllimport                  void @"??1ImportInlineSpecials@@QEAA at XZ"(ptr {{[^,]*}})
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsD1Ev(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN20ImportInlineSpecialsD1Ev(ptr {{[^,]*}} %this)
   // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"??1ImportInlineSpecials@@QAE at XZ"(
   // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsD1Ev(
   __declspec(dllimport) ~ImportInlineSpecials() {}
 
-  // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportInlineSpecials* @"??0ImportInlineSpecials@@QAE at ABU0@@Z"(%struct.ImportInlineSpecials* {{[^,]*}} returned {{[^,]*}}, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                  %struct.ImportInlineSpecials* @"??0ImportInlineSpecials@@QEAA at AEBU0@@Z"(%struct.ImportInlineSpecials* {{[^,]*}} returned {{[^,]*}}, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(%struct.ImportInlineSpecials* {{[^,]*}} %this, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN20ImportInlineSpecialsC1ERKS_(%struct.ImportInlineSpecials* {{[^,]*}} %this, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"??0ImportInlineSpecials@@QAE at ABU0@@Z"(
+  // M32-DAG: declare dllimport   x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                  ptr @"??0ImportInlineSpecials@@QEAA at AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN20ImportInlineSpecialsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE at ABU0@@Z"(
   // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1ERKS_(
   __declspec(dllimport) inline ImportInlineSpecials(const ImportInlineSpecials&);
 
-  // M32-DAG: declare dllimport   x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"??4ImportInlineSpecials@@QAEAAU0 at ABU0@@Z"(%struct.ImportInlineSpecials* {{[^,]*}}, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                  nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"??4ImportInlineSpecials@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportInlineSpecials* {{[^,]*}}, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(%struct.ImportInlineSpecials* {{[^,]*}} %this, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define linkonce_odr dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(%struct.ImportInlineSpecials* {{[^,]*}} %this, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"??4ImportInlineSpecials@@QAEAAU0 at ABU0@@Z"(
-  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSERKS_(
+  // M32-DAG: declare dllimport   x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QAEAAU0 at ABU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                  nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QEAAAEAU0 at AEBU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define linkonce_odr dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QAEAAU0 at ABU0@@Z"(
+  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSERKS_(
   __declspec(dllimport) ImportInlineSpecials& operator=(const ImportInlineSpecials&);
 
-  // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportInlineSpecials* @"??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(%struct.ImportInlineSpecials* {{[^,]*}} returned {{[^,]*}}, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                  %struct.ImportInlineSpecials* @"??0ImportInlineSpecials@@QEAA@$$QEAU0@@Z"(%struct.ImportInlineSpecials* {{[^,]*}} returned {{[^,]*}}, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(%struct.ImportInlineSpecials* {{[^,]*}} %this, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN20ImportInlineSpecialsC1EOS_(%struct.ImportInlineSpecials* {{[^,]*}} %this, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportInlineSpecials* @"??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(
+  // M32-DAG: declare dllimport   x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                  ptr @"??0ImportInlineSpecials@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN20ImportInlineSpecialsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportInlineSpecials@@QAE@$$QAU0@@Z"(
   // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN20ImportInlineSpecialsC1EOS_(
   __declspec(dllimport) ImportInlineSpecials(ImportInlineSpecials&&) {}
 
-  // M32-DAG: declare dllimport   x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(%struct.ImportInlineSpecials* {{[^,]*}}, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                  nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"??4ImportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportInlineSpecials* {{[^,]*}}, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(%struct.ImportInlineSpecials* {{[^,]*}} %this, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define linkonce_odr dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(%struct.ImportInlineSpecials* {{[^,]*}} %this, %struct.ImportInlineSpecials* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @"??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
-  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportInlineSpecials* @_ZN20ImportInlineSpecialsaSEOS_(
+  // M32-DAG: declare dllimport   x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                  nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define linkonce_odr dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportInlineSpecials@@QAEAAU0@$$QAU0@@Z"(
+  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN20ImportInlineSpecialsaSEOS_(
   __declspec(dllimport) ImportInlineSpecials& operator=(ImportInlineSpecials&&) { return *this; }
 };
 ImportInlineSpecials::ImportInlineSpecials(const ImportInlineSpecials&) {}
@@ -504,52 +504,52 @@ USESPECIALS(ImportInlineSpecials)
 
 // Import defaulted member functions.
 struct ImportDefaulted {
-  // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportDefaulted* @"??0ImportDefaulted@@QAE at XZ"(%struct.ImportDefaulted* {{[^,]*}} returned {{[^,]*}})
-  // M64-DAG: declare dllimport                  %struct.ImportDefaulted* @"??0ImportDefaulted@@QEAA at XZ"(%struct.ImportDefaulted* {{[^,]*}} returned {{[^,]*}})
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void                     @_ZN15ImportDefaultedC1Ev(%struct.ImportDefaulted* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void                     @_ZN15ImportDefaultedC1Ev(%struct.ImportDefaulted* {{[^,]*}} %this)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"??0ImportDefaulted@@QAE at XZ"(%struct.ImportDefaulted* {{[^,]*}} returned {{[^,]*}} %this)
-  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1Ev(%struct.ImportDefaulted* {{[^,]*}} %this)
+  // M32-DAG: declare dllimport   x86_thiscallcc ptr @"??0ImportDefaulted@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}})
+  // M64-DAG: declare dllimport                  ptr @"??0ImportDefaulted@@QEAA at XZ"(ptr {{[^,]*}} returned {{[^,]*}})
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void                     @_ZN15ImportDefaultedC1Ev(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void                     @_ZN15ImportDefaultedC1Ev(ptr {{[^,]*}} %this)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportDefaulted@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}} %this)
+  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1Ev(ptr {{[^,]*}} %this)
   __declspec(dllimport) ImportDefaulted() = default;
 
-  // M32-DAG: declare dllimport   x86_thiscallcc void @"??1ImportDefaulted@@QAE at XZ"(%struct.ImportDefaulted* {{[^,]*}})
-  // M64-DAG: declare dllimport                  void @"??1ImportDefaulted@@QEAA at XZ"(%struct.ImportDefaulted* {{[^,]*}})
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(%struct.ImportDefaulted* {{[^,]*}} %this)
-  // G64-DAG: define linkonce_odr dso_local                void @_ZN15ImportDefaultedD1Ev(%struct.ImportDefaulted* {{[^,]*}} %this)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"??1ImportDefaulted@@QAE at XZ"(%struct.ImportDefaulted* {{[^,]*}} %this)
-  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(%struct.ImportDefaulted* {{[^,]*}} %this)
+  // M32-DAG: declare dllimport   x86_thiscallcc void @"??1ImportDefaulted@@QAE at XZ"(ptr {{[^,]*}})
+  // M64-DAG: declare dllimport                  void @"??1ImportDefaulted@@QEAA at XZ"(ptr {{[^,]*}})
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(ptr {{[^,]*}} %this)
+  // G64-DAG: define linkonce_odr dso_local                void @_ZN15ImportDefaultedD1Ev(ptr {{[^,]*}} %this)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc void @"??1ImportDefaulted@@QAE at XZ"(ptr {{[^,]*}} %this)
+  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedD1Ev(ptr {{[^,]*}} %this)
   __declspec(dllimport) ~ImportDefaulted() = default;
 
-  // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportDefaulted* @"??0ImportDefaulted@@QAE at ABU0@@Z"(%struct.ImportDefaulted* {{[^,]*}} returned {{[^,]*}}, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                  %struct.ImportDefaulted* @"??0ImportDefaulted@@QEAA at AEBU0@@Z"(%struct.ImportDefaulted* {{[^,]*}} returned {{[^,]*}}, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void                     @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define linkonce_odr dso_local                void                     @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"??0ImportDefaulted@@QAE at ABU0@@Z"(%struct.ImportDefaulted* {{[^,]*}} returned {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32-DAG: declare dllimport   x86_thiscallcc ptr @"??0ImportDefaulted@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                  ptr @"??0ImportDefaulted@@QEAA at AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void                     @_ZN15ImportDefaultedC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define linkonce_odr dso_local                void                     @_ZN15ImportDefaultedC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportDefaulted@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
   __declspec(dllimport) ImportDefaulted(const ImportDefaulted&) = default;
 
-  // M32-DAG: declare dllimport   x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"??4ImportDefaulted@@QAEAAU0 at ABU0@@Z"(%struct.ImportDefaulted* {{[^,]*}}, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                  nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"??4ImportDefaulted@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportDefaulted* {{[^,]*}}, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define linkonce_odr dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"??4ImportDefaulted@@QAEAAU0 at ABU0@@Z"(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSERKS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32-DAG: declare dllimport   x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QAEAAU0 at ABU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                  nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QEAAAEAU0 at AEBU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define linkonce_odr dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QAEAAU0 at ABU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
   __declspec(dllimport) ImportDefaulted& operator=(const ImportDefaulted&) = default;
 
-  // M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportDefaulted* @"??0ImportDefaulted@@QAE@$$QAU0@@Z"(%struct.ImportDefaulted* {{[^,]*}} returned {{[^,]*}}, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                  %struct.ImportDefaulted* @"??0ImportDefaulted@@QEAA@$$QEAU0@@Z"(%struct.ImportDefaulted* {{[^,]*}} returned {{[^,]*}}, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void                     @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define linkonce_odr dso_local                void                     @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc %struct.ImportDefaulted* @"??0ImportDefaulted@@QAE@$$QAU0@@Z"(%struct.ImportDefaulted* {{[^,]*}} returned {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32-DAG: declare dllimport   x86_thiscallcc ptr @"??0ImportDefaulted@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                  ptr @"??0ImportDefaulted@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc void                     @_ZN15ImportDefaultedC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define linkonce_odr dso_local                void                     @_ZN15ImportDefaultedC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc ptr @"??0ImportDefaulted@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN15ImportDefaultedC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
   __declspec(dllimport) ImportDefaulted(ImportDefaulted&&) = default;
 
-  // M32-DAG: declare dllimport   x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaulted* {{[^,]*}}, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // M64-DAG: declare dllimport                  nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"??4ImportDefaulted@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportDefaulted* {{[^,]*}}, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // G64-DAG: define linkonce_odr dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @"??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaulted* @_ZN15ImportDefaultedaSEOS_(%struct.ImportDefaulted* {{[^,]*}} %this, %struct.ImportDefaulted* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // M32-DAG: declare dllimport   x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // M64-DAG: declare dllimport                  nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+  // G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // G64-DAG: define linkonce_odr dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaulted@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+  // GO1-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN15ImportDefaultedaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
   __declspec(dllimport) ImportDefaulted& operator=(ImportDefaulted&&) = default;
 
   ForceNonTrivial v; // ensure special members are non-trivial
@@ -571,42 +571,42 @@ struct ImportDefaultedDefs {
 
 #ifdef MSABI
 // For MinGW, the function will not be dllimport, and we cannot add the attribute now.
-// M32-DAG: declare dllimport x86_thiscallcc %struct.ImportDefaultedDefs* @"??0ImportDefaultedDefs@@QAE at XZ"(%struct.ImportDefaultedDefs* {{[^,]*}} returned {{[^,]*}})
-// M64-DAG: declare dllimport                %struct.ImportDefaultedDefs* @"??0ImportDefaultedDefs@@QEAA at XZ"(%struct.ImportDefaultedDefs* {{[^,]*}} returned {{[^,]*}})
+// M32-DAG: declare dllimport x86_thiscallcc ptr @"??0ImportDefaultedDefs@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}})
+// M64-DAG: declare dllimport                ptr @"??0ImportDefaultedDefs@@QEAA at XZ"(ptr {{[^,]*}} returned {{[^,]*}})
 __declspec(dllimport) ImportDefaultedDefs::ImportDefaultedDefs() = default;
 #endif
 
 #ifdef MSABI
 // For MinGW, the function will not be dllimport, and we cannot add the attribute now.
-// M32-DAG: declare dllimport x86_thiscallcc void @"??1ImportDefaultedDefs@@QAE at XZ"(%struct.ImportDefaultedDefs* {{[^,]*}})
-// M64-DAG: declare dllimport                void @"??1ImportDefaultedDefs@@QEAA at XZ"(%struct.ImportDefaultedDefs* {{[^,]*}})
+// M32-DAG: declare dllimport x86_thiscallcc void @"??1ImportDefaultedDefs@@QAE at XZ"(ptr {{[^,]*}})
+// M64-DAG: declare dllimport                void @"??1ImportDefaultedDefs@@QEAA at XZ"(ptr {{[^,]*}})
 __declspec(dllimport) ImportDefaultedDefs::~ImportDefaultedDefs() = default;
 #endif
 
-// M32-DAG: declare dllimport   x86_thiscallcc %struct.ImportDefaultedDefs* @"??0ImportDefaultedDefs@@QAE at ABU0@@Z"(%struct.ImportDefaultedDefs* {{[^,]*}} returned {{[^,]*}}, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-// M64-DAG: declare dllimport                  %struct.ImportDefaultedDefs* @"??0ImportDefaultedDefs@@QEAA at AEBU0@@Z"(%struct.ImportDefaultedDefs* {{[^,]*}} returned {{[^,]*}}, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-// G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN19ImportDefaultedDefsC1ERKS_(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define linkonce_odr dso_local                 void @_ZN19ImportDefaultedDefsC1ERKS_(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M32-DAG: declare dllimport   x86_thiscallcc ptr @"??0ImportDefaultedDefs@@QAE at ABU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+// M64-DAG: declare dllimport                  ptr @"??0ImportDefaultedDefs@@QEAA at AEBU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+// G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN19ImportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define linkonce_odr dso_local                 void @_ZN19ImportDefaultedDefsC1ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 inline ImportDefaultedDefs::ImportDefaultedDefs(const ImportDefaultedDefs&) = default;
 
-// M32-DAG: declare dllimport   x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"??4ImportDefaultedDefs@@QAEAAU0 at ABU0@@Z"(%struct.ImportDefaultedDefs* {{[^,]*}}, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-// M64-DAG: declare dllimport                  nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"??4ImportDefaultedDefs@@QEAAAEAU0 at AEBU0@@Z"(%struct.ImportDefaultedDefs* {{[^,]*}}, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
-// G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSERKS_(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define linkonce_odr dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSERKS_(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M32-DAG: declare dllimport   x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaultedDefs@@QAEAAU0 at ABU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+// M64-DAG: declare dllimport                  nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaultedDefs@@QEAAAEAU0 at AEBU0@@Z"(ptr {{[^,]*}}, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}))
+// G32-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ImportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define linkonce_odr dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ImportDefaultedDefsaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 inline ImportDefaultedDefs& ImportDefaultedDefs::operator=(const ImportDefaultedDefs&) = default;
 
-// M32-DAG: define dso_local dllexport x86_thiscallcc %struct.ImportDefaultedDefs* @"??0ImportDefaultedDefs@@QAE@$$QAU0@@Z"(%struct.ImportDefaultedDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// M64-DAG: define dso_local dllexport                %struct.ImportDefaultedDefs* @"??0ImportDefaultedDefs@@QEAA@$$QEAU0@@Z"(%struct.ImportDefaultedDefs* {{[^,]*}} returned {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G32-DAG: define dso_local x86_thiscallcc void @_ZN19ImportDefaultedDefsC1EOS_(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define dso_local                void @_ZN19ImportDefaultedDefsC1EOS_(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G32-DAG: define dso_local x86_thiscallcc void @_ZN19ImportDefaultedDefsC2EOS_(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define dso_local                void @_ZN19ImportDefaultedDefsC2EOS_(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M32-DAG: define dso_local dllexport x86_thiscallcc ptr @"??0ImportDefaultedDefs@@QAE@$$QAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M64-DAG: define dso_local dllexport                ptr @"??0ImportDefaultedDefs@@QEAA@$$QEAU0@@Z"(ptr {{[^,]*}} returned {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G32-DAG: define dso_local x86_thiscallcc void @_ZN19ImportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define dso_local                void @_ZN19ImportDefaultedDefsC1EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G32-DAG: define dso_local x86_thiscallcc void @_ZN19ImportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define dso_local                void @_ZN19ImportDefaultedDefsC2EOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 ImportDefaultedDefs::ImportDefaultedDefs(ImportDefaultedDefs&&) = default; // dllimport ignored
 
-// M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"??4ImportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// M64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @"??4ImportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G32-DAG: define dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSEOS_(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// G64-DAG: define dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ImportDefaultedDefs* @_ZN19ImportDefaultedDefsaSEOS_(%struct.ImportDefaultedDefs* {{[^,]*}} %this, %struct.ImportDefaultedDefs* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M32-DAG: define dso_local dllexport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaultedDefs@@QAEAAU0@$$QAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// M64-DAG: define dso_local dllexport                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4ImportDefaultedDefs@@QEAAAEAU0@$$QEAU0@@Z"(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G32-DAG: define dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ImportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// G64-DAG: define dso_local                nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN19ImportDefaultedDefsaSEOS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 ImportDefaultedDefs& ImportDefaultedDefs::operator=(ImportDefaultedDefs&&) = default; // dllimport ignored
 
 USESPECIALS(ImportDefaultedDefs)
@@ -620,28 +620,28 @@ struct ImportAlloc {
   __declspec(dllimport) void operator delete[](void*);
 };
 
-// M32-DAG: declare dllimport i8* @"??2ImportAlloc@@SAPAXI at Z"(i32)
-// M64-DAG: declare dllimport i8* @"??2ImportAlloc@@SAPEAX_K at Z"(i64)
-// G32-DAG: declare dllimport i8* @_ZN11ImportAllocnwEj(i32)
-// G64-DAG: declare dllimport i8* @_ZN11ImportAllocnwEy(i64)
+// M32-DAG: declare dllimport ptr @"??2ImportAlloc@@SAPAXI at Z"(i32)
+// M64-DAG: declare dllimport ptr @"??2ImportAlloc@@SAPEAX_K at Z"(i64)
+// G32-DAG: declare dllimport ptr @_ZN11ImportAllocnwEj(i32)
+// G64-DAG: declare dllimport ptr @_ZN11ImportAllocnwEy(i64)
 void UNIQ(use)() { new ImportAlloc(); }
 
-// M32-DAG: declare dllimport i8* @"??_UImportAlloc@@SAPAXI at Z"(i32)
-// M64-DAG: declare dllimport i8* @"??_UImportAlloc@@SAPEAX_K at Z"(i64)
-// G32-DAG: declare dllimport i8* @_ZN11ImportAllocnaEj(i32)
-// G64-DAG: declare dllimport i8* @_ZN11ImportAllocnaEy(i64)
+// M32-DAG: declare dllimport ptr @"??_UImportAlloc@@SAPAXI at Z"(i32)
+// M64-DAG: declare dllimport ptr @"??_UImportAlloc@@SAPEAX_K at Z"(i64)
+// G32-DAG: declare dllimport ptr @_ZN11ImportAllocnaEj(i32)
+// G64-DAG: declare dllimport ptr @_ZN11ImportAllocnaEy(i64)
 void UNIQ(use)() { new ImportAlloc[1]; }
 
-// M32-DAG: declare dllimport void @"??3ImportAlloc@@SAXPAX at Z"(i8*)
-// M64-DAG: declare dllimport void @"??3ImportAlloc@@SAXPEAX at Z"(i8*)
-// G32-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(i8*)
-// G64-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(i8*)
+// M32-DAG: declare dllimport void @"??3ImportAlloc@@SAXPAX at Z"(ptr)
+// M64-DAG: declare dllimport void @"??3ImportAlloc@@SAXPEAX at Z"(ptr)
+// G32-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(ptr)
+// G64-DAG: declare dllimport void @_ZN11ImportAllocdlEPv(ptr)
 void UNIQ(use)(ImportAlloc* ptr) { delete ptr; }
 
-// M32-DAG: declare dllimport void @"??_VImportAlloc@@SAXPAX at Z"(i8*)
-// M64-DAG: declare dllimport void @"??_VImportAlloc@@SAXPEAX at Z"(i8*)
-// G32-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(i8*)
-// G64-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(i8*)
+// M32-DAG: declare dllimport void @"??_VImportAlloc@@SAXPAX at Z"(ptr)
+// M64-DAG: declare dllimport void @"??_VImportAlloc@@SAXPEAX at Z"(ptr)
+// G32-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(ptr)
+// G64-DAG: declare dllimport void @_ZN11ImportAllocdaEPv(ptr)
 void UNIQ(use)(ImportAlloc* ptr) { delete[] ptr; }
 
 
@@ -657,10 +657,10 @@ struct MemFunTmpl {
 };
 
 // Import implicit instantiation of an imported member function template.
-// M32-DAG: declare dllimport   x86_thiscallcc void @"??$importedNormal at UImplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG: declare dllimport                  void @"??$importedNormal at UImplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define linkonce_odr dso_local                void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: declare dllimport   x86_thiscallcc void @"??$importedNormal at UImplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG: declare dllimport                  void @"??$importedNormal at UImplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
+// G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define linkonce_odr dso_local                void @_ZN10MemFunTmpl14importedNormalI21ImplicitInst_ImportedEEvv(ptr {{[^,]*}} %this)
 USEMF(MemFunTmpl, importedNormal<ImplicitInst_Imported>)
 
 // MSC-DAG: declare dllimport                void @"??$importedStatic at UImplicitInst_Imported@@@MemFunTmpl@@SAXXZ"()
@@ -670,10 +670,10 @@ USE(MemFunTmpl::importedStatic<ImplicitInst_Imported>)
 
 // Import explicit instantiation declaration of an imported member function
 // template.
-// M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal at UExplicitDecl_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG: declare dllimport                void @"??$importedNormal at UExplicitDecl_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// G32-DAG: declare dso_local x86_thiscallcc           void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}})
-// G64-DAG: declare dso_local                          void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}})
+// M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal at UExplicitDecl_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG: declare dllimport                void @"??$importedNormal at UExplicitDecl_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
+// G32-DAG: declare dso_local x86_thiscallcc           void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(ptr {{[^,]*}})
+// G64-DAG: declare dso_local                          void @_ZN10MemFunTmpl14importedNormalI21ExplicitDecl_ImportedEEvv(ptr {{[^,]*}})
 extern template void MemFunTmpl::importedNormal<ExplicitDecl_Imported>();
 USEMF(MemFunTmpl, importedNormal<ExplicitDecl_Imported>)
 
@@ -685,10 +685,10 @@ USE(MemFunTmpl::importedStatic<ExplicitDecl_Imported>)
 
 // Import explicit instantiation definition of an imported member function
 // template.
-// M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal at UExplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG: declare dllimport                void @"??$importedNormal at UExplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// G32-DAG: define weak_odr dso_local x86_thiscallcc   void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define weak_odr dso_local                  void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal at UExplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG: declare dllimport                void @"??$importedNormal at UExplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
+// G32-DAG: define weak_odr dso_local x86_thiscallcc   void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define weak_odr dso_local                  void @_ZN10MemFunTmpl14importedNormalI21ExplicitInst_ImportedEEvv(ptr {{[^,]*}} %this)
 template void MemFunTmpl::importedNormal<ExplicitInst_Imported>();
 USEMF(MemFunTmpl, importedNormal<ExplicitInst_Imported>)
 
@@ -699,24 +699,24 @@ USE(MemFunTmpl::importedStatic<ExplicitInst_Imported>)
 
 
 // Import specialization of an imported member function template.
-// M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal at UExplicitSpec_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG: declare dllimport                void @"??$importedNormal at UExplicitSpec_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}})
-// G64-DAG: declare dllimport                void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}})
+// M32-DAG: declare dllimport x86_thiscallcc void @"??$importedNormal at UExplicitSpec_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG: declare dllimport                void @"??$importedNormal at UExplicitSpec_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(ptr {{[^,]*}})
+// G64-DAG: declare dllimport                void @_ZN10MemFunTmpl14importedNormalI21ExplicitSpec_ImportedEEvv(ptr {{[^,]*}})
 template<> __declspec(dllimport) void MemFunTmpl::importedNormal<ExplicitSpec_Imported>();
 USEMF(MemFunTmpl, importedNormal<ExplicitSpec_Imported>)
 
-// M32-DAG-FIXME: declare dllimport x86_thiscallcc void @"??$importedNormal at UExplicitSpec_Def_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG-FIXME: declare dllimport                void @"??$importedNormal at UExplicitSpec_Def_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
+// M32-DAG-FIXME: declare dllimport x86_thiscallcc void @"??$importedNormal at UExplicitSpec_Def_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG-FIXME: declare dllimport                void @"??$importedNormal at UExplicitSpec_Def_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
 #ifdef MSABI
 //template<> __declspec(dllimport) void MemFunTmpl::importedNormal<ExplicitSpec_Def_Imported>() {}
 //USEMF(MemFunTmpl, importedNormal<ExplicitSpec_Def_Imported>)
 #endif
 
-// M32-DAG: declare dllimport   x86_thiscallcc void @"??$importedNormal at UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG: declare dllimport                  void @"??$importedNormal at UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define linkonce_odr dso_local                void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: declare dllimport   x86_thiscallcc void @"??$importedNormal at UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG: declare dllimport                  void @"??$importedNormal at UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
+// G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define linkonce_odr dso_local                void @_ZN10MemFunTmpl14importedNormalI31ExplicitSpec_InlineDef_ImportedEEvv(ptr {{[^,]*}} %this)
 template<> __declspec(dllimport) inline void MemFunTmpl::importedNormal<ExplicitSpec_InlineDef_Imported>() {}
 USEMF(MemFunTmpl, importedNormal<ExplicitSpec_InlineDef_Imported>)
 
@@ -740,10 +740,10 @@ USE(MemFunTmpl::importedStatic<ExplicitSpec_InlineDef_Imported>)
 
 // Not importing specialization of an imported member function template without
 // explicit dllimport.
-// M32-DAG: define dso_local x86_thiscallcc void @"??$importedNormal at UExplicitSpec_NotImported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// M64-DAG: define dso_local                void @"??$importedNormal at UExplicitSpec_NotImported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G32-DAG: define dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define dso_local                void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: define dso_local x86_thiscallcc void @"??$importedNormal at UExplicitSpec_NotImported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}} %this)
+// M64-DAG: define dso_local                void @"??$importedNormal at UExplicitSpec_NotImported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}} %this)
+// G32-DAG: define dso_local x86_thiscallcc void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define dso_local                void @_ZN10MemFunTmpl14importedNormalI24ExplicitSpec_NotImportedEEvv(ptr {{[^,]*}} %this)
 template<> void MemFunTmpl::importedNormal<ExplicitSpec_NotImported>() {}
 USEMF(MemFunTmpl, importedNormal<ExplicitSpec_NotImported>)
 
@@ -755,10 +755,10 @@ USE(MemFunTmpl::importedStatic<ExplicitSpec_NotImported>)
 
 // Import explicit instantiation declaration of a non-imported member function
 // template.
-// M32-DAG: declare dllimport x86_thiscallcc void @"??$normalDef at UExplicitDecl_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG: declare dllimport                void @"??$normalDef at UExplicitDecl_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// G32-DAG: declare dso_local x86_thiscallcc           void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}})
-// G64-DAG: declare dso_local                          void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}})
+// M32-DAG: declare dllimport x86_thiscallcc void @"??$normalDef at UExplicitDecl_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG: declare dllimport                void @"??$normalDef at UExplicitDecl_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
+// G32-DAG: declare dso_local x86_thiscallcc           void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(ptr {{[^,]*}})
+// G64-DAG: declare dso_local                          void @_ZN10MemFunTmpl9normalDefI21ExplicitDecl_ImportedEEvv(ptr {{[^,]*}})
 extern template __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitDecl_Imported>();
 USEMF(MemFunTmpl, normalDef<ExplicitDecl_Imported>)
 
@@ -770,10 +770,10 @@ USE(MemFunTmpl::staticDef<ExplicitDecl_Imported>)
 
 // Import explicit instantiation definition of a non-imported member function
 // template.
-// M32-DAG: declare dllimport x86_thiscallcc void @"??$normalDef at UExplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG: declare dllimport                void @"??$normalDef at UExplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// G32-DAG: define weak_odr dso_local x86_thiscallcc   void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define weak_odr dso_local                  void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: declare dllimport x86_thiscallcc void @"??$normalDef at UExplicitInst_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG: declare dllimport                void @"??$normalDef at UExplicitInst_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
+// G32-DAG: define weak_odr dso_local x86_thiscallcc   void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define weak_odr dso_local                  void @_ZN10MemFunTmpl9normalDefI21ExplicitInst_ImportedEEvv(ptr {{[^,]*}} %this)
 template __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitInst_Imported>();
 USEMF(MemFunTmpl, normalDef<ExplicitInst_Imported>)
 
@@ -784,24 +784,24 @@ USE(MemFunTmpl::staticDef<ExplicitInst_Imported>)
 
 
 // Import specialization of a non-imported member function template.
-// M32-DAG: declare dllimport x86_thiscallcc void @"??$normalDef at UExplicitSpec_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG: declare dllimport                void @"??$normalDef at UExplicitSpec_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}})
-// G64-DAG: declare dllimport                void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}})
+// M32-DAG: declare dllimport x86_thiscallcc void @"??$normalDef at UExplicitSpec_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG: declare dllimport                void @"??$normalDef at UExplicitSpec_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
+// G32-DAG: declare dllimport x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(ptr {{[^,]*}})
+// G64-DAG: declare dllimport                void @_ZN10MemFunTmpl9normalDefI21ExplicitSpec_ImportedEEvv(ptr {{[^,]*}})
 template<> __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitSpec_Imported>();
 USEMF(MemFunTmpl, normalDef<ExplicitSpec_Imported>)
 
-// M32-DAG-FIXME: declare dllimport x86_thiscallcc void @"??$normalDef at UExplicitSpec_Def_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG-FIXME: declare dllimport                void @"??$normalDef at UExplicitSpec_Def_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
+// M32-DAG-FIXME: declare dllimport x86_thiscallcc void @"??$normalDef at UExplicitSpec_Def_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG-FIXME: declare dllimport                void @"??$normalDef at UExplicitSpec_Def_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
 #ifdef MSABI
 //template<> __declspec(dllimport) void MemFunTmpl::normalDef<ExplicitSpec_Def_Imported>() {}
 //USEMF(MemFunTmpl, normalDef<ExplicitSpec_Def_Imported>)
 #endif
 
-// M32-DAG: declare dllimport   x86_thiscallcc void @"??$normalDef at UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QAEXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// M64-DAG: declare dllimport                  void @"??$normalDef at UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QEAAXXZ"(%struct.MemFunTmpl* {{[^,]*}})
-// G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
-// G64-DAG: define linkonce_odr dso_local                void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(%struct.MemFunTmpl* {{[^,]*}} %this)
+// M32-DAG: declare dllimport   x86_thiscallcc void @"??$normalDef at UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QAEXXZ"(ptr {{[^,]*}})
+// M64-DAG: declare dllimport                  void @"??$normalDef at UExplicitSpec_InlineDef_Imported@@@MemFunTmpl@@QEAAXXZ"(ptr {{[^,]*}})
+// G32-DAG: define linkonce_odr dso_local x86_thiscallcc void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(ptr {{[^,]*}} %this)
+// G64-DAG: define linkonce_odr dso_local                void @_ZN10MemFunTmpl9normalDefI31ExplicitSpec_InlineDef_ImportedEEvv(ptr {{[^,]*}} %this)
 template<> __declspec(dllimport) inline void MemFunTmpl::normalDef<ExplicitSpec_InlineDef_Imported>() {}
 USEMF(MemFunTmpl, normalDef<ExplicitSpec_InlineDef_Imported>)
 

diff  --git a/clang/test/CodeGenCXX/dllimport-memptr-global.cpp b/clang/test/CodeGenCXX/dllimport-memptr-global.cpp
index 2fb37121766f6..951f933e10aaf 100644
--- a/clang/test/CodeGenCXX/dllimport-memptr-global.cpp
+++ b/clang/test/CodeGenCXX/dllimport-memptr-global.cpp
@@ -1,8 +1,8 @@
 // Also check that -Wglobal-constructors does the right thing. Strictly
 // speaking, this is a Sema test, but this avoids test case duplication.
-// RUN: %clang_cc1 -no-opaque-pointers -Wglobal-constructors %s -verify -triple i686-windows-msvc -fms-extensions -std=c++11
+// RUN: %clang_cc1 -Wglobal-constructors %s -verify -triple i686-windows-msvc -fms-extensions -std=c++11
 //
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple i686-windows-msvc -fms-extensions -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple i686-windows-msvc -fms-extensions -std=c++11 | FileCheck %s
 
 struct __declspec(dllimport) Single {
   void nonvirt();
@@ -40,15 +40,15 @@ auto mp_general_v = &General::virt;
 
 // All of the non-virtual globals need dynamic initializers.
 
-// CHECK: @"?mp_single_nv@@3P8Single@@AEXXZQ1@" = dso_local global i8* null, align 4
-// CHECK: @"?mp_multi_nv@@3P8Multi@@AEXXZQ1@" = dso_local global { i8*, i32 } zeroinitializer, align 4
-// CHECK: @"?mp_virtual_nv@@3P8Virtual@@AEXXZQ1@" = dso_local global { i8*, i32, i32 } zeroinitializer, align 4
-// CHECK: @"?mp_general_nv@@3P8General@@AEXXZQ1@" = dso_local global { i8*, i32, i32, i32 } zeroinitializer, align 4
+// CHECK: @"?mp_single_nv@@3P8Single@@AEXXZQ1@" = dso_local global ptr null, align 4
+// CHECK: @"?mp_multi_nv@@3P8Multi@@AEXXZQ1@" = dso_local global { ptr, i32 } zeroinitializer, align 4
+// CHECK: @"?mp_virtual_nv@@3P8Virtual@@AEXXZQ1@" = dso_local global { ptr, i32, i32 } zeroinitializer, align 4
+// CHECK: @"?mp_general_nv@@3P8General@@AEXXZQ1@" = dso_local global { ptr, i32, i32, i32 } zeroinitializer, align 4
 
-// CHECK: @"?mp_single_v@@3P8Single@@AEXXZQ1@" = dso_local global i8* bitcast (void (%struct.Single*, ...)* @"??_9Single@@$BA at AE" to i8*), align 4
-// CHECK: @"?mp_multi_v@@3P8Multi@@AEXXZQ1@" = dso_local global { i8*, i32 } { i8* bitcast (void (%struct.Multi*, ...)* @"??_9Multi@@$BA at AE" to i8*), i32 0 }, align 4
-// CHECK: @"?mp_virtual_v@@3P8Virtual@@AEXXZQ1@" = dso_local global { i8*, i32, i32 } { i8* bitcast (void (%struct.Virtual*, ...)* @"??_9Virtual@@$BA at AE" to i8*), i32 0, i32 0 }, align 4
-// CHECK: @"?mp_general_v@@3P8General@@AEXXZQ1@" = dso_local global { i8*, i32, i32, i32 } { i8* bitcast (void (%struct.General*, ...)* @"??_9General@@$BA at AE" to i8*), i32 0, i32 0, i32 0 }, align 4
+// CHECK: @"?mp_single_v@@3P8Single@@AEXXZQ1@" = dso_local global ptr @"??_9Single@@$BA at AE", align 4
+// CHECK: @"?mp_multi_v@@3P8Multi@@AEXXZQ1@" = dso_local global { ptr, i32 } { ptr @"??_9Multi@@$BA at AE", i32 0 }, align 4
+// CHECK: @"?mp_virtual_v@@3P8Virtual@@AEXXZQ1@" = dso_local global { ptr, i32, i32 } { ptr @"??_9Virtual@@$BA at AE", i32 0, i32 0 }, align 4
+// CHECK: @"?mp_general_v@@3P8General@@AEXXZQ1@" = dso_local global { ptr, i32, i32, i32 } { ptr @"??_9General@@$BA at AE", i32 0, i32 0, i32 0 }, align 4
 
 // CHECK: define internal void @_GLOBAL__sub_I{{.*}}() {{.*}} {
 // CHECK:   call void @"??__Emp_single_nv@@YAXXZ"()

diff  --git a/clang/test/CodeGenCXX/dllimport-rtti.cpp b/clang/test/CodeGenCXX/dllimport-rtti.cpp
index 879c96e3a08b1..f23a242c4bedc 100644
--- a/clang/test/CodeGenCXX/dllimport-rtti.cpp
+++ b/clang/test/CodeGenCXX/dllimport-rtti.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-msvc -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=MSVC
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-gnu  -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU
+// RUN: %clang_cc1 -triple i686-windows-msvc -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=MSVC
+// RUN: %clang_cc1 -triple i686-windows-gnu  -emit-llvm -std=c++1y -fms-extensions -O1 -disable-llvm-passes -o - %s | FileCheck %s --check-prefix=GNU
 
 struct __declspec(dllimport) S {
   virtual void f() {}
 } s;
-// MSVC: [[VF_S:.*]] = private unnamed_addr constant { [2 x i8*] }
-// MSVC-DAG: @"??_SS@@6B@" = unnamed_addr alias i8*, getelementptr inbounds ({ [2 x i8*] }, { [2 x i8*] }* [[VF_S]], i32 0, i32 0, i32 1)
+// MSVC: [[VF_S:.*]] = private unnamed_addr constant { [2 x ptr] }
+// MSVC-DAG: @"??_SS@@6B@" = unnamed_addr alias ptr, getelementptr inbounds ({ [2 x ptr] }, ptr [[VF_S]], i32 0, i32 0, i32 1)
 // MSVC-DAG: @"??_R0?AUS@@@8" = linkonce_odr
 // MSVC-DAG: @"??_R1A@?0A at EA@S@@8" = linkonce_odr
 // MSVC-DAG: @"??_R2S@@8" = linkonce_odr

diff  --git a/clang/test/CodeGenCXX/dllimport-runtime-fns.cpp b/clang/test/CodeGenCXX/dllimport-runtime-fns.cpp
index 8219b42d9d6c3..d58950dbaf476 100644
--- a/clang/test/CodeGenCXX/dllimport-runtime-fns.cpp
+++ b/clang/test/CodeGenCXX/dllimport-runtime-fns.cpp
@@ -1,13 +1,13 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -fms-compatibility-version=19.20 -triple x86_64-windows-msvc -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s --check-prefix=MSVC
-// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -fms-compatibility-version=19.20 -triple aarch64-windows-msvc -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s --check-prefix=MSVC
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-itanium -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s --check-prefix=ITANIUM
-// RUN: %clang_cc1 -no-opaque-pointers -triple aarch64-windows-gnu -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s --check-prefix=GNU
+// RUN: %clang_cc1 -fms-extensions -fms-compatibility-version=19.20 -triple x86_64-windows-msvc -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s --check-prefix=MSVC
+// RUN: %clang_cc1 -fms-extensions -fms-compatibility-version=19.20 -triple aarch64-windows-msvc -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s --check-prefix=MSVC
+// RUN: %clang_cc1 -triple x86_64-windows-itanium -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s --check-prefix=ITANIUM
+// RUN: %clang_cc1 -triple aarch64-windows-gnu -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck %s --check-prefix=GNU
 
 void foo1() { throw 1; }
 // _CxxThrowException should not be marked dllimport.
 // MSVC-LABEL: define dso_local void @"?foo1@@YAXXZ"
 // MSVC: call void @_CxxThrowException
-// MSVC: declare dso_local void @_CxxThrowException(i8*, %eh.ThrowInfo*)
+// MSVC: declare dso_local void @_CxxThrowException(ptr, ptr)
 
 // __cxa_throw should be marked dllimport for *-windows-itanium.
 // ITANIUM-LABEL: define dso_local void @_Z4foo1v()
@@ -28,17 +28,17 @@ void foo2() noexcept(true) { bar(); }
 // MSVC: declare dso_local void @__std_terminate()
 
 // _ZSt9terminatev and __cxa_begin_catch should be marked dllimport.
-// ITANIUM-LABEL: define linkonce_odr hidden void @__clang_call_terminate(i8* %0)
-// ITANIUM: call i8* @__cxa_begin_catch({{.*}})
+// ITANIUM-LABEL: define linkonce_odr hidden void @__clang_call_terminate(ptr %0)
+// ITANIUM: call ptr @__cxa_begin_catch({{.*}})
 // ITANIUM: call void @_ZSt9terminatev()
-// ITANIUM: declare dllimport i8* @__cxa_begin_catch(i8*)
+// ITANIUM: declare dllimport ptr @__cxa_begin_catch(ptr)
 // ITANIUM: declare dllimport void @_ZSt9terminatev()
 
 // .. not for mingw.
-// GNU-LABEL: define linkonce_odr hidden void @__clang_call_terminate(i8* %0)
-// GNU: call i8* @__cxa_begin_catch({{.*}})
+// GNU-LABEL: define linkonce_odr hidden void @__clang_call_terminate(ptr %0)
+// GNU: call ptr @__cxa_begin_catch({{.*}})
 // GNU: call void @_ZSt9terminatev()
-// GNU: declare dso_local i8* @__cxa_begin_catch(i8*)
+// GNU: declare dso_local ptr @__cxa_begin_catch(ptr)
 // GNU: declare dso_local void @_ZSt9terminatev()
 
 
@@ -48,16 +48,16 @@ struct C : A, virtual B {};
 struct T {};
 T *foo3() { return dynamic_cast<T *>((C *)0); }
 // __RTDynamicCast should not be marked dllimport.
-// MSVC-LABEL: define dso_local noundef %struct.T* @"?foo3@@YAPEAUT@@XZ"
-// MSVC: call i8* @__RTDynamicCast({{.*}})
-// MSVC: declare dso_local i8* @__RTDynamicCast(i8*, i32, i8*, i8*, i32)
+// MSVC-LABEL: define dso_local noundef ptr @"?foo3@@YAPEAUT@@XZ"
+// MSVC: call ptr @__RTDynamicCast({{.*}})
+// MSVC: declare dso_local ptr @__RTDynamicCast(ptr, i32, ptr, ptr, i32)
 
 // Again, imported
-// ITANIUM-LABEL: define dso_local noundef %struct.T* @_Z4foo3v()
-// ITANIUM: call i8* @__dynamic_cast({{.*}})
-// ITANIUM: declare dllimport i8* @__dynamic_cast({{.*}})
+// ITANIUM-LABEL: define dso_local noundef ptr @_Z4foo3v()
+// ITANIUM: call ptr @__dynamic_cast({{.*}})
+// ITANIUM: declare dllimport ptr @__dynamic_cast({{.*}})
 
 // Not imported
-// GNU-LABEL: define dso_local noundef %struct.T* @_Z4foo3v()
-// GNU: call i8* @__dynamic_cast({{.*}})
-// GNU: declare dso_local i8* @__dynamic_cast({{.*}})
+// GNU-LABEL: define dso_local noundef ptr @_Z4foo3v()
+// GNU: call ptr @__dynamic_cast({{.*}})
+// GNU: declare dso_local ptr @__dynamic_cast({{.*}})

diff  --git a/clang/test/CodeGenCXX/dllimport.cpp b/clang/test/CodeGenCXX/dllimport.cpp
index 1827c00de3c06..ef4577d4799d7 100644
--- a/clang/test/CodeGenCXX/dllimport.cpp
+++ b/clang/test/CodeGenCXX/dllimport.cpp
@@ -1,14 +1,14 @@
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-msvc   -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -DMSABI -w | FileCheck --check-prefix=MSC --check-prefix=M32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-msvc -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -DMSABI -w | FileCheck --check-prefix=MSC --check-prefix=M64 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-gnu    -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s         -w | FileCheck --check-prefix=GNU --check-prefix=G32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-gnu  -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s         -w | FileCheck --check-prefix=GNU %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-msvc   -fno-rtti -fno-threadsafe-statics -fms-extensions -fms-compatibility-version=18.00 -emit-llvm -std=c++1y -O1 -disable-llvm-passes -o - %s -DMSABI -w | FileCheck --check-prefix=MO1 --check-prefix=M18 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-msvc   -fno-rtti -fno-threadsafe-statics -fms-extensions -fms-compatibility-version=19.00 -emit-llvm -std=c++1y -O1 -disable-llvm-passes -o - %s -DMSABI -w | FileCheck --check-prefix=MO1 --check-prefix=M19 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-gnu    -fno-rtti -fno-threadsafe-statics -fms-extensions                                  -emit-llvm -std=c++1y -O1 -disable-llvm-passes -o - %s         -w | FileCheck --check-prefix=GO1 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc   -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -DMSABI -w | FileCheck --check-prefix=MSC --check-prefix=M32 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-msvc -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -DMSABI -w | FileCheck --check-prefix=MSC --check-prefix=M64 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu    -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s         -w | FileCheck --check-prefix=GNU --check-prefix=G32 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-gnu  -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s         -w | FileCheck --check-prefix=GNU %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc   -fno-rtti -fno-threadsafe-statics -fms-extensions -fms-compatibility-version=18.00 -emit-llvm -std=c++1y -O1 -disable-llvm-passes -o - %s -DMSABI -w | FileCheck --check-prefix=MO1 --check-prefix=M18 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc   -fno-rtti -fno-threadsafe-statics -fms-extensions -fms-compatibility-version=19.00 -emit-llvm -std=c++1y -O1 -disable-llvm-passes -o - %s -DMSABI -w | FileCheck --check-prefix=MO1 --check-prefix=M19 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu    -fno-rtti -fno-threadsafe-statics -fms-extensions                                  -emit-llvm -std=c++1y -O1 -disable-llvm-passes -o - %s         -w | FileCheck --check-prefix=GO1 %s
 
 // CHECK-NOT doesn't play nice with CHECK-DAG, so use separate run lines.
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-msvc   -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -DMSABI -w | FileCheck --check-prefix=MSC2 %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i686-windows-gnu    -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s         -w | FileCheck --check-prefix=GNU2 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-msvc   -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s -DMSABI -w | FileCheck --check-prefix=MSC2 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i686-windows-gnu    -fno-rtti -fno-threadsafe-statics -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s         -w | FileCheck --check-prefix=GNU2 %s
 
 // Helper structs to make templates more expressive.
 struct ImplicitInst_Imported {};
@@ -62,9 +62,9 @@ __declspec(dllimport) int GlobalRedecl2a;
 __declspec(dllimport) int GlobalRedecl2a;
 USEVAR(GlobalRedecl2a)
 
-// M32-DAG: @"?GlobalRedecl2b@@3PAHA"   = external dllimport global i32*
-// M64-DAG: @"?GlobalRedecl2b@@3PEAHEA" = external dllimport global i32*
-// GNU-DAG: @GlobalRedecl2b                = external dllimport global i32*
+// M32-DAG: @"?GlobalRedecl2b@@3PAHA"   = external dllimport global ptr
+// M64-DAG: @"?GlobalRedecl2b@@3PEAHEA" = external dllimport global ptr
+// GNU-DAG: @GlobalRedecl2b                = external dllimport global ptr
 int *__attribute__((dllimport)) GlobalRedecl2b;
 int *__attribute__((dllimport)) GlobalRedecl2b;
 USEVARTYPE(int*, GlobalRedecl2b)
@@ -98,8 +98,8 @@ inline int __declspec(dllimport) inlineStaticLocalsFunc() {
 USE(inlineStaticLocalsFunc);
 
 // The address of a dllimport global cannot be used in constant initialization.
-// M32-DAG: @"?arr@?1??initializationFunc@@YAPAHXZ at 4QBQAHB" = internal global [1 x i32*] zeroinitializer
-// GNU-DAG: @_ZZ18initializationFuncvE3arr = internal global [1 x i32*] zeroinitializer
+// M32-DAG: @"?arr@?1??initializationFunc@@YAPAHXZ at 4QBQAHB" = internal global [1 x ptr] zeroinitializer
+// GNU-DAG: @_ZZ18initializationFuncvE3arr = internal global [1 x ptr] zeroinitializer
 int *initializationFunc() {
   static int *const arr[] = {&ExternGlobalDecl};
   return arr[0];
@@ -203,7 +203,7 @@ USEVAR(VarTmpl<ExplicitSpec_Imported>)
 // Functions
 //===----------------------------------------------------------------------===//
 
-// GNU-DAG: declare dso_local void @_ZdlPv(i8*)
+// GNU-DAG: declare dso_local void @_ZdlPv(ptr)
 
 // Import function declaration.
 // MSC-DAG: declare dllimport void @"?decl@@YAXXZ"()
@@ -308,8 +308,8 @@ USE(friend4)
 USE(friend5)
 
 // Implicit declarations can be redeclared with dllimport.
-// MSC-DAG: declare dllimport nonnull i8* @"??2@{{YAPAXI|YAPEAX_K}}@Z"(
-// GNU-DAG: declare dllimport nonnull i8* @_Znw{{[yj]}}(
+// MSC-DAG: declare dllimport nonnull ptr @"??2@{{YAPAXI|YAPEAX_K}}@Z"(
+// GNU-DAG: declare dllimport nonnull ptr @_Znw{{[yj]}}(
 __declspec(dllimport) void* operator new(__SIZE_TYPE__ n);
 void UNIQ(use)() { ::operator new(42); }
 
@@ -346,17 +346,17 @@ USE1(ReferencingNonImportedMethod)
 void UNIQ(use)() { ReferencingClassMemberPtr(&ClassWithNonImportedMethod::f, nullptr); }
 // References to operator new and delete count too, despite not being DeclRefExprs.
 __declspec(dllimport) inline int *ReferencingNonImportedNew() { return new int[2]; }
-// MO1-DAG: declare dllimport i32* @"?ReferencingNonImportedNew@@YAPAHXZ"
+// MO1-DAG: declare dllimport ptr @"?ReferencingNonImportedNew@@YAPAHXZ"
 __declspec(dllimport) inline int *ReferencingNonImportedDelete() { delete (int*)nullptr; }
-// MO1-DAG: declare dllimport i32* @"?ReferencingNonImportedDelete@@YAPAHXZ"
+// MO1-DAG: declare dllimport ptr @"?ReferencingNonImportedDelete@@YAPAHXZ"
 USE(ReferencingNonImportedNew)
 USE(ReferencingNonImportedDelete)
 __declspec(dllimport) void* operator new[](__SIZE_TYPE__);
 __declspec(dllimport) void operator delete(void*);
 __declspec(dllimport) inline int *ReferencingImportedNew() { return new int[2]; }
-// MO1-DAG: define available_externally dllimport i32* @"?ReferencingImportedNew@@YAPAHXZ"
+// MO1-DAG: define available_externally dllimport ptr @"?ReferencingImportedNew@@YAPAHXZ"
 __declspec(dllimport) inline int *ReferencingImportedDelete() { delete (int*)nullptr; }
-// MO1-DAG: define available_externally dllimport i32* @"?ReferencingImportedDelete@@YAPAHXZ"
+// MO1-DAG: define available_externally dllimport ptr @"?ReferencingImportedDelete@@YAPAHXZ"
 USE(ReferencingImportedNew)
 USE(ReferencingImportedDelete)
 struct ClassWithDtor { ~ClassWithDtor() {} };
@@ -364,12 +364,12 @@ struct __declspec(dllimport) ClassWithNonDllImportField { using X = ClassWithDto
 struct __declspec(dllimport) ClassWithNonDllImportBase : public ClassWithDtor { };
 USECLASS(ClassWithNonDllImportField);
 USECLASS(ClassWithNonDllImportBase);
-// MO1-DAG: declare dllimport x86_thiscallcc void @"??1ClassWithNonDllImportBase@@QAE at XZ"(%struct.ClassWithNonDllImportBase* {{[^,]*}})
-// MO1-DAG: declare dllimport x86_thiscallcc void @"??1ClassWithNonDllImportField@@QAE at XZ"(%struct.ClassWithNonDllImportField* {{[^,]*}})
+// MO1-DAG: declare dllimport x86_thiscallcc void @"??1ClassWithNonDllImportBase@@QAE at XZ"(ptr {{[^,]*}})
+// MO1-DAG: declare dllimport x86_thiscallcc void @"??1ClassWithNonDllImportField@@QAE at XZ"(ptr {{[^,]*}})
 struct ClassWithCtor { ClassWithCtor() {} };
 struct __declspec(dllimport) ClassWithNonDllImportFieldWithCtor { ClassWithCtor t; };
 USECLASS(ClassWithNonDllImportFieldWithCtor);
-// MO1-DAG: declare dllimport x86_thiscallcc %struct.ClassWithNonDllImportFieldWithCtor* @"??0ClassWithNonDllImportFieldWithCtor@@QAE at XZ"(%struct.ClassWithNonDllImportFieldWithCtor* {{[^,]*}} returned {{[^,]*}})
+// MO1-DAG: declare dllimport x86_thiscallcc ptr @"??0ClassWithNonDllImportFieldWithCtor@@QAE at XZ"(ptr {{[^,]*}} returned {{[^,]*}})
 struct ClassWithImplicitDtor { __declspec(dllimport) ClassWithImplicitDtor(); ClassWithDtor member; };
 __declspec(dllimport) inline void ReferencingDtorThroughDefinition() { ClassWithImplicitDtor x; };
 USE(ReferencingDtorThroughDefinition)
@@ -645,12 +645,12 @@ struct __declspec(dllimport) T {
   // MO1-DAG: @"?b at T@@2HA" = external dllimport global i32
 
   T& operator=(T&) = default;
-  // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.T* @"??4T@@QAEAAU0 at AAU0@@Z"
+  // MO1-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4T@@QAEAAU0 at AAU0@@Z"
 
   T& operator=(T&&) = default;
   // Note: Don't mark inline move operators dllimport because current MSVC versions don't export them.
-  // M18-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.T* @"??4T@@QAEAAU0@$$QAU0@@Z"
-  // M19-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.T* @"??4T@@QAEAAU0@$$QAU0@@Z"
+  // M18-DAG: define linkonce_odr dso_local x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4T@@QAEAAU0@$$QAU0@@Z"
+  // M19-DAG: define available_externally dllimport x86_thiscallcc nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"??4T@@QAEAAU0@$$QAU0@@Z"
 };
 USEMEMFUNC(T, a)
 USESTATICMEMFUNC(T, StaticMethod)
@@ -666,15 +666,15 @@ USEMEMFUNC(V, foo)
 struct __declspec(dllimport) W { virtual void foo() {} };
 USECLASS(W)
 // vftable:
-// MO1-DAG: @"??_SW@@6B@" = linkonce_odr unnamed_addr constant { [1 x i8*] } { [1 x i8*] [i8* bitcast (void (%struct.W*)* @"?foo at W@@UAEXXZ" to i8*)] }
-// GO1-DAG: @_ZTV1W = available_externally dllimport unnamed_addr constant { [3 x i8*] } { [3 x i8*] [i8* null, i8* null, i8* bitcast (void (%struct.W*)* @_ZN1W3fooEv to i8*)] }
+// MO1-DAG: @"??_SW@@6B@" = linkonce_odr unnamed_addr constant { [1 x ptr] } { [1 x ptr] [ptr @"?foo at W@@UAEXXZ"] }
+// GO1-DAG: @_ZTV1W = available_externally dllimport unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr null, ptr @_ZN1W3fooEv] }
 
 struct __declspec(dllimport) KeyFuncClass {
   constexpr KeyFuncClass() {}
   virtual void foo();
 };
 extern constexpr KeyFuncClass keyFuncClassVar = {};
-// G32-DAG: @_ZTV12KeyFuncClass = external dllimport unnamed_addr constant { [3 x i8*] }
+// G32-DAG: @_ZTV12KeyFuncClass = external dllimport unnamed_addr constant { [3 x ptr] }
 
 struct __declspec(dllimport) X : public virtual W {};
 USECLASS(X)
@@ -780,7 +780,7 @@ namespace PR21355 {
   // S::~S is a key function, so we would ordinarily emit a strong definition for
   // the vtable. However, S is imported, so the vtable should be too.
 
-  // GNU-DAG: @_ZTVN7PR213551SE = available_externally dllimport unnamed_addr constant { [4 x i8*] }
+  // GNU-DAG: @_ZTVN7PR213551SE = available_externally dllimport unnamed_addr constant { [4 x ptr] }
 }
 
 namespace PR21366 {
@@ -802,7 +802,7 @@ namespace PR27319 {
   };
   extern template struct __declspec(dllimport) A<int>;
   void f() { new A<int>(); }
-  // MO1-DAG: @"??_S?$A at H@PR27319@@6B@" = linkonce_odr unnamed_addr constant { [1 x i8*] }
+  // MO1-DAG: @"??_S?$A at H@PR27319@@6B@" = linkonce_odr unnamed_addr constant { [1 x ptr] }
 }
 
 // MS ignores DLL attributes on partial specializations.
@@ -838,7 +838,7 @@ template struct __declspec(dllimport) ExplicitInstantiationDeclImportedDefTempla
 USECLASS(ExplicitInstantiationDeclImportedDefTemplate<int>);
 USEMEMFUNC(ExplicitInstantiationDeclImportedDefTemplate<int>, f);
 // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"?f@?$ExplicitInstantiationDeclImportedDefTemplate at H@@QAEXXZ"
-// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc %struct.ExplicitInstantiationDeclImportedDefTemplate* @"??0?$ExplicitInstantiationDeclImportedDefTemplate at H@@QAE at XZ"
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc ptr @"??0?$ExplicitInstantiationDeclImportedDefTemplate at H@@QAE at XZ"
 // G32-DAG: define weak_odr dso_local x86_thiscallcc void @_ZN44ExplicitInstantiationDeclImportedDefTemplateIiE1fEv
 
 template <typename T> struct __declspec(dllimport) ExplicitInstantiationDeclExportedDefImportedTemplate { void f() {} ExplicitInstantiationDeclExportedDefImportedTemplate() {} };
@@ -847,7 +847,7 @@ template struct __declspec(dllexport) ExplicitInstantiationDeclExportedDefImport
 USECLASS(ExplicitInstantiationDeclExportedDefImportedTemplate<int>);
 USEMEMFUNC(ExplicitInstantiationDeclExportedDefImportedTemplate<int>, f);
 // M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc void @"?f@?$ExplicitInstantiationDeclExportedDefImportedTemplate at H@@QAEXXZ"
-// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc %struct.ExplicitInstantiationDeclExportedDefImportedTemplate* @"??0?$ExplicitInstantiationDeclExportedDefImportedTemplate at H@@QAE at XZ"
+// M32-DAG: {{declare|define available_externally}} dllimport x86_thiscallcc ptr @"??0?$ExplicitInstantiationDeclExportedDefImportedTemplate at H@@QAE at XZ"
 
 template <typename T> struct PR23770BaseTemplate { void f() {} };
 template <typename T> struct PR23770DerivedTemplate : PR23770BaseTemplate<int> {};

diff  --git a/clang/test/CodeGenCXX/dso-handle-custom.cpp b/clang/test/CodeGenCXX/dso-handle-custom.cpp
index ca8311ec5cd2b..cca5eaf42a727 100644
--- a/clang/test/CodeGenCXX/dso-handle-custom.cpp
+++ b/clang/test/CodeGenCXX/dso-handle-custom.cpp
@@ -1,15 +1,15 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -emit-llvm -fexceptions %s -o - | FileCheck %s --check-prefixes CHECK,CHECK-DEFAULT
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -emit-llvm -fexceptions %s -o - -DHIDDEN | FileCheck %s --check-prefixes CHECK,CHECK-HIDDEN
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -fexceptions %s -o - | FileCheck %s --check-prefixes CHECK,CHECK-DEFAULT
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -fexceptions %s -o - -DHIDDEN | FileCheck %s --check-prefixes CHECK,CHECK-HIDDEN
 
 class A {
 public:
   ~A();
 } a;
 
-// CHECK-DEFAULT: @__dso_handle = global i8* bitcast (i8** @__dso_handle to i8*), align 8
-// CHECK-HIDDEN: @__dso_handle = hidden global i8* bitcast (i8** @__dso_handle to i8*), align 8
+// CHECK-DEFAULT: @__dso_handle = global ptr @__dso_handle, align 8
+// CHECK-HIDDEN: @__dso_handle = hidden global ptr @__dso_handle, align 8
 // CHECK: define internal void @__cxx_global_var_init()
-// CHECK:   call i32 @__cxa_atexit({{.*}}, {{.*}}, i8* bitcast (i8** @__dso_handle to i8*))
+// CHECK:   call i32 @__cxa_atexit({{.*}}, {{.*}}, ptr @__dso_handle)
 
 #ifdef HIDDEN
 void *__dso_handle __attribute__((__visibility__("hidden"))) = &__dso_handle;

diff  --git a/clang/test/CodeGenCXX/dynamic-cast-always-null.cpp b/clang/test/CodeGenCXX/dynamic-cast-always-null.cpp
index 845b996738f31..2723f3d28e524 100644
--- a/clang/test/CodeGenCXX/dynamic-cast-always-null.cpp
+++ b/clang/test/CodeGenCXX/dynamic-cast-always-null.cpp
@@ -1,20 +1,20 @@
-// RUN: %clang_cc1 -no-opaque-pointers -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s
+// RUN: %clang_cc1 -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -std=c++11 -o - | FileCheck %s
 struct A { virtual ~A(); };
 struct B final : A { };
 struct C { virtual ~C(); int c; };
 
 // CHECK: @_Z1fP1B
 C *f(B* b) {
-  // CHECK-NOT: call i8* @__dynamic_cast
-  // CHECK: ret %struct.C* null
+  // CHECK-NOT: call ptr @__dynamic_cast
+  // CHECK: ret ptr null
   return dynamic_cast<C*>(b);
 }
 
 // CHECK: @_Z1fR1B
 C &f(B& b) {
-  // CHECK-NOT: call i8* @__dynamic_cast
+  // CHECK-NOT: call ptr @__dynamic_cast
   // CHECK: call void @__cxa_bad_cast() [[NR:#[0-9]+]]
-  // CHECK: ret %struct.C* undef
+  // CHECK: ret ptr undef
   return dynamic_cast<C&>(b);
 }
 

diff  --git a/clang/test/CodeGenCXX/dynamic-cast-hint.cpp b/clang/test/CodeGenCXX/dynamic-cast-hint.cpp
index c3b6652373773..4ee50e14d2d34 100644
--- a/clang/test/CodeGenCXX/dynamic-cast-hint.cpp
+++ b/clang/test/CodeGenCXX/dynamic-cast-hint.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin12 -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin12 -emit-llvm -std=c++98 -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin12 -emit-llvm -std=c++11 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin12 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin12 -emit-llvm -std=c++98 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin12 -emit-llvm -std=c++11 -o - %s | FileCheck %s
 
 class A { protected: virtual ~A() {} };
 class B { protected: virtual ~B() {} };
@@ -24,32 +24,32 @@ class X : public XA, public XB, public XC { };
 
 void test(A *a, B *b) {
   volatile C *ac = dynamic_cast<C *>(a);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64 }* @_ZTI1C to i8*), i64 -2)
+// CHECK: ptr @_ZTI1A, ptr @_ZTI1C, i64 -2)
   volatile D *ad = dynamic_cast<D *>(a);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast ({ i8*, i8*, i8* }* @_ZTI1D to i8*), i64 0)
+// CHECK: ptr @_ZTI1A, ptr @_ZTI1D, i64 0)
   volatile E *ae = dynamic_cast<E *>(a);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI1E to i8*), i64 0)
+// CHECK: ptr @_ZTI1A, ptr @_ZTI1E, i64 0)
   volatile F *af = dynamic_cast<F *>(a);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64 }* @_ZTI1F to i8*), i64 -1)
+// CHECK: ptr @_ZTI1A, ptr @_ZTI1F, i64 -1)
   volatile G *ag = dynamic_cast<G *>(a);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64 }* @_ZTI1G to i8*), i64 -2)
+// CHECK: ptr @_ZTI1A, ptr @_ZTI1G, i64 -2)
   volatile H *ah = dynamic_cast<H *>(a);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast ({ i8*, i8*, i8* }* @_ZTI1H to i8*), i64 0)
+// CHECK: ptr @_ZTI1A, ptr @_ZTI1H, i64 0)
   volatile I *ai = dynamic_cast<I *>(a);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast ({ i8*, i8*, i8* }* @_ZTI1I to i8*), i64 -1)
+// CHECK: ptr @_ZTI1A, ptr @_ZTI1I, i64 -1)
   volatile J *aj = dynamic_cast<J *>(a);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast ({ i8*, i8*, i8* }* @_ZTI1J to i8*), i64 0)
+// CHECK: ptr @_ZTI1A, ptr @_ZTI1J, i64 0)
   volatile K *ak = dynamic_cast<K *>(a);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI1K to i8*), i64 -2)
+// CHECK: ptr @_ZTI1A, ptr @_ZTI1K, i64 -2)
   volatile X *ax = dynamic_cast<X *>(a);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 }* @_ZTI1X to i8*), i64 -1)
+// CHECK: ptr @_ZTI1A, ptr @_ZTI1X, i64 -1)
 
   volatile E *be = dynamic_cast<E *>(b);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1B to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI1E to i8*), i64 8)
+// CHECK: ptr @_ZTI1B, ptr @_ZTI1E, i64 8)
   volatile G *bg = dynamic_cast<G *>(b);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1B to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64 }* @_ZTI1G to i8*), i64 -2)
+// CHECK: ptr @_ZTI1B, ptr @_ZTI1G, i64 -2)
   volatile J *bj = dynamic_cast<J *>(b);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1B to i8*), i8* bitcast ({ i8*, i8*, i8* }* @_ZTI1J to i8*), i64 8)
+// CHECK: ptr @_ZTI1B, ptr @_ZTI1J, i64 8)
   volatile K *bk = dynamic_cast<K *>(b);
-// CHECK: i8* bitcast ({ i8*, i8* }* @_ZTI1B to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64 }* @_ZTI1K to i8*), i64 16)
+// CHECK: ptr @_ZTI1B, ptr @_ZTI1K, i64 16)
 }

diff  --git a/clang/test/CodeGenCXX/dynamic-cast.cpp b/clang/test/CodeGenCXX/dynamic-cast.cpp
index 5ae6f66081b59..86e0f62bc9f98 100644
--- a/clang/test/CodeGenCXX/dynamic-cast.cpp
+++ b/clang/test/CodeGenCXX/dynamic-cast.cpp
@@ -1,24 +1,24 @@
-// RUN: %clang_cc1 -no-opaque-pointers -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s
+// RUN: %clang_cc1 -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s
 struct A { virtual void f(); };
 struct B : A { };
 
 // CHECK: {{define.*@_Z1fP1A}}
-// CHECK-SAME:  personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+// CHECK-SAME:  personality ptr @__gxx_personality_v0
 B fail;
 const B& f(A *a) {
   try {
-    // CHECK: call i8* @__dynamic_cast
+    // CHECK: call ptr @__dynamic_cast
     // CHECK: br i1
     // CHECK: invoke void @__cxa_bad_cast() [[NR:#[0-9]+]]
     dynamic_cast<const B&>(*a);
   } catch (...) {
-    // CHECK:      landingpad { i8*, i32 }
-    // CHECK-NEXT:   catch i8* null
+    // CHECK:      landingpad { ptr, i32 }
+    // CHECK-NEXT:   catch ptr null
   }
   return fail;
 }
 
-// CHECK: declare i8* @__dynamic_cast(i8*, i8*, i8*, i64) [[NUW_RO:#[0-9]+]]
+// CHECK: declare ptr @__dynamic_cast(ptr, ptr, ptr, i64) [[NUW_RO:#[0-9]+]]
 
 // CHECK: attributes [[NUW_RO]] = { nounwind readonly }
 // CHECK: attributes [[NR]] = { noreturn }

diff  --git a/clang/test/CodeGenCXX/dynamic_cast-no-rtti.cpp b/clang/test/CodeGenCXX/dynamic_cast-no-rtti.cpp
index 9ca11ee7e0dd0..48f32fc3e89ba 100644
--- a/clang/test/CodeGenCXX/dynamic_cast-no-rtti.cpp
+++ b/clang/test/CodeGenCXX/dynamic_cast-no-rtti.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -verify -fno-rtti -triple %itanium_abi_triple -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -verify -fno-rtti -triple %itanium_abi_triple -o - | FileCheck %s
 // expected-no-diagnostics
 
 struct A {
@@ -13,14 +13,14 @@ struct B : public A {
 // does not use runtime support.
 A *upcast(B *b) {
   return dynamic_cast<A *>(b);
-// CHECK-LABEL: define {{.*}}%struct.A* @_Z6upcastP1B
-// CHECK-NOT: call {{.*}}i8* @__dynamic_cast
+// CHECK-LABEL: define {{.*}}ptr @_Z6upcastP1B
+// CHECK-NOT: call {{.*}}ptr @__dynamic_cast
 }
 
 // A NoOp dynamic_cast can be used with -fno-rtti iff it does not use
 // runtime support.
 B *samecast(B *b) {
   return dynamic_cast<B *>(b);
-// CHECK-LABEL: define {{.*}}%struct.B* @_Z8samecastP1B
-// CHECK-NOT: call {{.*}}i8* @__dynamic_cast
+// CHECK-LABEL: define {{.*}}ptr @_Z8samecastP1B
+// CHECK-NOT: call {{.*}}ptr @__dynamic_cast
 }

diff  --git a/clang/test/CodeGenCXX/eh-aggregated-inits-unwind.cpp b/clang/test/CodeGenCXX/eh-aggregated-inits-unwind.cpp
index 55186628266ba..64142f76a2019 100644
--- a/clang/test/CodeGenCXX/eh-aggregated-inits-unwind.cpp
+++ b/clang/test/CodeGenCXX/eh-aggregated-inits-unwind.cpp
@@ -4,7 +4,7 @@
 // Check that destructor's argument (address of member to be destroyed) is
 // obtained by taking offset from struct, not by bitcasting pointers.
 //
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -O0 -fno-elide-constructors -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -fexceptions -fcxx-exceptions -O0 -fno-elide-constructors -emit-llvm %s -o - | FileCheck %s
 
 struct ImplicitCopy {
   int id;
@@ -35,8 +35,7 @@ int main() {
   try {
     Container c1;
     // CHECK-LABEL: main
-    // CHECK: %{{.+}} = getelementptr inbounds %struct.Container, %struct.Container* %{{.+}}, i32 0, i32 1
-    // CHECK-NOT: %{{.+}} = bitcast %struct.Container* %{{.+}} to %struct.ImplicitCopy*
+    // CHECK: %{{.+}} = getelementptr inbounds %struct.Container, ptr %{{.+}}, i32 0, i32 1
     Container c2(c1);
 
     return 2;

diff  --git a/clang/test/CodeGenCXX/empty-nontrivially-copyable.cpp b/clang/test/CodeGenCXX/empty-nontrivially-copyable.cpp
index 8ffc40548240d..c7d3a017414ef 100644
--- a/clang/test/CodeGenCXX/empty-nontrivially-copyable.cpp
+++ b/clang/test/CodeGenCXX/empty-nontrivially-copyable.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple armv7-apple-ios -x c++ -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-ios -x c++ -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple armv7-apple-ios -x c++ -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple arm64-apple-ios -x c++ -emit-llvm -o - %s | FileCheck %s
 
 // According to the Itanium ABI (3.1.1), types with non-trivial copy
 // constructors passed by value should be passed indirectly, with the caller
@@ -13,14 +13,14 @@ struct Empty {
 };
 
 bool foo(Empty e) {
-// CHECK: @_Z3foo5Empty(%struct.Empty* noundef %e)
-// CHECK: call {{.*}} @_ZN5Empty5checkEv(%struct.Empty* {{[^,]*}} %e)
+// CHECK: @_Z3foo5Empty(ptr noundef %e)
+// CHECK: call {{.*}} @_ZN5Empty5checkEv(ptr {{[^,]*}} %e)
   return e.check();
 }
 
 void caller(Empty &e) {
-// CHECK: @_Z6callerR5Empty(%struct.Empty* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %e)
-// CHECK: call {{.*}} @_ZN5EmptyC1ERKS_(%struct.Empty* {{[^,]*}} [[NEWTMP:%.*]], %struct.Empty*
-// CHECK: call {{.*}} @_Z3foo5Empty(%struct.Empty* noundef [[NEWTMP]])
+// CHECK: @_Z6callerR5Empty(ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %e)
+// CHECK: call {{.*}} @_ZN5EmptyC1ERKS_(ptr {{[^,]*}} [[NEWTMP:%.*]], ptr
+// CHECK: call {{.*}} @_Z3foo5Empty(ptr noundef [[NEWTMP]])
   foo(e);
 }

diff  --git a/clang/test/CodeGenCXX/exceptions-cxx-new.cpp b/clang/test/CodeGenCXX/exceptions-cxx-new.cpp
index 062d1c8a07fc5..acf0f27cb199d 100644
--- a/clang/test/CodeGenCXX/exceptions-cxx-new.cpp
+++ b/clang/test/CodeGenCXX/exceptions-cxx-new.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple i686-pc-win32 -fms-extensions -fexceptions -fcxx-exceptions -emit-llvm -o - -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 %s -triple i686-pc-win32 -fms-extensions -fexceptions -fcxx-exceptions -emit-llvm -o - -std=c++11 | FileCheck %s
 
 int f(int);
 
@@ -20,7 +20,7 @@ void test_catch() {
 // CHECK:   %[[CATCHSWITCHPAD:.*]] = catchswitch within none [label %[[CATCH_INT:.*]], label %[[CATCH_DOUBLE:.*]]] unwind to caller
 
 // CHECK: [[CATCH_INT]]
-// CHECK:   %[[CATCHPAD_INT:.*]] = catchpad within %[[CATCHSWITCHPAD]] [%rtti.TypeDescriptor2* @"??_R0H at 8", i32 0, i8* null]
+// CHECK:   %[[CATCHPAD_INT:.*]] = catchpad within %[[CATCHSWITCHPAD]] [ptr @"??_R0H at 8", i32 0, ptr null]
 // CHECK:   call noundef i32 @"?f@@YAHH at Z"(i32 noundef 2)
 // CHECK:   catchret from %[[CATCHPAD_INT]] to label %[[LEAVE_INT_CATCH:.*]]
 
@@ -31,7 +31,7 @@ void test_catch() {
 // CHECK:   ret void
 
 // CHECK: [[CATCH_DOUBLE]]
-// CHECK:   %[[CATCHPAD_DOUBLE:.*]] = catchpad within %[[CATCHSWITCHPAD]] [%rtti.TypeDescriptor2* @"??_R0N at 8", i32 0, i8* null]
+// CHECK:   %[[CATCHPAD_DOUBLE:.*]] = catchpad within %[[CATCHSWITCHPAD]] [ptr @"??_R0N at 8", i32 0, ptr null]
 // CHECK:   call noundef i32 @"?f@@YAHH at Z"(i32 noundef 3)
 // CHECK:   catchret from %[[CATCHPAD_DOUBLE]] to label %[[LEAVE_DOUBLE_CATCH:.*]]
 

diff  --git a/clang/test/CodeGenCXX/exceptions-seh-filter-uwtable.cpp b/clang/test/CodeGenCXX/exceptions-seh-filter-uwtable.cpp
index dbca8b03f96bd..bfbff0c53bf09 100644
--- a/clang/test/CodeGenCXX/exceptions-seh-filter-uwtable.cpp
+++ b/clang/test/CodeGenCXX/exceptions-seh-filter-uwtable.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers "-triple" "arm64-windows" "-funwind-tables=2" "-fms-compatibility" -emit-llvm -O1 -disable-llvm-passes %s -o - | FileCheck %s
+// RUN: %clang_cc1 "-triple" "arm64-windows" "-funwind-tables=2" "-fms-compatibility" -emit-llvm -O1 -disable-llvm-passes %s -o - | FileCheck %s
 // NOTE: we're passing "-O1 -disable-llvm-passes" to avoid adding optnone and noinline everywhere.
 
 # 0 "" 3
@@ -34,7 +34,7 @@ g aq(h j, g k, int, int) {
 }
 
 // Check for the uwtable attribute on the filter funclet.
-// CHECK: define internal noundef i32 @"?filt$0 at 0@at@@"(i8* noundef %exception_pointers, i8* noundef %frame_pointer) #[[MD:[0-9]+]]
+// CHECK: define internal noundef i32 @"?filt$0 at 0@at@@"(ptr noundef %exception_pointers, ptr noundef %frame_pointer) #[[MD:[0-9]+]]
 // CHECK: attributes #[[MD]] = { nounwind uwtable
 
 void at() {

diff  --git a/clang/test/CodeGenCXX/exceptions-seh.cpp b/clang/test/CodeGenCXX/exceptions-seh.cpp
index fadde76e1b1af..421b6a4b8e5cc 100644
--- a/clang/test/CodeGenCXX/exceptions-seh.cpp
+++ b/clang/test/CodeGenCXX/exceptions-seh.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fblocks -fms-extensions %s -triple=x86_64-windows-msvc -emit-llvm \
+// RUN: %clang_cc1 -std=c++11 -fblocks -fms-extensions %s -triple=x86_64-windows-msvc -emit-llvm \
 // RUN:         -o - -mconstructor-aliases -fcxx-exceptions -fexceptions | \
 // RUN:         FileCheck %s --check-prefix=CHECK --check-prefix=CXXEH
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fblocks -fms-extensions %s -triple=x86_64-windows-msvc -emit-llvm \
+// RUN: %clang_cc1 -std=c++11 -fblocks -fms-extensions %s -triple=x86_64-windows-msvc -emit-llvm \
 // RUN:         -o - -mconstructor-aliases -O1 -disable-llvm-passes | \
 // RUN:         FileCheck %s --check-prefix=CHECK --check-prefix=NOCXX
 
@@ -22,27 +22,27 @@ extern "C" void use_cxx() {
 // Make sure we use __CxxFrameHandler3 for C++ EH.
 
 // CXXEH-LABEL: define dso_local void @use_cxx()
-// CXXEH-SAME:  personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
-// CXXEH: call noundef %struct.HasCleanup* @"??0HasCleanup@@QEAA at XZ"(%struct.HasCleanup* {{[^,]*}} %{{.*}})
+// CXXEH-SAME:  personality ptr @__CxxFrameHandler3
+// CXXEH: call noundef ptr @"??0HasCleanup@@QEAA at XZ"(ptr {{[^,]*}} %{{.*}})
 // CXXEH: invoke void @might_throw()
 // CXXEH:       to label %[[cont:[^ ]*]] unwind label %[[lpad:[^ ]*]]
 //
 // CXXEH: [[cont]]
-// CXXEH: call void @"??1HasCleanup@@QEAA at XZ"(%struct.HasCleanup* {{[^,]*}} %{{.*}})
+// CXXEH: call void @"??1HasCleanup@@QEAA at XZ"(ptr {{[^,]*}} %{{.*}})
 // CXXEH: ret void
 //
 // CXXEH: [[lpad]]
 // CXXEH: cleanuppad
-// CXXEH: call void @"??1HasCleanup@@QEAA at XZ"(%struct.HasCleanup* {{[^,]*}} %{{.*}})
+// CXXEH: call void @"??1HasCleanup@@QEAA at XZ"(ptr {{[^,]*}} %{{.*}})
 // CXXEH: cleanupret
 
 // NOCXX-LABEL: define dso_local void @use_cxx()
 // NOCXX-NOT: invoke
-// NOCXX: call noundef %struct.HasCleanup* @"??0HasCleanup@@QEAA at XZ"(%struct.HasCleanup* {{[^,]*}} %{{.*}})
+// NOCXX: call noundef ptr @"??0HasCleanup@@QEAA at XZ"(ptr {{[^,]*}} %{{.*}})
 // NOCXX-NOT: invoke
 // NOCXX: call void @might_throw()
 // NOCXX-NOT: invoke
-// NOCXX: call void @"??1HasCleanup@@QEAA at XZ"(%struct.HasCleanup* {{[^,]*}} %{{.*}})
+// NOCXX: call void @"??1HasCleanup@@QEAA at XZ"(ptr {{[^,]*}} %{{.*}})
 // NOCXX-NOT: invoke
 // NOCXX: ret void
 
@@ -56,7 +56,7 @@ extern "C" void use_seh() {
 // Make sure we use __C_specific_handler for SEH.
 
 // CHECK-LABEL: define dso_local void @use_seh()
-// CHECK-SAME:  personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*)
+// CHECK-SAME:  personality ptr @__C_specific_handler
 // CHECK: invoke void @might_throw() #[[NOINLINE:[0-9]+]]
 // CHECK:       to label %[[cont:[^ ]*]] unwind label %[[lpad:[^ ]*]]
 //
@@ -88,14 +88,14 @@ extern "C" void nested_finally() {
 }
 
 // CHECK-LABEL: define dso_local void @nested_finally() #{{[0-9]+}}
-// CHECK-SAME:  personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*)
+// CHECK-SAME:  personality ptr @__C_specific_handler
 // CHECK: invoke void @might_throw()
-// CHECK: call void @"?fin$0 at 0@nested_finally@@"(i8 noundef 1, i8* {{.*}})
+// CHECK: call void @"?fin$0 at 0@nested_finally@@"(i8 noundef 1, ptr {{.*}})
 
 // CHECK-LABEL: define internal void @"?fin$0 at 0@nested_finally@@"
-// CHECK-SAME:  personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*)
+// CHECK-SAME:  personality ptr @__C_specific_handler
 // CHECK: invoke void @might_throw()
-// CHECK: call void @"?fin$1 at 0@nested_finally@@"(i8 noundef 1, i8* {{.*}})
+// CHECK: call void @"?fin$1 at 0@nested_finally@@"(i8 noundef 1, ptr {{.*}})
 
 void use_seh_in_lambda() {
   ([]() {
@@ -109,15 +109,15 @@ void use_seh_in_lambda() {
 }
 
 // CXXEH-LABEL: define dso_local void @"?use_seh_in_lambda@@YAXXZ"()
-// CXXEH-SAME:  personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+// CXXEH-SAME:  personality ptr @__CxxFrameHandler3
 // CXXEH: cleanuppad
 
 // NOCXX-LABEL: define dso_local void @"?use_seh_in_lambda@@YAXXZ"()
 // NOCXX-NOT: invoke
 // NOCXX: ret void
 
-// CHECK-LABEL: define internal void @"??R<lambda_0>@?0??use_seh_in_lambda@@YAXXZ at QEBA@XZ"(%class.anon* {{[^,]*}} %this)
-// CXXEH-SAME:  personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*)
+// CHECK-LABEL: define internal void @"??R<lambda_0>@?0??use_seh_in_lambda@@YAXXZ at QEBA@XZ"(ptr {{[^,]*}} %this)
+// CXXEH-SAME:  personality ptr @__C_specific_handler
 // CHECK: invoke void @might_throw() #[[NOINLINE]]
 // CHECK: catchpad
 
@@ -140,28 +140,28 @@ void use_inline() {
 }
 
 // CHECK-LABEL: define linkonce_odr dso_local void @use_seh_in_inline_func() #{{[0-9]+}}
-// CHECK-SAME:  personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*)
+// CHECK-SAME:  personality ptr @__C_specific_handler
 // CHECK: invoke void @might_throw()
 //
-// CHECK: catchpad {{.*}} [i8* bitcast (i32 (i8*, i8*)* @"?filt$0 at 0@use_seh_in_inline_func@@" to i8*)]
+// CHECK: catchpad {{.*}} [ptr @"?filt$0 at 0@use_seh_in_inline_func@@"]
 //
 // CHECK: invoke void @might_throw()
 //
-// CHECK: %[[fp:[^ ]*]] = call i8* @llvm.localaddress()
-// CHECK: call void @"?fin$0 at 0@use_seh_in_inline_func@@"(i8 noundef 0, i8* noundef %[[fp]])
+// CHECK: %[[fp:[^ ]*]] = call ptr @llvm.localaddress()
+// CHECK: call void @"?fin$0 at 0@use_seh_in_inline_func@@"(i8 noundef 0, ptr noundef %[[fp]])
 // CHECK: ret void
 //
 // CHECK: cleanuppad
-// CHECK: %[[fp:[^ ]*]] = call i8* @llvm.localaddress()
-// CHECK: call void @"?fin$0 at 0@use_seh_in_inline_func@@"(i8 noundef 1, i8* noundef %[[fp]])
+// CHECK: %[[fp:[^ ]*]] = call ptr @llvm.localaddress()
+// CHECK: call void @"?fin$0 at 0@use_seh_in_inline_func@@"(i8 noundef 1, ptr noundef %[[fp]])
 
-// CHECK-LABEL: define internal noundef i32 @"?filt$0 at 0@use_seh_in_inline_func@@"(i8* noundef %exception_pointers, i8* noundef %frame_pointer) #{{[0-9]+}}
+// CHECK-LABEL: define internal noundef i32 @"?filt$0 at 0@use_seh_in_inline_func@@"(ptr noundef %exception_pointers, ptr noundef %frame_pointer) #{{[0-9]+}}
 // CHECK: icmp eq i32 %{{.*}}, 424242
 // CHECK: zext i1 %{{.*}} to i32
 // CHECK: ret i32
 
-// CHECK-LABEL: define internal void @"?fin$0 at 0@use_seh_in_inline_func@@"(i8 noundef %abnormal_termination, i8* noundef %frame_pointer) #{{[0-9]+}}
-// CHECK: store i32 1234, i32* @my_unique_global
+// CHECK-LABEL: define internal void @"?fin$0 at 0@use_seh_in_inline_func@@"(i8 noundef %abnormal_termination, ptr noundef %frame_pointer) #{{[0-9]+}}
+// CHECK: store i32 1234, ptr @my_unique_global
 
 // CHECK: attributes #[[NOINLINE]] = { {{.*noinline.*}} }
 

diff  --git a/clang/test/CodeGenCXX/ext-int-vector-abi.cpp b/clang/test/CodeGenCXX/ext-int-vector-abi.cpp
index ddda6119f6cec..f9d864d6217cd 100644
--- a/clang/test/CodeGenCXX/ext-int-vector-abi.cpp
+++ b/clang/test/CodeGenCXX/ext-int-vector-abi.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-gnu-linux -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=LIN64
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i386-gnu-linux -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=LIN32
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-gnu-linux -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=LIN64
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i386-gnu-linux -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=LIN32
 
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-windows-pc -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN64
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i386-windows-pc -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN32
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-windows-pc -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN64
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i386-windows-pc -O3 -disable-llvm-passes -I%S -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN32
 
 // Make sure BitInt vector match builtin Int vector abi.
 
@@ -61,7 +61,7 @@ uint32_t4s ManglingTestRetParam(uint32_t4s Param) {
 
 typedef unsigned _BitInt(64) uint64_t4 __attribute__((ext_vector_type(4)));
 uint64_t4 ManglingTestRetParam(uint64_t4 Param) {
-// LIN64: define{{.*}} <4 x i64> @_Z20ManglingTestRetParamDv4_DU64_(<4 x i64>* byval(<4 x i64>) align 32 %
+// LIN64: define{{.*}} <4 x i64> @_Z20ManglingTestRetParamDv4_DU64_(ptr byval(<4 x i64>) align 32 %
 // LIN32: define{{.*}} <4 x i64> @_Z20ManglingTestRetParamDv4_DU64_(<4 x i64> %
 // WIN64: define dso_local <4 x i64> @"?ManglingTestRetParam@@YAT?$__vector at U?$_UBitInt@$0EA@@__clang@@$03 at __clang@@T12@@Z"(<4 x i64> %
 // WIN32: define dso_local <4 x i64> @"?ManglingTestRetParam@@YAT?$__vector at U?$_UBitInt@$0EA@@__clang@@$03 at __clang@@T12@@Z"(<4 x i64> inreg %
@@ -70,7 +70,7 @@ uint64_t4 ManglingTestRetParam(uint64_t4 Param) {
 
 typedef unsigned long long uint64_t4s __attribute__((ext_vector_type(4)));
 uint64_t4s ManglingTestRetParam(uint64_t4s Param) {
-// LIN64: define{{.*}} <4 x i64> @_Z20ManglingTestRetParamDv4_y(<4 x i64>* byval(<4 x i64>) align 32 %
+// LIN64: define{{.*}} <4 x i64> @_Z20ManglingTestRetParamDv4_y(ptr byval(<4 x i64>) align 32 %
 // LIN32: define{{.*}} <4 x i64> @_Z20ManglingTestRetParamDv4_y(<4 x i64> %
 // WIN64: define dso_local <4 x i64> @"?ManglingTestRetParam@@YAT?$__vector at _K$03 at __clang@@T12@@Z"(<4 x i64> %
 // WIN32: define dso_local <4 x i64> @"?ManglingTestRetParam@@YAT?$__vector at _K$03 at __clang@@T12@@Z"(<4 x i64> inreg %
@@ -79,7 +79,7 @@ uint64_t4s ManglingTestRetParam(uint64_t4s Param) {
 
 typedef _BitInt(32) vint32_t8 __attribute__((vector_size(32)));
 vint32_t8 ManglingTestRetParam(vint32_t8 Param) {
-// LIN64: define{{.*}} <8 x i32> @_Z20ManglingTestRetParamDv8_DB32_(<8 x i32>* byval(<8 x i32>) align 32 %
+// LIN64: define{{.*}} <8 x i32> @_Z20ManglingTestRetParamDv8_DB32_(ptr byval(<8 x i32>) align 32 %
 // LIN32: define{{.*}} <8 x i32> @_Z20ManglingTestRetParamDv8_DB32_(<8 x i32> %
 // WIN64: define dso_local <8 x i32> @"?ManglingTestRetParam@@YA?AT?$__vector at U?$_BitInt@$0CA@@__clang@@$07 at __clang@@T12@@Z"(<8 x i32> %
 // WIN32: define dso_local <8 x i32> @"?ManglingTestRetParam@@YA?AT?$__vector at U?$_BitInt@$0CA@@__clang@@$07 at __clang@@T12@@Z"(<8 x i32> inreg %
@@ -88,7 +88,7 @@ vint32_t8 ManglingTestRetParam(vint32_t8 Param) {
 
 typedef int vint32_t8i __attribute__((vector_size(32)));
 vint32_t8i ManglingTestRetParam(vint32_t8i Param) {
-// LIN64: define{{.*}} <8 x i32> @_Z20ManglingTestRetParamDv8_i(<8 x i32>* byval(<8 x i32>) align 32 %
+// LIN64: define{{.*}} <8 x i32> @_Z20ManglingTestRetParamDv8_i(ptr byval(<8 x i32>) align 32 %
 // LIN32: define{{.*}} <8 x i32> @_Z20ManglingTestRetParamDv8_i(<8 x i32> %
 // WIN64: define dso_local <8 x i32> @"?ManglingTestRetParam@@YA?AT?$__vector at H$07 at __clang@@T12@@Z"(<8 x i32> %
 // WIN32: define dso_local <8 x i32> @"?ManglingTestRetParam@@YA?AT?$__vector at H$07 at __clang@@T12@@Z"(<8 x i32> inreg %

diff  --git a/clang/test/CodeGenCXX/fastcall.cpp b/clang/test/CodeGenCXX/fastcall.cpp
index 48abea1a0e718..4c94c1623ee16 100644
--- a/clang/test/CodeGenCXX/fastcall.cpp
+++ b/clang/test/CodeGenCXX/fastcall.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i386-unknown-unknown -emit-llvm -o - %s | FileCheck %s
 
 void __attribute__((fastcall)) foo1(int &y);
 void bar1(int &y) {
   // CHECK-LABEL: define{{.*}} void @_Z4bar1Ri
-  // CHECK: call x86_fastcallcc void @_Z4foo1Ri(i32* inreg nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %
+  // CHECK: call x86_fastcallcc void @_Z4foo1Ri(ptr inreg nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %
   foo1(y);
 }
 
@@ -15,6 +15,6 @@ struct S1 {
 void __attribute__((fastcall)) foo2(S1 a, int b);
 void bar2(S1 a, int b) {
   // CHECK-LABEL: define{{.*}} void @_Z4bar22S1i
-  // CHECK: call x86_fastcallcc void @_Z4foo22S1i(%struct.S1* inreg %{{.*}}, i32 inreg %
+  // CHECK: call x86_fastcallcc void @_Z4foo22S1i(ptr inreg %{{.*}}, i32 inreg %
   foo2(a, b);
 }

diff  --git a/clang/test/CodeGenCXX/float128-declarations.cpp b/clang/test/CodeGenCXX/float128-declarations.cpp
index 4e3b1619fd408..ddfe9dce109c8 100644
--- a/clang/test/CodeGenCXX/float128-declarations.cpp
+++ b/clang/test/CodeGenCXX/float128-declarations.cpp
@@ -1,22 +1,22 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple powerpc64-unknown-unknown \
+// RUN: %clang_cc1 -emit-llvm -triple powerpc64-unknown-unknown \
 // RUN:   -target-feature +float128 -std=c++11 %s -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple powerpc64le-unknown-unknown \
+// RUN: %clang_cc1 -emit-llvm -triple powerpc64le-unknown-unknown \
 // RUN:   -target-feature +float128 -std=c++11 %s -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple i386-unknown-linux-gnu -std=c++11 \
+// RUN: %clang_cc1 -emit-llvm -triple i386-unknown-linux-gnu -std=c++11 \
 // RUN:   %s -o - | FileCheck %s -check-prefix=CHECK-X86
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-unknown-linux-gnu -std=c++11 \
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown-linux-gnu -std=c++11 \
 // RUN:   %s -o - | FileCheck %s -check-prefix=CHECK-X86
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple i686-pc-openbsd -std=c++11 \
+// RUN: %clang_cc1 -emit-llvm -triple i686-pc-openbsd -std=c++11 \
 // RUN:   %s -o - | FileCheck %s -check-prefix=CHECK-X86
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple amd64-pc-openbsd -std=c++11 \
+// RUN: %clang_cc1 -emit-llvm -triple amd64-pc-openbsd -std=c++11 \
 // RUN:   %s -o - | FileCheck %s -check-prefix=CHECK-X86
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple i386-pc-solaris2.11 -std=c++11 \
+// RUN: %clang_cc1 -emit-llvm -triple i386-pc-solaris2.11 -std=c++11 \
 // RUN:   %s -o - | FileCheck %s -check-prefix=CHECK-X86
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-pc-solaris2.11 -std=c++11 \
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-pc-solaris2.11 -std=c++11 \
 // RUN:   %s -o - | FileCheck %s -check-prefix=CHECK-X86
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple i586-pc-haiku -std=c++11 \
+// RUN: %clang_cc1 -emit-llvm -triple i586-pc-haiku -std=c++11 \
 // RUN:   %s -o - | FileCheck %s -check-prefix=CHECK-X86
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-unknown-haiku -std=c++11 \
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown-haiku -std=c++11 \
 // RUN:   %s -o - | FileCheck %s -check-prefix=CHECK-X86
 //
 /*  Various contexts where type __float128 can appear. The 
diff erent check
@@ -84,42 +84,42 @@ int main(void) {
 // CHECK-DAG: @_ZN12_GLOBAL__N_13f2nE = internal global fp128 0xL00000000000000004004080000000000
 // CHECK-DAG: @_ZN12_GLOBAL__N_15arr1nE = internal global [10 x fp128]
 // CHECK-DAG: @_ZN12_GLOBAL__N_15arr2nE = internal global [3 x fp128] [fp128 0xL33333333333333333FFF333333333333, fp128 0xL00000000000000004000800000000000, fp128 0xL00000000000000004025176592E00000]
-// CHECK-DAG: define internal noundef fp128 @_ZN12_GLOBAL__N_16func1nERKu9__ieee128(fp128*
+// CHECK-DAG: define internal noundef fp128 @_ZN12_GLOBAL__N_16func1nERKu9__ieee128(ptr
 // CHECK-DAG: @f1f ={{.*}} global fp128 0xL00000000000000000000000000000000
 // CHECK-DAG: @f2f ={{.*}} global fp128 0xL33333333333333334004033333333333
 // CHECK-DAG: @arr1f ={{.*}} global [10 x fp128]
 // CHECK-DAG: @arr2f ={{.*}} global [3 x fp128] [fp128 0xL3333333333333333BFFF333333333333, fp128 0xL0000000000000000C000800000000000, fp128 0xL0000000000000000C025176592E00000]
 // CHECK-DAG: declare noundef fp128 @_Z6func1fu9__ieee128(fp128 noundef)
-// CHECK-DAG: define linkonce_odr void @_ZN2C1C2Eu9__ieee128(%class.C1* {{[^,]*}} %this, fp128 noundef %arg)
+// CHECK-DAG: define linkonce_odr void @_ZN2C1C2Eu9__ieee128(ptr {{[^,]*}} %this, fp128 noundef %arg)
 // CHECK-DAG: define linkonce_odr noundef fp128 @_ZN2C16func2cEu9__ieee128(fp128 noundef %arg)
 // CHECK-DAG: define linkonce_odr noundef fp128 @_Z6func1tIu9__ieee128ET_S0_(fp128 noundef %arg)
 // CHECK-DAG: @__const.main.s1 = private unnamed_addr constant %struct.S1 { fp128 0xL00000000000000004006080000000000 }
-// CHECK-DAG: store fp128 0xLF0AFD0EBFF292DCE42E0B38CDD83F26F, fp128* %f1l, align 16
-// CHECK-DAG: store fp128 0xL00000000000000008000000000000000, fp128* %f2l, align 16
-// CHECK-DAG: store fp128 0xLFFFFFFFFFFFFFFFF7FFEFFFFFFFFFFFF, fp128* %f3l, align 16
-// CHECK-DAG: store fp128 0xL0000000000000000BFFF000000000000, fp128* %f5l, align 16
-// CHECK-DAG: [[F4L:%[a-z0-9]+]] = load fp128, fp128* %f4l
+// CHECK-DAG: store fp128 0xLF0AFD0EBFF292DCE42E0B38CDD83F26F, ptr %f1l, align 16
+// CHECK-DAG: store fp128 0xL00000000000000008000000000000000, ptr %f2l, align 16
+// CHECK-DAG: store fp128 0xLFFFFFFFFFFFFFFFF7FFEFFFFFFFFFFFF, ptr %f3l, align 16
+// CHECK-DAG: store fp128 0xL0000000000000000BFFF000000000000, ptr %f5l, align 16
+// CHECK-DAG: [[F4L:%[a-z0-9]+]] = load fp128, ptr %f4l
 // CHECK-DAG: [[INC:%[a-z0-9]+]] = fadd fp128 [[F4L]], 0xL00000000000000003FFF000000000000
-// CHECK-DAG: store fp128 [[INC]], fp128* %f4l
+// CHECK-DAG: store fp128 [[INC]], ptr %f4l
 
 // CHECK-X86-DAG: @_ZN12_GLOBAL__N_13f1nE = internal global fp128 0xL00000000000000000000000000000000
 // CHECK-X86-DAG: @_ZN12_GLOBAL__N_13f2nE = internal global fp128 0xL00000000000000004004080000000000
 // CHECK-X86-DAG: @_ZN12_GLOBAL__N_15arr1nE = internal global [10 x fp128]
 // CHECK-X86-DAG: @_ZN12_GLOBAL__N_15arr2nE = internal global [3 x fp128] [fp128 0xL33333333333333333FFF333333333333, fp128 0xL00000000000000004000800000000000, fp128 0xL00000000000000004025176592E00000]
-// CHECK-X86-DAG: define internal noundef fp128 @_ZN12_GLOBAL__N_16func1nERKg(fp128*
+// CHECK-X86-DAG: define internal noundef fp128 @_ZN12_GLOBAL__N_16func1nERKg(ptr
 // CHECK-X86-DAG: @f1f ={{.*}} global fp128 0xL00000000000000000000000000000000
 // CHECK-X86-DAG: @f2f ={{.*}} global fp128 0xL33333333333333334004033333333333
 // CHECK-X86-DAG: @arr1f ={{.*}} global [10 x fp128]
 // CHECK-X86-DAG: @arr2f ={{.*}} global [3 x fp128] [fp128 0xL3333333333333333BFFF333333333333, fp128 0xL0000000000000000C000800000000000, fp128 0xL0000000000000000C025176592E00000]
 // CHECK-X86-DAG: declare noundef fp128 @_Z6func1fg(fp128 noundef)
-// CHECK-X86-DAG: define linkonce_odr void @_ZN2C1C2Eg(%class.C1* {{[^,]*}} %this, fp128 noundef %arg)
+// CHECK-X86-DAG: define linkonce_odr void @_ZN2C1C2Eg(ptr {{[^,]*}} %this, fp128 noundef %arg)
 // CHECK-X86-DAG: define linkonce_odr noundef fp128 @_ZN2C16func2cEg(fp128 noundef %arg)
 // CHECK-X86-DAG: define linkonce_odr noundef fp128 @_Z6func1tIgET_S0_(fp128 noundef %arg)
 // CHECK-X86-DAG: @__const.main.s1 = private unnamed_addr constant %struct.S1 { fp128 0xL00000000000000004006080000000000 }
-// CHECK-X86-DAG: store fp128 0xLF0AFD0EBFF292DCE42E0B38CDD83F26F, fp128* %f1l, align 16
-// CHECK-X86-DAG: store fp128 0xL00000000000000008000000000000000, fp128* %f2l, align 16
-// CHECK-X86-DAG: store fp128 0xLFFFFFFFFFFFFFFFF7FFEFFFFFFFFFFFF, fp128* %f3l, align 16
-// CHECK-X86-DAG: store fp128 0xL0000000000000000BFFF000000000000, fp128* %f5l, align 16
-// CHECK-X86-DAG: [[F4L:%[a-z0-9]+]] = load fp128, fp128* %f4l
+// CHECK-X86-DAG: store fp128 0xLF0AFD0EBFF292DCE42E0B38CDD83F26F, ptr %f1l, align 16
+// CHECK-X86-DAG: store fp128 0xL00000000000000008000000000000000, ptr %f2l, align 16
+// CHECK-X86-DAG: store fp128 0xLFFFFFFFFFFFFFFFF7FFEFFFFFFFFFFFF, ptr %f3l, align 16
+// CHECK-X86-DAG: store fp128 0xL0000000000000000BFFF000000000000, ptr %f5l, align 16
+// CHECK-X86-DAG: [[F4L:%[a-z0-9]+]] = load fp128, ptr %f4l
 // CHECK-X86-DAG: [[INC:%[a-z0-9]+]] = fadd fp128 [[F4L]], 0xL00000000000000003FFF000000000000
-// CHECK-X86-DAG: store fp128 [[INC]], fp128* %f4l
+// CHECK-X86-DAG: store fp128 [[INC]], ptr %f4l

diff  --git a/clang/test/CodeGenCXX/for-loop-init-ternary-operator-statement.cpp b/clang/test/CodeGenCXX/for-loop-init-ternary-operator-statement.cpp
index a981c207c5536..d1399f4705228 100644
--- a/clang/test/CodeGenCXX/for-loop-init-ternary-operator-statement.cpp
+++ b/clang/test/CodeGenCXX/for-loop-init-ternary-operator-statement.cpp
@@ -1,36 +1,36 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm %s -o - | FileCheck %s
 
 // CHECK-LABEL: @_Z1fv(
 // CHECK-NEXT:  entry:
 // CHECK-NEXT:    [[RETVAL:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[I:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[X:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    store i32 0, i32* [[I]], align 4
+// CHECK-NEXT:    store i32 0, ptr [[I]], align 4
 // CHECK-NEXT:    br label [[FOR_COND:%.*]]
 // CHECK:       for.cond:
-// CHECK-NEXT:    [[TMP0:%.*]] = load i32, i32* [[I]], align 4
+// CHECK-NEXT:    [[TMP0:%.*]] = load i32, ptr [[I]], align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp slt i32 [[TMP0]], 2
 // CHECK-NEXT:    [[TMP1:%.*]] = zext i1 [[CMP]] to i64
 // CHECK-NEXT:    [[COND:%.*]] = select i1 [[CMP]], i32 1, i32 0
-// CHECK-NEXT:    store i32 [[COND]], i32* [[X]], align 4
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* [[X]], align 4
+// CHECK-NEXT:    store i32 [[COND]], ptr [[X]], align 4
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[X]], align 4
 // CHECK-NEXT:    [[TOBOOL:%.*]] = icmp ne i32 [[TMP2]], 0
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[FOR_BODY:%.*]], label [[FOR_END:%.*]]
 // CHECK:       for.body:
-// CHECK-NEXT:    [[TMP3:%.*]] = load i32, i32* [[X]], align 4
-// CHECK-NEXT:    store i32 [[TMP3]], i32* [[RETVAL]], align 4
+// CHECK-NEXT:    [[TMP3:%.*]] = load i32, ptr [[X]], align 4
+// CHECK-NEXT:    store i32 [[TMP3]], ptr [[RETVAL]], align 4
 // CHECK-NEXT:    br label [[RETURN:%.*]]
 // CHECK:       for.inc:
-// CHECK-NEXT:    [[TMP4:%.*]] = load i32, i32* [[I]], align 4
+// CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I]], align 4
 // CHECK-NEXT:    [[INC:%.*]] = add nsw i32 [[TMP4]], 1
-// CHECK-NEXT:    store i32 [[INC]], i32* [[I]], align 4
+// CHECK-NEXT:    store i32 [[INC]], ptr [[I]], align 4
 // CHECK-NEXT:    br label [[FOR_COND]], !llvm.loop [[LOOP2:![0-9]+]]
 // CHECK:       for.end:
-// CHECK-NEXT:    store i32 0, i32* [[RETVAL]], align 4
+// CHECK-NEXT:    store i32 0, ptr [[RETVAL]], align 4
 // CHECK-NEXT:    br label [[RETURN]]
 // CHECK:       return:
-// CHECK-NEXT:    [[TMP5:%.*]] = load i32, i32* [[RETVAL]], align 4
+// CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[RETVAL]], align 4
 // CHECK-NEXT:    ret i32 [[TMP5]]
 //
 int f() {

diff  --git a/clang/test/CodeGenCXX/fp16-mangle-arg-return.cpp b/clang/test/CodeGenCXX/fp16-mangle-arg-return.cpp
index 21f99ecd7b7e0..f248b9fe76c32 100644
--- a/clang/test/CodeGenCXX/fp16-mangle-arg-return.cpp
+++ b/clang/test/CodeGenCXX/fp16-mangle-arg-return.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple arm-arm-none-eabi %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple aarch64-arm-none-eabi %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple arm-arm-none-eabi %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple aarch64-arm-none-eabi %s | FileCheck %s
 
 // Test name-mangling of __fp16 passed directly as a function argument
 // (when that is permitted).
@@ -12,5 +12,5 @@ void fp16_argument(__fp16 arg) {}
 // this, we have to pass it a function pointer and make __fp16 the
 // return type of that.
 
-// CHECK: define {{.*}}void @_Z11fp16_returnPFDhvE(half ()* noundef %{{.*}})
+// CHECK: define {{.*}}void @_Z11fp16_returnPFDhvE(ptr noundef %{{.*}})
 void fp16_return(__fp16 (*func)(void)) {}

diff  --git a/clang/test/CodeGenCXX/fp16-mangle.cpp b/clang/test/CodeGenCXX/fp16-mangle.cpp
index 4ffece75a8882..44484fb81fded 100644
--- a/clang/test/CodeGenCXX/fp16-mangle.cpp
+++ b/clang/test/CodeGenCXX/fp16-mangle.cpp
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple arm-none-linux-gnueabi %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple arm-none-linux-gnueabi %s | FileCheck %s
 
 // CHECK: @_ZN1SIDhDhE1iE ={{.*}} global i32 3
 template <typename T, typename U> struct S { static int i; };
 template <> int S<__fp16, __fp16>::i = 3;
 
-// CHECK-LABEL: define{{.*}} void @_Z1fPDh(half* noundef %x)
+// CHECK-LABEL: define{{.*}} void @_Z1fPDh(ptr noundef %x)
 void f (__fp16 *x) { }
 
-// CHECK-LABEL: define{{.*}} void @_Z1gPDhS_(half* noundef %x, half* noundef %y)
+// CHECK-LABEL: define{{.*}} void @_Z1gPDhS_(ptr noundef %x, ptr noundef %y)
 void g (__fp16 *x, __fp16 *y) { }
 

diff  --git a/clang/test/CodeGenCXX/ibm128-declarations.cpp b/clang/test/CodeGenCXX/ibm128-declarations.cpp
index ec06ff1990d12..5ee4f354d3795 100644
--- a/clang/test/CodeGenCXX/ibm128-declarations.cpp
+++ b/clang/test/CodeGenCXX/ibm128-declarations.cpp
@@ -1,7 +1,7 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple powerpc64-unknown-unknown \
+// RUN: %clang_cc1 -emit-llvm -triple powerpc64-unknown-unknown \
 // RUN:   -std=c++20 %s -o - -debug-info-kind=limited | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple powerpc64le-unknown-unknown \
+// RUN: %clang_cc1 -emit-llvm -triple powerpc64le-unknown-unknown \
 // RUN:   -std=c++20 %s -o - -debug-info-kind=limited | FileCheck %s
 
 #include <stdarg.h>
@@ -81,44 +81,41 @@ int main(void) {
 
 // CHECK: define dso_local noundef ppc_fp128 @_Z10func_arithggg(ppc_fp128 noundef %a, ppc_fp128 noundef %b, ppc_fp128 noundef %c)
 // CHECK: entry:
-// CHECK:   store ppc_fp128 %a, ppc_fp128* %a.addr, align 16
-// CHECK:   store ppc_fp128 %b, ppc_fp128* %b.addr, align 16
-// CHECK:   store ppc_fp128 %c, ppc_fp128* %c.addr, align 16
-// CHECK:   %0 = load ppc_fp128, ppc_fp128* %a.addr, align 16
-// CHECK:   %1 = load ppc_fp128, ppc_fp128* %b.addr, align 16
+// CHECK:   store ppc_fp128 %a, ptr %a.addr, align 16
+// CHECK:   store ppc_fp128 %b, ptr %b.addr, align 16
+// CHECK:   store ppc_fp128 %c, ptr %c.addr, align 16
+// CHECK:   %0 = load ppc_fp128, ptr %a.addr, align 16
+// CHECK:   %1 = load ppc_fp128, ptr %b.addr, align 16
 // CHECK:   %add = fadd ppc_fp128 %0, %1
-// CHECK:   store ppc_fp128 %add, ppc_fp128* %v1, align 16
-// CHECK:   %2 = load ppc_fp128, ppc_fp128* %a.addr, align 16
-// CHECK:   %3 = load ppc_fp128, ppc_fp128* %c.addr, align 16
+// CHECK:   store ppc_fp128 %add, ptr %v1, align 16
+// CHECK:   %2 = load ppc_fp128, ptr %a.addr, align 16
+// CHECK:   %3 = load ppc_fp128, ptr %c.addr, align 16
 // CHECK:   %sub = fsub ppc_fp128 %2, %3
-// CHECK:   store ppc_fp128 %sub, ppc_fp128* %v2, align 16
-// CHECK:   %4 = load ppc_fp128, ppc_fp128* %v1, align 16
-// CHECK:   %5 = load ppc_fp128, ppc_fp128* %c.addr, align 16
+// CHECK:   store ppc_fp128 %sub, ptr %v2, align 16
+// CHECK:   %4 = load ppc_fp128, ptr %v1, align 16
+// CHECK:   %5 = load ppc_fp128, ptr %c.addr, align 16
 // CHECK:   %mul = fmul ppc_fp128 %4, %5
-// CHECK:   store ppc_fp128 %mul, ppc_fp128* %v3, align 16
-// CHECK:   %6 = load ppc_fp128, ppc_fp128* %v2, align 16
-// CHECK:   %7 = load ppc_fp128, ppc_fp128* %v3, align 16
+// CHECK:   store ppc_fp128 %mul, ptr %v3, align 16
+// CHECK:   %6 = load ppc_fp128, ptr %v2, align 16
+// CHECK:   %7 = load ppc_fp128, ptr %v3, align 16
 // CHECK:   %div = fdiv ppc_fp128 %6, %7
-// CHECK:   store ppc_fp128 %div, ppc_fp128* %v4, align 16
-// CHECK:   %8 = load ppc_fp128, ppc_fp128* %v4, align 16
+// CHECK:   store ppc_fp128 %div, ptr %v4, align 16
+// CHECK:   %8 = load ppc_fp128, ptr %v4, align 16
 // CHECK:   ret ppc_fp128 %8
 // CHECK: }
 
 // CHECK: define dso_local noundef ppc_fp128 @_Z10func_vaargiz(i32 noundef signext %n, ...)
 // CHECK: entry:
-// CHECK:   store i32 %n, i32* %n.addr, align 4
-// CHECK:   %ap1 = bitcast i8** %ap to i8*
-// CHECK:   call void @llvm.va_start(i8* %ap1)
-// CHECK:   %argp.cur = load i8*, i8** %ap, align 8
-// CHECK:   %argp.next = getelementptr inbounds i8, i8* %argp.cur, i64 16
-// CHECK:   store i8* %argp.next, i8** %ap, align 8
-// CHECK:   %0 = bitcast i8* %argp.cur to ppc_fp128*
-// CHECK:   %1 = load ppc_fp128, ppc_fp128* %0, align 8
-// CHECK:   store ppc_fp128 %1, ppc_fp128* %r, align 16
-// CHECK:   %ap2 = bitcast i8** %ap to i8*
-// CHECK:   call void @llvm.va_end(i8* %ap2)
-// CHECK:   %2 = load ppc_fp128, ppc_fp128* %r, align 16
-// CHECK:   ret ppc_fp128 %2
+// CHECK:   store i32 %n, ptr %n.addr, align 4
+// CHECK:   call void @llvm.va_start(ptr %ap)
+// CHECK:   %argp.cur = load ptr, ptr %ap, align 8
+// CHECK:   %argp.next = getelementptr inbounds i8, ptr %argp.cur, i64 16
+// CHECK:   store ptr %argp.next, ptr %ap, align 8
+// CHECK:   %0 = load ppc_fp128, ptr %argp.cur, align 8
+// CHECK:   store ppc_fp128 %0, ptr %r, align 16
+// CHECK:   call void @llvm.va_end(ptr %ap)
+// CHECK:   %1 = load ppc_fp128, ptr %r, align 16
+// CHECK:   ret ppc_fp128 %1
 // CHECK: }
 
 // CHECK: define dso_local noundef ppc_fp128 @_Z11icmode_selfg(ppc_fp128 noundef %x)
@@ -126,51 +123,51 @@ int main(void) {
 
 // CHECK: define dso_local noundef signext i32 @main()
 // CHECK: entry:
-// CHECK:   %0 = load ppc_fp128, ppc_fp128* %lf, align 16
-// CHECK:   call void @_ZN5CTestC1Eg(%class.CTest* noundef nonnull align 16 dereferenceable(32) %ct, ppc_fp128 noundef %0)
-// CHECK:   %mem2 = getelementptr inbounds %struct.T1, %struct.T1* %tf, i32 0, i32 0
-// CHECK:   %1 = load ppc_fp128, ppc_fp128* %mem2, align 16
-// CHECK:   %2 = load ppc_fp128, ppc_fp128* %lf, align 16
+// CHECK:   %0 = load ppc_fp128, ptr %lf, align 16
+// CHECK:   call void @_ZN5CTestC1Eg(ptr noundef nonnull align 16 dereferenceable(32) %ct, ppc_fp128 noundef %0)
+// CHECK:   %mem2 = getelementptr inbounds %struct.T1, ptr %tf, i32 0, i32 0
+// CHECK:   %1 = load ppc_fp128, ptr %mem2, align 16
+// CHECK:   %2 = load ppc_fp128, ptr %lf, align 16
 // CHECK:   %call = call noundef ppc_fp128 @_Z5func1g(ppc_fp128 noundef %2)
 // CHECK:   %add = fadd ppc_fp128 %1, %call
-// CHECK:   %3 = load ppc_fp128, ppc_fp128* %lf, align 16
+// CHECK:   %3 = load ppc_fp128, ptr %lf, align 16
 // CHECK:   %call1 = call noundef ppc_fp128 @_ZN5CTest5func3Eg(ppc_fp128 noundef %3)
 // CHECK:   %sub = fsub ppc_fp128 %add, %call1
-// CHECK:   store ppc_fp128 %sub, ppc_fp128* %lfi, align 16
+// CHECK:   store ppc_fp128 %sub, ptr %lfi, align 16
 // CHECK:   ret i32 0
 // CHECK: }
 
-// CHECK: define linkonce_odr void @_ZN5CTestC1Eg(%class.CTest* noundef nonnull align 16 dereferenceable(32) %this, ppc_fp128 noundef %arg)
+// CHECK: define linkonce_odr void @_ZN5CTestC1Eg(ptr noundef nonnull align 16 dereferenceable(32) %this, ppc_fp128 noundef %arg)
 // CHECK: entry:
-// CHECK:   store %class.CTest* %this, %class.CTest** %this.addr, align 8
-// CHECK:   store ppc_fp128 %arg, ppc_fp128* %arg.addr, align 16
-// CHECK:   %this1 = load %class.CTest*, %class.CTest** %this.addr, align 8
-// CHECK:   %0 = load ppc_fp128, ppc_fp128* %arg.addr, align 16
-// CHECK:   call void @_ZN5CTestC2Eg(%class.CTest* noundef nonnull align 16 dereferenceable(32) %this1, ppc_fp128 noundef %0)
+// CHECK:   store ptr %this, ptr %this.addr, align 8
+// CHECK:   store ppc_fp128 %arg, ptr %arg.addr, align 16
+// CHECK:   %this1 = load ptr, ptr %this.addr, align 8
+// CHECK:   %0 = load ppc_fp128, ptr %arg.addr, align 16
+// CHECK:   call void @_ZN5CTestC2Eg(ptr noundef nonnull align 16 dereferenceable(32) %this1, ppc_fp128 noundef %0)
 // CHECK:   ret void
 // CHECK: }
 
 // CHECK: define linkonce_odr noundef ppc_fp128 @_ZN5CTest5func3Eg(ppc_fp128 noundef %arg)
 // CHECK: entry:
 // CHECK:   %arg.addr = alloca ppc_fp128, align 16
-// CHECK:   store ppc_fp128 %arg, ppc_fp128* %arg.addr, align 16
-// CHECK:   %0 = load ppc_fp128, ppc_fp128* %arg.addr, align 16
-// CHECK:   %1 = load ppc_fp128, ppc_fp128* @_ZN5CTest3scfE, align 16
+// CHECK:   store ppc_fp128 %arg, ptr %arg.addr, align 16
+// CHECK:   %0 = load ppc_fp128, ptr %arg.addr, align 16
+// CHECK:   %1 = load ppc_fp128, ptr @_ZN5CTest3scfE, align 16
 // CHECK:   %mul = fmul ppc_fp128 %0, %1
 // CHECK:   ret ppc_fp128 %mul
 // CHECK: }
 
-// CHECK: define linkonce_odr void @_ZN5CTestC2Eg(%class.CTest* noundef nonnull align 16 dereferenceable(32) %this, ppc_fp128 noundef %arg)
+// CHECK: define linkonce_odr void @_ZN5CTestC2Eg(ptr noundef nonnull align 16 dereferenceable(32) %this, ppc_fp128 noundef %arg)
 // CHECK: entry:
-// CHECK:   store %class.CTest* %this, %class.CTest** %this.addr, align 8
-// CHECK:   store ppc_fp128 %arg, ppc_fp128* %arg.addr, align 16
-// CHECK:   %this1 = load %class.CTest*, %class.CTest** %this.addr, align 8
-// CHECK:   %pf = getelementptr inbounds %class.CTest, %class.CTest* %this1, i32 0, i32 0
-// CHECK:   %0 = load ppc_fp128, ppc_fp128* %arg.addr, align 16
-// CHECK:   store ppc_fp128 %0, ppc_fp128* %pf, align 16
-// CHECK:   %vf = getelementptr inbounds %class.CTest, %class.CTest* %this1, i32 0, i32 1
-// CHECK:   %1 = load ppc_fp128, ppc_fp128* %arg.addr, align 16
-// CHECK:   store volatile ppc_fp128 %1, ppc_fp128* %vf, align 16
+// CHECK:   store ptr %this, ptr %this.addr, align 8
+// CHECK:   store ppc_fp128 %arg, ptr %arg.addr, align 16
+// CHECK:   %this1 = load ptr, ptr %this.addr, align 8
+// CHECK:   %pf = getelementptr inbounds %class.CTest, ptr %this1, i32 0, i32 0
+// CHECK:   %0 = load ppc_fp128, ptr %arg.addr, align 16
+// CHECK:   store ppc_fp128 %0, ptr %pf, align 16
+// CHECK:   %vf = getelementptr inbounds %class.CTest, ptr %this1, i32 0, i32 1
+// CHECK:   %1 = load ppc_fp128, ptr %arg.addr, align 16
+// CHECK:   store volatile ppc_fp128 %1, ptr %vf, align 16
 // CHECK:   ret void
 // CHECK: }
 

diff  --git a/clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp b/clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp
index 0bcfbfa6573b9..bdb79365ea0bf 100644
--- a/clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp
+++ b/clang/test/CodeGenCXX/implicit-copy-assign-operator.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-apple-darwin10.0.0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10.0.0 -o - %s | FileCheck %s
 struct A { 
   A &operator=(const A&);
   A &operator=(A&);
@@ -40,16 +40,16 @@ void test_D(D d1, D d2) {
   d1 = d2;
 }
 
-// CHECK-LABEL: define linkonce_odr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.D* @_ZN1DaSERS_
+// CHECK-LABEL: define linkonce_odr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN1DaSERS_
 // CHECK: {{call.*_ZN1AaSERS_}}
 // CHECK: {{call.*_ZN1BaSERS_}}
 // CHECK: {{call.*_ZN1CaSERKS_}}
-// CHECK: {{call void @llvm.memcpy.p0i8.p0i8.i64.*i64 28}}
+// CHECK: {{call void @llvm.memcpy.p0.p0.i64.*i64 28}}
 // CHECK: {{call.*_ZN1BaSERS_}}
 // CHECK: br
 // CHECK: {{call.*_ZN1CaSERKS_}}
-// CHECK: {{call void @llvm.memcpy.p0i8.p0i8.i64.*i64 288}}
-// CHECK: {{call void @llvm.memcpy.p0i8.p0i8.i64.*i64 12}}
+// CHECK: {{call void @llvm.memcpy.p0.p0.i64.*i64 288}}
+// CHECK: {{call void @llvm.memcpy.p0.p0.i64.*i64 12}}
 // CHECK: call void @_ZN11CopyByValueC1ERKS_
 // CHECK: {{call.*_ZN11CopyByValueaSES_}}
 // CHECK: ret

diff  --git a/clang/test/CodeGenCXX/implicit-copy-constructor.cpp b/clang/test/CodeGenCXX/implicit-copy-constructor.cpp
index 126c850f4156a..c7bf2a7fe4456 100644
--- a/clang/test/CodeGenCXX/implicit-copy-constructor.cpp
+++ b/clang/test/CodeGenCXX/implicit-copy-constructor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -emit-llvm -o - %s -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -std=c++11 | FileCheck %s
 
 struct A { 
   A();
@@ -40,13 +40,13 @@ void f(D d) {
   D d2(d);
 }
 
-// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(%struct.D* {{[^,]*}} %this, %struct.D* noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1DC1ERS_(ptr {{[^,]*}} %this, ptr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0) unnamed_addr
 // CHECK: call void @_ZN1AC1Ev
 // CHECK: call void @_ZN1CC2ERS_1A
 // CHECK: call void @_ZN1AD1Ev
 // CHECK: call void @_ZN1AC2ERS_
 // CHECK: call void @_ZN1BC2ERS_
-// CHECK: {{call void @llvm.memcpy.p0i8.p0i8.i64.*i64 28}}
+// CHECK: {{call void @llvm.memcpy.p0.p0.i64.*i64 28}}
 // CHECK: call void @_ZN1BC1ERS_
 // CHECK: br label
 // CHECK: call void @_ZN1AC1Ev
@@ -56,7 +56,7 @@ void f(D d) {
 // CHECK: br i1
 // CHECK: {{icmp eq.*, 2}}
 // CHECK: br i1
-// CHECK: {{call void @llvm.memcpy.p0i8.p0i8.i64.*i64 300}}
+// CHECK: {{call void @llvm.memcpy.p0.p0.i64.*i64 300}}
 // CHECK: ret void
 
 

diff  --git a/clang/test/CodeGenCXX/inalloca-overaligned.cpp b/clang/test/CodeGenCXX/inalloca-overaligned.cpp
index c24b104b41645..d20b1742618cd 100644
--- a/clang/test/CodeGenCXX/inalloca-overaligned.cpp
+++ b/clang/test/CodeGenCXX/inalloca-overaligned.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -w -triple i386-pc-win32 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -w -triple i386-pc-win32 -emit-llvm -o - %s | FileCheck %s
 
 // PR44395
 // MSVC passes overaligned types indirectly since MSVC 2015. Make sure that
@@ -28,7 +28,7 @@ int receive_inalloca_overaligned(NonTrivial nt, OverAligned o) {
 }
 
 // CHECK-LABEL: define dso_local noundef i32 @"?receive_inalloca_overaligned@@Y{{.*}}"
-// CHECK-SAME: (<{ %struct.NonTrivial, %struct.OverAligned* }>* inalloca(<{ %struct.NonTrivial, %struct.OverAligned* }>) %0)
+// CHECK-SAME: (ptr inalloca(<{ %struct.NonTrivial, ptr }>) %0)
 
 int pass_inalloca_overaligned() {
   gvi32 = receive_inalloca_overaligned(NonTrivial(), OverAligned());
@@ -37,27 +37,27 @@ int pass_inalloca_overaligned() {
 
 // CHECK-LABEL: define dso_local noundef i32 @"?pass_inalloca_overaligned@@Y{{.*}}"
 // CHECK: [[TMP:%[^ ]*]] = alloca %struct.OverAligned, align 64
-// CHECK: call i8* @llvm.stacksave()
-// CHECK: alloca inalloca <{ %struct.NonTrivial, %struct.OverAligned* }>
+// CHECK: call ptr @llvm.stacksave()
+// CHECK: alloca inalloca <{ %struct.NonTrivial, ptr }>
 
 // Construct OverAligned into TMP.
-// CHECK: call x86_thiscallcc noundef %struct.OverAligned* @"??0OverAligned@@QAE at XZ"(%struct.OverAligned* {{[^,]*}} [[TMP]])
+// CHECK: call x86_thiscallcc noundef ptr @"??0OverAligned@@QAE at XZ"(ptr {{[^,]*}} [[TMP]])
 
 // Construct NonTrivial into the GEP.
-// CHECK: [[GEP:%[^ ]*]] = getelementptr inbounds <{ %struct.NonTrivial, %struct.OverAligned* }>, <{ %struct.NonTrivial, %struct.OverAligned* }>* %{{.*}}, i32 0, i32 0
-// CHECK: call x86_thiscallcc noundef %struct.NonTrivial* @"??0NonTrivial@@QAE at XZ"(%struct.NonTrivial* {{[^,]*}} [[GEP]])
+// CHECK: [[GEP:%[^ ]*]] = getelementptr inbounds <{ %struct.NonTrivial, ptr }>, ptr %{{.*}}, i32 0, i32 0
+// CHECK: call x86_thiscallcc noundef ptr @"??0NonTrivial@@QAE at XZ"(ptr {{[^,]*}} [[GEP]])
 
 // Store the address of an OverAligned temporary into the struct.
-// CHECK: getelementptr inbounds <{ %struct.NonTrivial, %struct.OverAligned* }>, <{ %struct.NonTrivial, %struct.OverAligned* }>* %{{.*}}, i32 0, i32 1
-// CHECK: store %struct.OverAligned* [[TMP]], %struct.OverAligned** %{{.*}}, align 4
-// CHECK: call noundef i32 @"?receive_inalloca_overaligned@@Y{{.*}}"(<{ %struct.NonTrivial, %struct.OverAligned* }>* inalloca(<{ %struct.NonTrivial, %struct.OverAligned* }>) %argmem)
+// CHECK: getelementptr inbounds <{ %struct.NonTrivial, ptr }>, ptr %{{.*}}, i32 0, i32 1
+// CHECK: store ptr [[TMP]], ptr %{{.*}}, align 4
+// CHECK: call noundef i32 @"?receive_inalloca_overaligned@@Y{{.*}}"(ptr inalloca(<{ %struct.NonTrivial, ptr }>) %argmem)
 
 int receive_both(Both o) {
   return o.x + o.y;
 }
 
 // CHECK-LABEL: define dso_local noundef i32 @"?receive_both@@Y{{.*}}"
-// CHECK-SAME: (%struct.Both* noundef %o)
+// CHECK-SAME: (ptr noundef %o)
 
 int pass_both() {
   gvi32 = receive_both(Both());
@@ -66,15 +66,15 @@ int pass_both() {
 
 // CHECK-LABEL: define dso_local noundef i32 @"?pass_both@@Y{{.*}}"
 // CHECK: [[TMP:%[^ ]*]] = alloca %struct.Both, align 8
-// CHECK: call x86_thiscallcc noundef %struct.Both* @"??0Both@@QAE at XZ"(%struct.Both* {{[^,]*}} [[TMP]])
-// CHECK: call noundef i32 @"?receive_both@@Y{{.*}}"(%struct.Both* noundef [[TMP]])
+// CHECK: call x86_thiscallcc noundef ptr @"??0Both@@QAE at XZ"(ptr {{[^,]*}} [[TMP]])
+// CHECK: call noundef i32 @"?receive_both@@Y{{.*}}"(ptr noundef [[TMP]])
 
 int receive_inalloca_both(NonTrivial nt, Both o) {
   return nt.x + o.x + o.y;
 }
 
 // CHECK-LABEL: define dso_local noundef i32 @"?receive_inalloca_both@@Y{{.*}}"
-// CHECK-SAME: (<{ %struct.NonTrivial, %struct.Both* }>* inalloca(<{ %struct.NonTrivial, %struct.Both* }>) %0)
+// CHECK-SAME: (ptr inalloca(<{ %struct.NonTrivial, ptr }>) %0)
 
 int pass_inalloca_both() {
   gvi32 = receive_inalloca_both(NonTrivial(), Both());
@@ -83,8 +83,8 @@ int pass_inalloca_both() {
 
 // CHECK-LABEL: define dso_local noundef i32 @"?pass_inalloca_both@@Y{{.*}}"
 // CHECK: [[TMP:%[^ ]*]] = alloca %struct.Both, align 8
-// CHECK: call x86_thiscallcc noundef %struct.Both* @"??0Both@@QAE at XZ"(%struct.Both* {{[^,]*}} [[TMP]])
-// CHECK: call noundef i32 @"?receive_inalloca_both@@Y{{.*}}"(<{ %struct.NonTrivial, %struct.Both* }>* inalloca(<{ %struct.NonTrivial, %struct.Both* }>) %argmem)
+// CHECK: call x86_thiscallcc noundef ptr @"??0Both@@QAE at XZ"(ptr {{[^,]*}} [[TMP]])
+// CHECK: call noundef i32 @"?receive_inalloca_both@@Y{{.*}}"(ptr inalloca(<{ %struct.NonTrivial, ptr }>) %argmem)
 
 // Here we have a type that is:
 // - overaligned
@@ -101,11 +101,11 @@ struct [[trivial_abi]] alignas(8) MyPtr {
 int receiveMyPtr(MyPtr o) { return *o.ptr; }
 
 // CHECK-LABEL: define dso_local noundef i32 @"?receiveMyPtr@@Y{{.*}}"
-// CHECK-SAME: (%struct.MyPtr* noundef %o)
+// CHECK-SAME: (ptr noundef %o)
 
 int passMyPtr() { return receiveMyPtr(MyPtr()); }
 
 // CHECK-LABEL: define dso_local noundef i32 @"?passMyPtr@@Y{{.*}}"
 // CHECK: [[TMP:%[^ ]*]] = alloca %struct.MyPtr, align 8
-// CHECK: call x86_thiscallcc noundef %struct.MyPtr* @"??0MyPtr@@QAE at XZ"(%struct.MyPtr* {{[^,]*}} [[TMP]])
-// CHECK: call noundef i32 @"?receiveMyPtr@@Y{{.*}}"(%struct.MyPtr* noundef [[TMP]])
+// CHECK: call x86_thiscallcc noundef ptr @"??0MyPtr@@QAE at XZ"(ptr {{[^,]*}} [[TMP]])
+// CHECK: call noundef i32 @"?receiveMyPtr@@Y{{.*}}"(ptr noundef [[TMP]])

diff  --git a/clang/test/CodeGenCXX/inalloca-stmtexpr.cpp b/clang/test/CodeGenCXX/inalloca-stmtexpr.cpp
index 865619d99956d..e3617701f169b 100644
--- a/clang/test/CodeGenCXX/inalloca-stmtexpr.cpp
+++ b/clang/test/CodeGenCXX/inalloca-stmtexpr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple i686-windows-msvc -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple i686-windows-msvc -o - | FileCheck %s
 
 // Statement allow the user to exit the evaluation scope of a CallExpr without
 // executing the call. Check that clang generates reasonable IR for that case.
@@ -46,6 +46,6 @@ out:;
 // CHECK: call noundef zeroext i1 @"?cond@@YA_NXZ"()
 // CHECK: br i1
 // CHECK: br label %out
-// CHECK: call void @"?inalloca@@YAXUFoo@@0 at Z"(<{ %struct.Foo, %struct.Foo }>* inalloca(<{ %struct.Foo, %struct.Foo }>) %{{.*}})
-// CHECK: call void @llvm.stackrestore(i8* %inalloca.save)
+// CHECK: call void @"?inalloca@@YAXUFoo@@0 at Z"(ptr inalloca(<{ %struct.Foo, %struct.Foo }>) %{{.*}})
+// CHECK: call void @llvm.stackrestore(ptr %inalloca.save)
 // CHECK: out:

diff  --git a/clang/test/CodeGenCXX/inalloca-vector.cpp b/clang/test/CodeGenCXX/inalloca-vector.cpp
index fc07073f83770..40f0a3e194d87 100644
--- a/clang/test/CodeGenCXX/inalloca-vector.cpp
+++ b/clang/test/CodeGenCXX/inalloca-vector.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -w -triple i686-pc-win32 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -w -triple i686-pc-win32 -emit-llvm -o - %s | FileCheck %s
 
 // PR44395
 // MSVC passes up to three vectors in registers, and the rest indirectly. Check
@@ -21,31 +21,31 @@ void receive_vec_128(NonTrivial nt, __m128 x, __m128 y, __m128 z, __m128 w, __m1
 // CHECK-SAME: (<4 x float> inreg noundef %x,
 // CHECK-SAME: <4 x float> inreg noundef %y,
 // CHECK-SAME: <4 x float> inreg noundef %z,
-// CHECK-SAME: <{ %struct.NonTrivial, <4 x float>*, <4 x float>* }>* inalloca(<{ %struct.NonTrivial, <4 x float>*, <4 x float>* }>) %0)
+// CHECK-SAME: ptr inalloca(<{ %struct.NonTrivial, ptr, ptr }>) %0)
 
 void pass_vec_128() {
   __m128 z = {0};
   receive_vec_128(NonTrivial(), z, z, z, z, z);
 }
 // CHECK-LABEL: define dso_local void @"?pass_vec_128@@YAXXZ"()
-// CHECK: getelementptr inbounds <{ %struct.NonTrivial, <4 x float>*, <4 x float>* }>, <{ %struct.NonTrivial, <4 x float>*, <4 x float>* }>* %{{[^,]*}}, i32 0, i32 0
-// CHECK: call x86_thiscallcc noundef %struct.NonTrivial* @"??0NonTrivial@@QAE at XZ"(%struct.NonTrivial* {{[^,]*}} %{{.*}})
+// CHECK: getelementptr inbounds <{ %struct.NonTrivial, ptr, ptr }>, ptr %{{[^,]*}}, i32 0, i32 0
+// CHECK: call x86_thiscallcc noundef ptr @"??0NonTrivial@@QAE at XZ"(ptr {{[^,]*}} %{{.*}})
 
 // Store q, store temp alloca.
-// CHECK: store <4 x float> %{{[^,]*}}, <4 x float>* %{{[^,]*}}, align 16
-// CHECK: getelementptr inbounds <{ %struct.NonTrivial, <4 x float>*, <4 x float>* }>, <{ %struct.NonTrivial, <4 x float>*, <4 x float>* }>* %{{[^,]*}}, i32 0, i32 1
-// CHECK: store <4 x float>* %{{[^,]*}}, <4 x float>** %{{[^,]*}}, align 4
+// CHECK: store <4 x float> %{{[^,]*}}, ptr %{{[^,]*}}, align 16
+// CHECK: getelementptr inbounds <{ %struct.NonTrivial, ptr, ptr }>, ptr %{{[^,]*}}, i32 0, i32 1
+// CHECK: store ptr %{{[^,]*}}, ptr %{{[^,]*}}, align 4
 
 // Store w, store temp alloca.
-// CHECK: store <4 x float> %{{[^,]*}}, <4 x float>* %{{[^,]*}}, align 16
-// CHECK: getelementptr inbounds <{ %struct.NonTrivial, <4 x float>*, <4 x float>* }>, <{ %struct.NonTrivial, <4 x float>*, <4 x float>* }>* %{{[^,]*}}, i32 0, i32 2
-// CHECK: store <4 x float>* %{{[^,]*}}, <4 x float>** %{{[^,]*}}, align 4
+// CHECK: store <4 x float> %{{[^,]*}}, ptr %{{[^,]*}}, align 16
+// CHECK: getelementptr inbounds <{ %struct.NonTrivial, ptr, ptr }>, ptr %{{[^,]*}}, i32 0, i32 2
+// CHECK: store ptr %{{[^,]*}}, ptr %{{[^,]*}}, align 4
 
 // CHECK: call void @"?receive_vec_128@@YAXUNonTrivial@@T__m128@@1111 at Z"
 // CHECK-SAME: (<4 x float> inreg noundef %{{[^,]*}},
 // CHECK-SAME: <4 x float> inreg noundef %{{[^,]*}},
 // CHECK-SAME: <4 x float> inreg noundef %{{[^,]*}},
-// CHECK-SAME: <{ %struct.NonTrivial, <4 x float>*, <4 x float>* }>* inalloca(<{ %struct.NonTrivial, <4 x float>*, <4 x float>* }>) %{{[^,]*}})
+// CHECK-SAME: ptr inalloca(<{ %struct.NonTrivial, ptr, ptr }>) %{{[^,]*}})
 
 // w will be passed indirectly by register, and q will be passed indirectly, but
 // the pointer will be in memory.
@@ -56,9 +56,9 @@ void __fastcall fastcall_receive_vec(__m128 x, __m128 y, __m128 z, __m128 w, int
 // CHECK-SAME: (<4 x float> inreg noundef %x,
 // CHECK-SAME: <4 x float> inreg noundef %y,
 // CHECK-SAME: <4 x float> inreg noundef %z,
-// CHECK-SAME: <4 x float>* inreg noundef %0,
+// CHECK-SAME: ptr inreg noundef %0,
 // CHECK-SAME: i32 inreg noundef %edx,
-// CHECK-SAME: <{ <4 x float>*, %struct.NonTrivial }>* inalloca(<{ <4 x float>*, %struct.NonTrivial }>) %1)
+// CHECK-SAME: ptr inalloca(<{ ptr, %struct.NonTrivial }>) %1)
 
 
 void __vectorcall vectorcall_receive_vec(double xmm0, double xmm1, double xmm2,
@@ -73,6 +73,6 @@ void __vectorcall vectorcall_receive_vec(double xmm0, double xmm1, double xmm2,
 // CHECK-SAME: <4 x float> inreg noundef %x,
 // CHECK-SAME: <4 x float> inreg noundef %y,
 // CHECK-SAME: <4 x float> inreg noundef %z,
-// CHECK-SAME: <4 x float>* inreg noundef %0,
+// CHECK-SAME: ptr inreg noundef %0,
 // CHECK-SAME: i32 inreg noundef %edx,
-// CHECK-SAME: <{ <4 x float>*, %struct.NonTrivial }>* inalloca(<{ <4 x float>*, %struct.NonTrivial }>) %1)
+// CHECK-SAME: ptr inalloca(<{ ptr, %struct.NonTrivial }>) %1)

diff  --git a/clang/test/CodeGenCXX/inheriting-constructor-cleanup.cpp b/clang/test/CodeGenCXX/inheriting-constructor-cleanup.cpp
index eaa8729093bbc..9ea48a933877e 100644
--- a/clang/test/CodeGenCXX/inheriting-constructor-cleanup.cpp
+++ b/clang/test/CodeGenCXX/inheriting-constructor-cleanup.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-darwin -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s --check-prefix=EXCEPTIONS
+// RUN: %clang_cc1 -triple x86_64-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-darwin -std=c++11 -fcxx-exceptions -fexceptions -emit-llvm -o - %s | FileCheck %s --check-prefix=EXCEPTIONS
 
 // PR36748
 // rdar://problem/45805151
@@ -29,24 +29,24 @@ void f() {
   // CHECK-LABEL: define{{.*}} void @_Z1fv
   // CHECK: %[[TMP1:.*]] = alloca %struct.S1
   // CHECK: %[[TMP2:.*]] = alloca %struct.S2
-  // CHECK: call void (%struct.Base*, %struct.S1*, %struct.S2*, i8*, ...) @_ZN4BaseC2ERK2S1RK2S2PKcz(%struct.Base* {{.*}}, %struct.S1* noundef nonnull align 1 dereferenceable(1) %[[TMP1]], %struct.S2* noundef nonnull align 1 dereferenceable(1) %[[TMP2]], i8* {{.*}})
-  // CHECK-NEXT: call void @_ZN9InheritorD1Ev(%struct.Inheritor* {{.*}})
-  // CHECK-NEXT: call void @_ZN2S2D1Ev(%struct.S2* {{[^,]*}} %[[TMP2]])
-  // CHECK-NEXT: call void @_ZN2S1D1Ev(%struct.S1* {{[^,]*}} %[[TMP1]])
+  // CHECK: call void (ptr, ptr, ptr, ptr, ...) @_ZN4BaseC2ERK2S1RK2S2PKcz(ptr {{.*}}, ptr noundef nonnull align 1 dereferenceable(1) %[[TMP1]], ptr noundef nonnull align 1 dereferenceable(1) %[[TMP2]], ptr {{.*}})
+  // CHECK-NEXT: call void @_ZN9InheritorD1Ev(ptr {{.*}})
+  // CHECK-NEXT: call void @_ZN2S2D1Ev(ptr {{[^,]*}} %[[TMP2]])
+  // CHECK-NEXT: call void @_ZN2S1D1Ev(ptr {{[^,]*}} %[[TMP1]])
 
   // EXCEPTIONS-LABEL: define{{.*}} void @_Z1fv
   // EXCEPTIONS: %[[TMP1:.*]] = alloca %struct.S1
   // EXCEPTIONS: %[[TMP2:.*]] = alloca %struct.S2
-  // EXCEPTIONS: invoke void (%struct.Base*, %struct.S1*, %struct.S2*, i8*, ...) @_ZN4BaseC2ERK2S1RK2S2PKcz(%struct.Base* {{.*}}, %struct.S1* noundef nonnull align 1 dereferenceable(1) %[[TMP1]], %struct.S2* noundef nonnull align 1 dereferenceable(1) %[[TMP2]], i8* {{.*}})
+  // EXCEPTIONS: invoke void (ptr, ptr, ptr, ptr, ...) @_ZN4BaseC2ERK2S1RK2S2PKcz(ptr {{.*}}, ptr noundef nonnull align 1 dereferenceable(1) %[[TMP1]], ptr noundef nonnull align 1 dereferenceable(1) %[[TMP2]], ptr {{.*}})
   // EXCEPTIONS-NEXT: to label %[[CONT:.*]] unwind label %[[LPAD:.*]]
 
   // EXCEPTIONS: [[CONT]]:
-  // EXCEPTIONS-NEXT: call void @_ZN9InheritorD1Ev(%struct.Inheritor* {{.*}})
-  // EXCEPTIONS-NEXT: call void @_ZN2S2D1Ev(%struct.S2* {{[^,]*}} %[[TMP2]])
-  // EXCEPTIONS-NEXT: call void @_ZN2S1D1Ev(%struct.S1* {{[^,]*}} %[[TMP1]])
+  // EXCEPTIONS-NEXT: call void @_ZN9InheritorD1Ev(ptr {{.*}})
+  // EXCEPTIONS-NEXT: call void @_ZN2S2D1Ev(ptr {{[^,]*}} %[[TMP2]])
+  // EXCEPTIONS-NEXT: call void @_ZN2S1D1Ev(ptr {{[^,]*}} %[[TMP1]])
 
   // EXCEPTIONS: [[LPAD]]:
-  // EXCEPTIONS: call void @_ZN14NonTrivialDtorD2Ev(%struct.NonTrivialDtor* {{.*}})
-  // EXCEPTIONS-NEXT: call void @_ZN2S2D1Ev(%struct.S2* {{[^,]*}} %[[TMP2]])
-  // EXCEPTIONS-NEXT: call void @_ZN2S1D1Ev(%struct.S1* {{[^,]*}} %[[TMP1]])
+  // EXCEPTIONS: call void @_ZN14NonTrivialDtorD2Ev(ptr {{.*}})
+  // EXCEPTIONS-NEXT: call void @_ZN2S2D1Ev(ptr {{[^,]*}} %[[TMP2]])
+  // EXCEPTIONS-NEXT: call void @_ZN2S1D1Ev(ptr {{[^,]*}} %[[TMP1]])
 }

diff  --git a/clang/test/CodeGenCXX/init-priority-attr.cpp b/clang/test/CodeGenCXX/init-priority-attr.cpp
index 494daf847ccb4..cac15eb5c0653 100644
--- a/clang/test/CodeGenCXX/init-priority-attr.cpp
+++ b/clang/test/CodeGenCXX/init-priority-attr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple x86_64-apple-darwin10 -O2 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -O2 -emit-llvm -o - | FileCheck %s
 // PR11480
 
 void foo(int);
@@ -27,10 +27,10 @@ class C {
 
 A C::a = A();
 
-// CHECK: @llvm.global_ctors = appending global [3 x { i32, void ()*, i8* }]
-// CHECK: [{ i32, void ()*, i8* } { i32 200, void ()* @_GLOBAL__I_000200, i8* null },
-// CHECK:  { i32, void ()*, i8* } { i32 300, void ()* @_GLOBAL__I_000300, i8* null },
-// CHECK:  { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_init_priority_attr.cpp, i8* null }]
+// CHECK: @llvm.global_ctors = appending global [3 x { i32, ptr, ptr }]
+// CHECK: [{ i32, ptr, ptr } { i32 200, ptr @_GLOBAL__I_000200, ptr null },
+// CHECK:  { i32, ptr, ptr } { i32 300, ptr @_GLOBAL__I_000300, ptr null },
+// CHECK:  { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_init_priority_attr.cpp, ptr null }]
 
 // CHECK: _GLOBAL__I_000200()
 // CHECK: _Z3fooi(i32 noundef 3)

diff  --git a/clang/test/CodeGenCXX/initializer-list-ctor-order.cpp b/clang/test/CodeGenCXX/initializer-list-ctor-order.cpp
index f7a84b1edf779..5cddc92b6e50a 100644
--- a/clang/test/CodeGenCXX/initializer-list-ctor-order.cpp
+++ b/clang/test/CodeGenCXX/initializer-list-ctor-order.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 %s -emit-llvm -o - -triple i686-linux-gnu | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ITANIUM
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 %s -emit-llvm -o - -triple i686-windows   | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MS
+// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - -triple i686-linux-gnu | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-ITANIUM
+// RUN: %clang_cc1 -std=c++11 %s -emit-llvm -o - -triple i686-windows   | FileCheck %s --check-prefix=CHECK --check-prefix=CHECK-MS
 
 extern "C" {
 int f();
@@ -24,6 +24,6 @@ struct B : A {
 };
 B::B() : A{f(), g()} {}
 // CHECK-ITANIUM-LABEL: define{{.*}} void @_ZN1BC2Ev
-// CHECK-MS-LABEL: define dso_local x86_thiscallcc noundef %struct.B* @"??0B@@QAE at XZ"
+// CHECK-MS-LABEL: define dso_local x86_thiscallcc noundef ptr @"??0B@@QAE at XZ"
 // CHECK: call i32 @f()
 // CHECK: call i32 @g()

diff  --git a/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp b/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp
index a0ca999cfdaaf..2126aeb3adaaf 100644
--- a/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp
+++ b/clang/test/CodeGenCXX/invariant.group-for-vptrs.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-pc-linux-gnu -emit-llvm %s -fstrict-vtable-pointers -O1 -o - -disable-llvm-passes | FileCheck %s
+// RUN: %clang_cc1 -triple=x86_64-pc-linux-gnu -emit-llvm %s -fstrict-vtable-pointers -O1 -o - -disable-llvm-passes | FileCheck %s
 
 struct A {
   virtual void foo();
@@ -56,8 +56,8 @@ void testInternallyVisible(bool p) {
 
 // Checking D::D()
 // CHECK-LABEL: define linkonce_odr void @_ZN1DC2Ev(
-// CHECK:  = call i8* @llvm.launder.invariant.group.p0i8(i8*
-// CHECK:  call void @_ZN1AC2Ev(%struct.A*
+// CHECK:  = call ptr @llvm.launder.invariant.group.p0(ptr
+// CHECK:  call void @_ZN1AC2Ev(ptr
 // CHECK: store {{.*}} !invariant.group ![[MD]]
 
 // Checking B::B()

diff  --git a/clang/test/CodeGenCXX/key-function-vtable.cpp b/clang/test/CodeGenCXX/key-function-vtable.cpp
index 204ae477d03a1..3e0a47595f762 100644
--- a/clang/test/CodeGenCXX/key-function-vtable.cpp
+++ b/clang/test/CodeGenCXX/key-function-vtable.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-none-linux-gnu %s -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple arm-apple-darwin %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-none-linux-gnu %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple arm-apple-darwin %s -emit-llvm -o - | FileCheck %s
 
 // Simple key function test
 struct testa { virtual void a(); };
@@ -44,8 +44,8 @@ inline void X1::f() { }
 void use_X1() { X1 x1; }
 
 // CHECK-DAG: @_ZTV2X1 = linkonce_odr unnamed_addr constant
-// CHECK-DAG: @_ZTV5testa ={{.*}} unnamed_addr constant { [3 x i8*] } { [3 x i8*] [i8* null
-// CHECK-DAG: @_ZTV5testc = linkonce_odr unnamed_addr constant { [3 x i8*] } { [3 x i8*] [i8* null
-// CHECK-DAG: @_ZTV5testb = linkonce_odr unnamed_addr constant { [3 x i8*] } { [3 x i8*] [i8* null
-// CHECK-DAG: @_ZTV5teste = linkonce_odr unnamed_addr constant { [3 x i8*] } { [3 x i8*] [i8* null
-// CHECK-DAG: @_ZTVN12_GLOBAL__N_15testgE = internal unnamed_addr constant { [3 x i8*] } { [3 x i8*] [i8* null
+// CHECK-DAG: @_ZTV5testa ={{.*}} unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null
+// CHECK-DAG: @_ZTV5testc = linkonce_odr unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null
+// CHECK-DAG: @_ZTV5testb = linkonce_odr unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null
+// CHECK-DAG: @_ZTV5teste = linkonce_odr unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null
+// CHECK-DAG: @_ZTVN12_GLOBAL__N_15testgE = internal unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null

diff  --git a/clang/test/CodeGenCXX/lambda-conversion-op-cc.cpp b/clang/test/CodeGenCXX/lambda-conversion-op-cc.cpp
index 92f31df3e8b4d..0dcfdb57a6a0a 100644
--- a/clang/test/CodeGenCXX/lambda-conversion-op-cc.cpp
+++ b/clang/test/CodeGenCXX/lambda-conversion-op-cc.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK,LIN64
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-linux-gnu -DCC="__attribute__((vectorcall))" | FileCheck %s --check-prefixes=CHECK,VECCALL
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -fms-compatibility -triple=i386-windows-pc -DWIN32 | FileCheck %s --check-prefixes=WIN32
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-linux-gnu | FileCheck %s --check-prefixes=CHECK,LIN64
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-linux-gnu -DCC="__attribute__((vectorcall))" | FileCheck %s --check-prefixes=CHECK,VECCALL
+// RUN: %clang_cc1 -emit-llvm %s -o - -fms-compatibility -triple=i386-windows-pc -DWIN32 | FileCheck %s --check-prefixes=WIN32
 
 #ifndef CC
 #define CC
@@ -31,29 +31,29 @@ void usage() {
 // LIN64: define{{.*}} void @_Z5usagev()
 // VECCALL: define{{.*}} void @_Z5usagev()
 // WIN32: define dso_local void @"?usage@@YAXXZ"()
-// CHECK: call noundef double (i32, float, double)* @"_ZZ5usagevENK3$_0cvPFdifdEEv"
-// WIN32: call x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6A?A?<auto>@@HMN at ZXZ"
-// WIN32: call x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6E?A?<auto>@@HMN at ZXZ"
-// WIN32: call x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6G?A?<auto>@@HMN at ZXZ"
-// WIN32: call x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6I?A?<auto>@@HMN at ZXZ"
-// WIN32: call x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6Q?A?<auto>@@HMN at ZXZ"
+// CHECK: call noundef ptr @"_ZZ5usagevENK3$_0cvPFdifdEEv"
+// WIN32: call x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6A?A?<auto>@@HMN at ZXZ"
+// WIN32: call x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6E?A?<auto>@@HMN at ZXZ"
+// WIN32: call x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6G?A?<auto>@@HMN at ZXZ"
+// WIN32: call x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6I?A?<auto>@@HMN at ZXZ"
+// WIN32: call x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6Q?A?<auto>@@HMN at ZXZ"
 // Operator+ calls 'default' calling convention.
-// CHECK: call noundef double (i32, float, double)* @"_ZZ5usagevENK3$_0cvPFdifdEEv"
-// WIN32: call x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6A?A?<auto>@@HMN at ZXZ"
+// CHECK: call noundef ptr @"_ZZ5usagevENK3$_0cvPFdifdEEv"
+// WIN32: call x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6A?A?<auto>@@HMN at ZXZ"
 //
 // Conversion operator, returns __invoke.
-// CHECK: define internal noundef double (i32, float, double)* @"_ZZ5usagevENK3$_0cvPFdifdEEv"
-// CHECK: ret double (i32, float, double)* @"_ZZ5usagevEN3$_08__invokeEifd"
-// WIN32: define internal x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6A?A?<auto>@@HMN at ZXZ"
-// WIN32: ret double (i32, float, double)* @"?__invoke@<lambda_0>@?0??usage@@YAXXZ at CA?A?<auto>@@HMN at Z"
-// WIN32: define internal x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6E?A?<auto>@@HMN at ZXZ"
-// WIN32: ret double (i32, float, double)* @"?__invoke@<lambda_0>@?0??usage@@YAXXZ at CE?A?<auto>@@HMN at Z"
-// WIN32: define internal x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6G?A?<auto>@@HMN at ZXZ"
-// WIN32: ret double (i32, float, double)* @"?__invoke@<lambda_0>@?0??usage@@YAXXZ at CG?A?<auto>@@HMN at Z"
-// WIN32: define internal x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6I?A?<auto>@@HMN at ZXZ"
-// WIN32: ret double (i32, float, double)* @"?__invoke@<lambda_0>@?0??usage@@YAXXZ at CI?A?<auto>@@HMN at Z"
-// WIN32: define internal x86_thiscallcc noundef double (i32, float, double)* @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6Q?A?<auto>@@HMN at ZXZ"
-// WIN32: ret double (i32, float, double)* @"?__invoke@<lambda_0>@?0??usage@@YAXXZ at CQ?A?<auto>@@HMN at Z"
+// CHECK: define internal noundef ptr @"_ZZ5usagevENK3$_0cvPFdifdEEv"
+// CHECK: ret ptr @"_ZZ5usagevEN3$_08__invokeEifd"
+// WIN32: define internal x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6A?A?<auto>@@HMN at ZXZ"
+// WIN32: ret ptr @"?__invoke@<lambda_0>@?0??usage@@YAXXZ at CA?A?<auto>@@HMN at Z"
+// WIN32: define internal x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6E?A?<auto>@@HMN at ZXZ"
+// WIN32: ret ptr @"?__invoke@<lambda_0>@?0??usage@@YAXXZ at CE?A?<auto>@@HMN at Z"
+// WIN32: define internal x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6G?A?<auto>@@HMN at ZXZ"
+// WIN32: ret ptr @"?__invoke@<lambda_0>@?0??usage@@YAXXZ at CG?A?<auto>@@HMN at Z"
+// WIN32: define internal x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6I?A?<auto>@@HMN at ZXZ"
+// WIN32: ret ptr @"?__invoke@<lambda_0>@?0??usage@@YAXXZ at CI?A?<auto>@@HMN at Z"
+// WIN32: define internal x86_thiscallcc noundef ptr @"??B<lambda_0>@?0??usage@@YAXXZ at QBEP6Q?A?<auto>@@HMN at ZXZ"
+// WIN32: ret ptr @"?__invoke@<lambda_0>@?0??usage@@YAXXZ at CQ?A?<auto>@@HMN at Z"
 //
 // __invoke function, calls operator(). Win32 should call both.
 // LIN64: define internal noundef double @"_ZZ5usagevEN3$_08__invokeEifd"

diff  --git a/clang/test/CodeGenCXX/lambda-deterministic-captures.cpp b/clang/test/CodeGenCXX/lambda-deterministic-captures.cpp
index 1a3fdb0703698..6236ff2ca66cb 100644
--- a/clang/test/CodeGenCXX/lambda-deterministic-captures.cpp
+++ b/clang/test/CodeGenCXX/lambda-deterministic-captures.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -emit-llvm --std=c++17 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm --std=c++17 %s -o - | FileCheck %s
 
 struct stream {
   friend const stream &operator<<(const stream &, const float &);
@@ -16,18 +16,18 @@ void foo() {
 }
 
 // CHECK: define{{.*}} void @_Z3foov
-// CHECK: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 0
-// CHECK-NEXT: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 1
+// CHECK: getelementptr inbounds %{{.+}}, ptr %{{.+}}, i32 0, i32 0
+// CHECK-NEXT: getelementptr inbounds %{{.+}}, ptr %{{.+}}, i32 0, i32 1
 // CHECK-NEXT: store float 0.000
-// CHECK-NEXT: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 2
+// CHECK-NEXT: getelementptr inbounds %{{.+}}, ptr %{{.+}}, i32 0, i32 2
 // CHECK-NEXT: store float 1.000
-// CHECK-NEXT: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 3
+// CHECK-NEXT: getelementptr inbounds %{{.+}}, ptr %{{.+}}, i32 0, i32 3
 // CHECK-NEXT: store float 2.000
 
 // The lambda body.  Reverse iteration when the captures aren't deterministic
 // causes these to be laid out 
diff erently in the lambda.
 // CHECK: define internal void
-// CHECK: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 0
-// CHECK: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 1
-// CHECK: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 2
-// CHECK: getelementptr inbounds %{{.+}}, %{{.+}}* %{{.+}}, i32 0, i32 3
+// CHECK: getelementptr inbounds %{{.+}}, ptr %{{.+}}, i32 0, i32 0
+// CHECK: getelementptr inbounds %{{.+}}, ptr %{{.+}}, i32 0, i32 1
+// CHECK: getelementptr inbounds %{{.+}}, ptr %{{.+}}, i32 0, i32 2
+// CHECK: getelementptr inbounds %{{.+}}, ptr %{{.+}}, i32 0, i32 3

diff  --git a/clang/test/CodeGenCXX/lambda-expressions.cpp b/clang/test/CodeGenCXX/lambda-expressions.cpp
index 79e99f31b06d7..0375a95598b64 100644
--- a/clang/test/CodeGenCXX/lambda-expressions.cpp
+++ b/clang/test/CodeGenCXX/lambda-expressions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10.0.0 -fblocks -emit-llvm -o - %s -fexceptions -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10.0.0 -fblocks -emit-llvm -o - %s -fexceptions -std=c++11 | FileCheck %s
 
 // CHECK-NOT: @unused
 auto unused = [](int i) { return i+1; };
@@ -36,21 +36,21 @@ int a() { return []{ return 1; }(); }
 int b(int x) { return [x]{return x;}(); }
 // CHECK-LABEL: define{{.*}} i32 @_Z1bi
 // CHECK: store i32
-// CHECK: load i32, i32*
+// CHECK: load i32, ptr
 // CHECK: store i32
 // CHECK: call noundef i32 @"_ZZ1biENK3$_2clEv"
 // CHECK-LABEL: define internal noundef i32 @"_ZZ1biENK3$_2clEv"
-// CHECK: load i32, i32*
+// CHECK: load i32, ptr
 // CHECK: ret i32
 
 int c(int x) { return [&x]{return x;}(); }
 // CHECK-LABEL: define{{.*}} i32 @_Z1ci
 // CHECK: store i32
-// CHECK: store i32*
+// CHECK: store ptr
 // CHECK: call noundef i32 @"_ZZ1ciENK3$_3clEv"
 // CHECK-LABEL: define internal noundef i32 @"_ZZ1ciENK3$_3clEv"
-// CHECK: load i32*, i32**
-// CHECK: load i32, i32*
+// CHECK: load ptr, ptr
+// CHECK: load i32, ptr
 // CHECK: ret i32
 
 struct D { D(); D(const D&); int x; };
@@ -64,8 +64,8 @@ int d(int x) { D y[10]; return [x,y] { return y[x].x; }(); }
 // CHECK: br i1
 // CHECK: call noundef i32 @"_ZZ1diENK3$_4clEv"
 // CHECK-LABEL: define internal noundef i32 @"_ZZ1diENK3$_4clEv"
-// CHECK: load i32, i32*
-// CHECK: load i32, i32*
+// CHECK: load i32, ptr
+// CHECK: load i32, ptr
 // CHECK: ret i32
 
 struct E { E(); E(const E&); ~E(); int x; };
@@ -79,13 +79,13 @@ int e(E a, E b, bool cond) { return [a,b,cond](){ return (cond ? a : b).x; }();
 
 // CHECK-LABEL: define internal noundef i32 @"_ZZ1e1ES_bENK3$_5clEv"
 // CHECK: trunc i8
-// CHECK: load i32, i32*
+// CHECK: load i32, ptr
 // CHECK: ret i32
 
 void f() {
   // CHECK-LABEL: define{{.*}} void @_Z1fv()
   // CHECK: @"_ZZ1fvENK3$_6cvPFiiiEEv"
-  // CHECK-NEXT: store i32 (i32, i32)*
+  // CHECK-NEXT: store ptr
   // CHECK-NEXT: ret void
   int (*fp)(int, int) = [](int x, int y){ return x + y; };
 }
@@ -95,12 +95,12 @@ int g() {
   int &r = k;
   // CHECK-LABEL: define internal noundef i32 @"_ZZ1gvENK3$_7clEv"(
   // CHECK-NOT: }
-  // CHECK: load i32, i32* @_ZL1k,
+  // CHECK: load i32, ptr @_ZL1k,
   return [] { return r; } ();
 };
 
 // PR14773
-// CHECK: [[ARRVAL:%[0-9a-zA-Z]*]] = load i32, i32* getelementptr inbounds ([0 x i32], [0 x i32]* @_ZZ14staticarrayrefvE5array, i64 0, i64 0), align 4
+// CHECK: [[ARRVAL:%[0-9a-zA-Z]*]] = load i32, ptr @_ZZ14staticarrayrefvE5array, align 4
 // CHECK-NEXT: store i32 [[ARRVAL]]
 void staticarrayref(){
   static int array[] = {};
@@ -110,8 +110,8 @@ void staticarrayref(){
   }();
 }
 
-// CHECK-LABEL: define internal noundef i32* @"_ZZ11PR22071_funvENK3$_9clEv"
-// CHECK: ret i32* @PR22071_var
+// CHECK-LABEL: define internal noundef ptr @"_ZZ11PR22071_funvENK3$_9clEv"
+// CHECK: ret ptr @PR22071_var
 int PR22071_var;
 int *PR22071_fun() {
   constexpr int &y = PR22071_var;
@@ -140,18 +140,17 @@ namespace pr28595 {
     // CHECK: call {{.*}}after_init
     after_init();
 
-    // CHECK: %[[DST_0:.*]] = getelementptr {{.*}} [3 x [5 x %[[A]]]]* %[[DST:.*]], i64 0, i64 0
+    // CHECK: %[[DST_0:.*]] = getelementptr {{.*}} ptr %[[DST:.*]], i64 0, i64 0
     // CHECK: br label
     // CHECK: %[[I:.*]] = phi i64 [ 0, %{{.*}} ], [ %[[I_NEXT:.*]], {{.*}} ]
-    // CHECK: %[[DST_I:.*]] = getelementptr {{.*}} [5 x %[[A]]]* %[[DST_0]], i64 %[[I]]
-    // CHECK: %[[SRC_I:.*]] = getelementptr {{.*}} [3 x [5 x %[[A]]]]* %[[SRC]], i64 0, i64 %[[I]]
+    // CHECK: %[[DST_I:.*]] = getelementptr {{.*}} ptr %[[DST_0]], i64 %[[I]]
+    // CHECK: %[[SRC_I:.*]] = getelementptr {{.*}} ptr %[[SRC]], i64 0, i64 %[[I]]
     //
-    // CHECK: %[[DST_I_0:.*]] = getelementptr {{.*}} [5 x %[[A]]]* %[[DST_I]], i64 0, i64 0
+    // CHECK: %[[DST_I_0:.*]] = getelementptr {{.*}} ptr %[[DST_I]], i64 0, i64 0
     // CHECK: br label
     // CHECK: %[[J:.*]] = phi i64 [ 0, %{{.*}} ], [ %[[J_NEXT:.*]], {{.*}} ]
-    // CHECK: %[[DST_I_J:.*]] = getelementptr {{.*}} %[[A]]* %[[DST_I_0]], i64 %[[J]]
-    // CHECK: %[[DST_0_0:.*]] = bitcast [5 x %[[A]]]* %[[DST_0]] to %[[A]]*
-    // CHECK: %[[SRC_I_J:.*]] = getelementptr {{.*}} [5 x %[[A]]]* %[[SRC_I]], i64 0, i64 %[[J]]
+    // CHECK: %[[DST_I_J:.*]] = getelementptr {{.*}} ptr %[[DST_I_0]], i64 %[[J]]
+    // CHECK: %[[SRC_I_J:.*]] = getelementptr {{.*}} ptr %[[SRC_I]], i64 0, i64 %[[J]]
     //
     // CHECK: invoke void @_ZN7pr285954TempC1Ev
     // CHECK: invoke void @_ZN7pr285951AC1ERKS0_RKNS_4TempE
@@ -175,11 +174,11 @@ namespace pr28595 {
     // CHECK: br label %[[CLEANUP]]
     //
     // CHECK: [[CLEANUP]]:
-    // CHECK: icmp eq %[[A]]* %[[DST_0_0]], %[[DST_I_J]]
-    // CHECK: %[[T0:.*]] = phi %[[A]]*
-    // CHECK: %[[T1:.*]] = getelementptr inbounds %[[A]], %[[A]]* %[[T0]], i64 -1
-    // CHECK: call void @_ZN7pr285951AD1Ev(%[[A]]* {{[^,]*}} %[[T1]])
-    // CHECK: icmp eq %[[A]]* %[[T1]], %[[DST_0_0]]
+    // CHECK: icmp eq ptr %[[DST_0]], %[[DST_I_J]]
+    // CHECK: %[[T0:.*]] = phi ptr
+    // CHECK: %[[T1:.*]] = getelementptr inbounds %[[A]], ptr %[[T0]], i64 -1
+    // CHECK: call void @_ZN7pr285951AD1Ev(ptr {{[^,]*}} %[[T1]])
+    // CHECK: icmp eq ptr %[[T1]], %[[DST_0]]
     (void) [array]{};
   }
 }
@@ -189,13 +188,13 @@ namespace pr28595 {
 // CHECK-LABEL: define internal noundef i32 @"_ZZ1fvEN3$_68__invokeEii"
 // CHECK: store i32
 // CHECK-NEXT: store i32
-// CHECK-NEXT: load i32, i32*
-// CHECK-NEXT: load i32, i32*
+// CHECK-NEXT: load i32, ptr
+// CHECK-NEXT: load i32, ptr
 // CHECK-NEXT: call noundef i32 @"_ZZ1fvENK3$_6clEii"
 // CHECK-NEXT: ret i32
 
-// CHECK-LABEL: define internal void @"_ZZ1hvEN4$_118__invokeEv"(%struct.A* noalias sret(%struct.A) align 1 %agg.result) {{.*}} {
-// CHECK: call void @"_ZZ1hvENK4$_11clEv"(%struct.A* sret(%struct.A) align 1 %agg.result,
+// CHECK-LABEL: define internal void @"_ZZ1hvEN4$_118__invokeEv"(ptr noalias sret(%struct.A) align 1 %agg.result) {{.*}} {
+// CHECK: call void @"_ZZ1hvENK4$_11clEv"(ptr sret(%struct.A) align 1 %agg.result,
 // CHECK-NEXT: ret void
 struct A { ~A(); };
 void h() {

diff  --git a/clang/test/CodeGenCXX/linetable-cleanup.cpp b/clang/test/CodeGenCXX/linetable-cleanup.cpp
index 26913fd895281..7e4ad9a37e78b 100644
--- a/clang/test/CodeGenCXX/linetable-cleanup.cpp
+++ b/clang/test/CodeGenCXX/linetable-cleanup.cpp
@@ -1,12 +1,12 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 -std=c++98 %s -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 -std=c++11 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 -std=c++98 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-darwin10 -std=c++11 %s -o - | FileCheck %s
 
 // Check the line numbers for cleanup code with EH in combination with
 // simple return expressions.
 
 // CHECK: define {{.*}}foo
-// CHECK: call void @_ZN1CD1Ev(%class.C* {{.*}}){{( #[0-9])?}}, !dbg ![[RET:[0-9]+]]
+// CHECK: call void @_ZN1CD1Ev(ptr {{.*}}){{( #[0-9])?}}, !dbg ![[RET:[0-9]+]]
 // CHECK: ret i32 0, !dbg ![[RET]]
 
 // CHECK: define {{.*}}bar

diff  --git a/clang/test/CodeGenCXX/linetable-eh.cpp b/clang/test/CodeGenCXX/linetable-eh.cpp
index cf98e76887e80..13be13468f047 100644
--- a/clang/test/CodeGenCXX/linetable-eh.cpp
+++ b/clang/test/CodeGenCXX/linetable-eh.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-macosx10.9.0 -funwind-tables=2 -std=c++11 -fcxx-exceptions -fexceptions %s -o - | FileCheck -allow-deprecated-dag-overlap %s
+// RUN: %clang_cc1 -emit-llvm -debug-info-kind=limited -gno-column-info -triple x86_64-apple-macosx10.9.0 -funwind-tables=2 -std=c++11 -fcxx-exceptions -fexceptions %s -o - | FileCheck -allow-deprecated-dag-overlap %s
 
 // Test that emitting a landing pad does not affect the line table
 // entries for the code that triggered it.
@@ -6,7 +6,7 @@
 // CHECK: call void @llvm.dbg.declare
 // CHECK: call void @llvm.dbg.declare(metadata {{.*}}, metadata ![[CURRENT_ADDR:.*]], metadata !{{.*}}), !dbg ![[DBG1:.*]]
 // CHECK: unwind label %{{.*}}, !dbg ![[DBG1]]
-// CHECK: store i64 %{{.*}}, i64* %current_address, align 8, !dbg ![[DBG4:.*]]
+// CHECK: store i64 %{{.*}}, ptr %current_address, align 8, !dbg ![[DBG4:.*]]
 // CHECK-NEXT: call void @llvm.dbg.declare(metadata {{.*}}, metadata ![[FOUND_IT:.*]], metadata !{{.*}}), !dbg ![[DBG2:.*]]
 // CHECK: = landingpad
 // CHECK-NEXT: cleanup, !dbg ![[DBG3:.*]]

diff  --git a/clang/test/CodeGenCXX/linkage.cpp b/clang/test/CodeGenCXX/linkage.cpp
index 1daf9dcfb5f9b..2918f027f57af 100644
--- a/clang/test/CodeGenCXX/linkage.cpp
+++ b/clang/test/CodeGenCXX/linkage.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -emit-llvm -std=c++11 -O1 -disable-llvm-passes %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -std=c++11 -O1 -disable-llvm-passes %s -o - | FileCheck %s
 
 namespace test1 {
   // CHECK-DAG: define linkonce_odr void @_ZN5test11fIZNS_1gEvE1SEEvT_(
@@ -212,7 +212,7 @@ namespace test16 {
 
 namespace test17 {
   // CHECK-DAG: @_ZZN6test173fooILi42EEEPivE3bar = linkonce_odr
-  // CHECK-DAG: define weak_odr noundef i32* @_ZN6test173fooILi42EEEPiv(
+  // CHECK-DAG: define weak_odr noundef ptr @_ZN6test173fooILi42EEEPiv(
   template<int I>
   int *foo() {
     static int bar;

diff  --git a/clang/test/CodeGenCXX/m64-ptr.cpp b/clang/test/CodeGenCXX/m64-ptr.cpp
index a351b2e22cb65..c559a92033ae0 100644
--- a/clang/test/CodeGenCXX/m64-ptr.cpp
+++ b/clang/test/CodeGenCXX/m64-ptr.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple x86_64-apple-darwin -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-apple-darwin -o - | FileCheck %s
 
 // Make sure pointers are passed as pointers, not converted to int.
-// The first load should be of type i8** in either 32 or 64 bit mode.
+// The first load should be of type ptr in either 32 or 64 bit mode.
 // This formerly happened on x86-64, 7375899.
 
 class StringRef {
@@ -12,7 +12,7 @@ class StringRef {
 void foo(StringRef X);
 void bar(StringRef &A) {
 // CHECK: @_Z3barR9StringRef
-// CHECK: load i8*, i8**
+// CHECK: load ptr, ptr
   foo(A);
 // CHECK: ret void
 }

diff  --git a/clang/test/CodeGenCXX/mangle-abi-tag.cpp b/clang/test/CodeGenCXX/mangle-abi-tag.cpp
index 90bc95d054b05..91325c48c246d 100644
--- a/clang/test/CodeGenCXX/mangle-abi-tag.cpp
+++ b/clang/test/CodeGenCXX/mangle-abi-tag.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple %itanium_abi_triple -std=c++11 -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple i686-linux-gnu -std=c++11 -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple x86_64-linux-gnu -std=c++11 -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple powerpc64le-unknown-linux-gnu -std=c++11 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -std=c++11 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple i686-linux-gnu -std=c++11 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple x86_64-linux-gnu -std=c++11 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple powerpc64le-unknown-linux-gnu -std=c++11 -o - | FileCheck %s
 
 struct __attribute__((abi_tag("A", "B"))) A { };
 
@@ -145,7 +145,7 @@ void f13_test() {
   f13();
 }
 // f13()::L::foo[abi:C][abi:D]()
-// CHECK-DAG: define linkonce_odr {{(dso_local )?}}{{(noundef )?}}%struct.E* @_ZZ3f13vEN1L3fooB1CB1DEv(
+// CHECK-DAG: define linkonce_odr {{(dso_local )?}}{{(noundef )?}}ptr @_ZZ3f13vEN1L3fooB1CB1DEv(
 
 // f13()::L::foo[abi:C][abi:D]()::a[abi:A][abi:B]
 // CHECK-DAG: @_ZZZ3f13vEN1L3fooB1CB1DEvE1aB1AB1B =

diff  --git a/clang/test/CodeGenCXX/mangle-address-space.cpp b/clang/test/CodeGenCXX/mangle-address-space.cpp
index d2ed21c576b0d..d5294e3de4991 100644
--- a/clang/test/CodeGenCXX/mangle-address-space.cpp
+++ b/clang/test/CodeGenCXX/mangle-address-space.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s --check-prefixes=CHECK,CHECKNOOCL
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-windows-msvc -o - %s | FileCheck %s --check-prefixes=WIN,WINNOOCL
-// RUN: %clang_cc1 -no-opaque-pointers -cl-std=clc++ -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s --check-prefixes=CHECK,CHECKOCL
-// RUN: %clang_cc1 -no-opaque-pointers -cl-std=clc++ -emit-llvm -triple x86_64-windows-msvc -o - %s | FileCheck %s --check-prefixes=WIN,WINOCL
+// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s --check-prefixes=CHECK,CHECKNOOCL
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-windows-msvc -o - %s | FileCheck %s --check-prefixes=WIN,WINNOOCL
+// RUN: %clang_cc1 -cl-std=clc++ -emit-llvm -triple %itanium_abi_triple -o - %s | FileCheck %s --check-prefixes=CHECK,CHECKOCL
+// RUN: %clang_cc1 -cl-std=clc++ -emit-llvm -triple x86_64-windows-msvc -o - %s | FileCheck %s --check-prefixes=WIN,WINOCL
 
 // CHECKNOOCL-LABEL: define {{.*}}void @_Z2f0Pc
 // WINNOOCL-LABEL: define {{.*}}void @"?f0@@YAXPEAD at Z"
@@ -24,8 +24,8 @@ void f0(OpaqueTypePtr) { }
 void f1(char __attribute__((address_space(1))) const *p) {}
 
 // Ensure we can do return values, which change in MS mode.
-// CHECK-LABEL: define {{.*}}float addrspace(1)* @_Z2f1PU3AS2Kc
-// WIN-LABEL: define {{.*}}float addrspace(1)* @"?f1@@YAPEAU?$_AS@$00$$CAM at __clang@@PEAU?$_AS@$01$$CBD at 2@@Z"
+// CHECK-LABEL: define {{.*}}ptr addrspace(1) @_Z2f1PU3AS2Kc
+// WIN-LABEL: define {{.*}}ptr addrspace(1) @"?f1@@YAPEAU?$_AS@$00$$CAM at __clang@@PEAU?$_AS@$01$$CBD at 2@@Z"
 __attribute__((address_space(1))) float *f1(char __attribute__((address_space(2))) const *p) { return 0;}
 
 #if !defined(__OPENCL_CPP_VERSION__)
@@ -57,13 +57,13 @@ void ocl_f0(ocl_OpaqueTypePtr) { }
 void ocl_f1(char __constant const *p) {}
 
 // Ensure we can do return values, which change in MS mode.
-// CHECKOCL-LABEL: define {{.*}}float* @_Z6ocl_f1PU9CLgenericKc
-// WINOCL-LABEL: define {{.*}}float* @"?ocl_f1@@YAPEAU?$_ASCLconstant@$$CAM at __clang@@PEAU?$_ASCLgeneric@$$CBD at 2@@Z"
+// CHECKOCL-LABEL: define {{.*}}ptr @_Z6ocl_f1PU9CLgenericKc
+// WINOCL-LABEL: define {{.*}}ptr @"?ocl_f1@@YAPEAU?$_ASCLconstant@$$CAM at __clang@@PEAU?$_ASCLgeneric@$$CBD at 2@@Z"
 __constant float *ocl_f1(char __generic const *p) { return 0;}
 
 // Ensure we skip return values, since non-pointers aren't supposed to have an AS.
-// CHECKOCL-LABEL: define {{.*}}float* @_Z6ocl_f2PU9CLgenericKc
-// WINOCL-LABEL: define {{.*}}float* @"?ocl_f2@@YAPEAU?$_ASCLgeneric@$$CAM at __clang@@QEAU?$_ASCLgeneric@$$CBD at 2@@Z"
+// CHECKOCL-LABEL: define {{.*}}ptr @_Z6ocl_f2PU9CLgenericKc
+// WINOCL-LABEL: define {{.*}}ptr @"?ocl_f2@@YAPEAU?$_ASCLgeneric@$$CAM at __clang@@QEAU?$_ASCLgeneric@$$CBD at 2@@Z"
 __generic float *ocl_f2(__generic char const * const p) { return 0;}
 
 // CHECKOCL-LABEL: define {{.*}}void @_Z6ocl_f3PU6CLhost14ocl_OpaqueType

diff  --git a/clang/test/CodeGenCXX/mangle-exprs.cpp b/clang/test/CodeGenCXX/mangle-exprs.cpp
index 036ee254dbfb2..e7008eee4643d 100644
--- a/clang/test/CodeGenCXX/mangle-exprs.cpp
+++ b/clang/test/CodeGenCXX/mangle-exprs.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
 
 namespace std {
   typedef decltype(sizeof(int)) size_t;
@@ -165,7 +165,7 @@ namespace test2 {
     i<float(*)()>(baz);
   }
 
-  // CHECK: store float {{.*}}, float* @_ZZN5test21gIPFfvEEEvT_DTclfL0p_EEE8variable,
+  // CHECK: store float {{.*}}, ptr @_ZZN5test21gIPFfvEEEvT_DTclfL0p_EEE8variable,
 }
 
 namespace test3 {

diff  --git a/clang/test/CodeGenCXX/mangle-lambdas.cpp b/clang/test/CodeGenCXX/mangle-lambdas.cpp
index 063b9890b0578..b4312a0fdfe27 100644
--- a/clang/test/CodeGenCXX/mangle-lambdas.cpp
+++ b/clang/test/CodeGenCXX/mangle-lambdas.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-macosx10.7.0 -emit-llvm -o - %s -w | FileCheck %s
 
 // CHECK-LABEL: define linkonce_odr void @_Z11inline_funci
 inline void inline_func(int n) {
@@ -26,7 +26,7 @@ void call_inline_func() {
   inline_func(17);
 }
 
-// CHECK-LABEL: define linkonce_odr noundef i32* @_ZNK10inline_varMUlvE_clEv(
+// CHECK-LABEL: define linkonce_odr noundef ptr @_ZNK10inline_varMUlvE_clEv(
 // CHECK: @_ZZNK10inline_varMUlvE_clEvE1n
 inline auto inline_var = [] {
   static int n = 5;
@@ -35,7 +35,7 @@ inline auto inline_var = [] {
 
 int *use_inline_var = inline_var();
 
-// CHECK-LABEL: define linkonce_odr noundef i32* @_ZNK12var_templateIiEMUlvE_clEv(
+// CHECK-LABEL: define linkonce_odr noundef ptr @_ZNK12var_templateIiEMUlvE_clEv(
 // CHECK: @_ZZNK12var_templateIiEMUlvE_clEvE1n
 template<typename T> auto var_template = [] {
   static int n = 9;
@@ -162,7 +162,7 @@ template float StaticMembers<float>::z;
 
 // CHECK-LABEL: define internal void @__cxx_global_var_init
 // CHECK: call {{.*}} @_ZNK13StaticMembersIfE1fMUlvE_cvPFivEEv
-// CHECK-LABEL: define linkonce_odr noundef i32 ()* @_ZNK13StaticMembersIfE1fMUlvE_cvPFivEEv
+// CHECK-LABEL: define linkonce_odr noundef ptr @_ZNK13StaticMembersIfE1fMUlvE_cvPFivEEv
 template int (*StaticMembers<float>::f)();
 
 // CHECK-LABEL: define internal void @__cxx_global_var_init
@@ -196,9 +196,9 @@ namespace PR12123 {
   void B::h() { f(); j(); }
 }
 
-// CHECK-LABEL: define linkonce_odr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %"struct.PR12123::A"* @_ZZN7PR121231B1fERKSt9type_infoEd_NKUlvE_clEv
-// CHECK-LABEL: define linkonce_odr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %"struct.PR12123::A"* @_ZZN7PR121231B1jEbEd_NKUlvE_clEv
-// CHECK-LABEL: define linkonce_odr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %"struct.PR12123::C"* @_ZZN7PR121231B1jEbEd_NKUlvE0_clEv
+// CHECK-LABEL: define linkonce_odr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZZN7PR121231B1fERKSt9type_infoEd_NKUlvE_clEv
+// CHECK-LABEL: define linkonce_odr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZZN7PR121231B1jEbEd_NKUlvE_clEv
+// CHECK-LABEL: define linkonce_odr noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZZN7PR121231B1jEbEd_NKUlvE0_clEv
 
 // CHECK-LABEL: define {{.*}} @_Z{{[0-9]*}}testVarargsLambdaNumberingv(
 inline int testVarargsLambdaNumbering() {

diff  --git a/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp b/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
index 2f59057506ead..312c70cc740eb 100644
--- a/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
+++ b/clang/test/CodeGenCXX/mangle-ms-cxx11.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 -fms-compatibility-version=19.00 | FileCheck %s --check-prefix=CHECK --check-prefix=MSVC2015
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 -fms-compatibility-version=18.00 | FileCheck %s --check-prefix=CHECK --check-prefix=MSVC2013
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 -gcodeview -debug-info-kind=limited | FileCheck %s --check-prefix=DBG
+// RUN: %clang_cc1 -std=c++11 -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 -fms-compatibility-version=19.00 | FileCheck %s --check-prefix=CHECK --check-prefix=MSVC2015
+// RUN: %clang_cc1 -std=c++11 -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 -fms-compatibility-version=18.00 | FileCheck %s --check-prefix=CHECK --check-prefix=MSVC2013
+// RUN: %clang_cc1 -std=c++11 -fms-extensions -emit-llvm %s -o - -triple=i386-pc-win32 -gcodeview -debug-info-kind=limited | FileCheck %s --check-prefix=DBG
 
 namespace FTypeWithQuals {
 template <typename T>
@@ -323,13 +323,13 @@ void unaligned_foo8_S::unaligned_foo8() volatile __unaligned {}
 
 namespace PR31197 {
 struct A {
-  // CHECK-DAG: define linkonce_odr dso_local x86_thiscallcc noundef i32* @"??R<lambda_1>@x at A@PR31197@@QBE at XZ"(
+  // CHECK-DAG: define linkonce_odr dso_local x86_thiscallcc noundef ptr @"??R<lambda_1>@x at A@PR31197@@QBE at XZ"(
   int *x = []() {
     static int white;
     // CHECK-DAG: @"?white@?1???R<lambda_1>@x at A@PR31197@@QBE at XZ@4HA"
     return &white;
   }();
-  // CHECK-DAG: define linkonce_odr dso_local x86_thiscallcc noundef i32* @"??R<lambda_1>@y at A@PR31197@@QBE at XZ"(
+  // CHECK-DAG: define linkonce_odr dso_local x86_thiscallcc noundef ptr @"??R<lambda_1>@y at A@PR31197@@QBE at XZ"(
   int *y = []() {
     static int black;
     // CHECK-DAG: @"?black@?1???R<lambda_1>@y at A@PR31197@@QBE at XZ@4HA"

diff  --git a/clang/test/CodeGenCXX/mangle-ms-templates-memptrs-2.cpp b/clang/test/CodeGenCXX/mangle-ms-templates-memptrs-2.cpp
index 3deb82d8973c1..43f37c32f84ae 100644
--- a/clang/test/CodeGenCXX/mangle-ms-templates-memptrs-2.cpp
+++ b/clang/test/CodeGenCXX/mangle-ms-templates-memptrs-2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -Wno-microsoft -fms-extensions -fno-rtti -std=c++11 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -Wno-microsoft -fms-extensions -fno-rtti -std=c++11 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
 
 template <typename T, int (T::*)() = nullptr>
 struct J {};
@@ -57,4 +57,4 @@ template struct ClassTemplate<&MostGeneral::h>;
 
 // Test that we mangle in the vbptr offset, which is 12 here.
 //
-// CHECK: define weak_odr dso_local x86_thiscallcc noundef %struct.ClassTemplate* @"??0?$ClassTemplate@$J??_9MostGeneral@@$BA at AEA@M at 3@@QAE at XZ"
+// CHECK: define weak_odr dso_local x86_thiscallcc noundef ptr @"??0?$ClassTemplate@$J??_9MostGeneral@@$BA at AEA@M at 3@@QAE at XZ"

diff  --git a/clang/test/CodeGenCXX/mangle-ptr-size-address-space.cpp b/clang/test/CodeGenCXX/mangle-ptr-size-address-space.cpp
index 45c83048afbc2..d175cb58f714e 100644
--- a/clang/test/CodeGenCXX/mangle-ptr-size-address-space.cpp
+++ b/clang/test/CodeGenCXX/mangle-ptr-size-address-space.cpp
@@ -1,18 +1,18 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s --check-prefixes=CHECK
-// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -emit-llvm -triple x86_64-windows-msvc -o - %s | FileCheck %s --check-prefixes=WIN
+// RUN: %clang_cc1 -fms-extensions -emit-llvm -triple x86_64-linux-gnu -o - %s | FileCheck %s --check-prefixes=CHECK
+// RUN: %clang_cc1 -fms-extensions -emit-llvm -triple x86_64-windows-msvc -o - %s | FileCheck %s --check-prefixes=WIN
 
 // CHECK-LABEL: define {{.*}}void @_Z2f0PU10ptr32_sptri
 // WIN-LABEL: define {{.*}}void @"?f0@@YAXPAH at Z"
 void f0(int * __ptr32 p) {}
 
-// CHECK-LABEL: define {{.*}}i8 addrspace(271)* @_Z2f1PU10ptr32_sptri
-// WIN-LABEL: define {{.*}}i8 addrspace(271)* @"?f1@@YAPAXPAH at Z"
+// CHECK-LABEL: define {{.*}}ptr addrspace(271) @_Z2f1PU10ptr32_sptri
+// WIN-LABEL: define {{.*}}ptr addrspace(271) @"?f1@@YAPAXPAH at Z"
 void * __ptr32 __uptr f1(int * __ptr32 p) { return 0; }
 
 // CHECK-LABEL: define {{.*}}void @_Z2f2Pi
 // WIN-LABEL: define {{.*}}void @"?f2@@YAXPEAH at Z"
 void f2(int * __ptr64 p) {}
 
-// CHECK-LABEL: define {{.*}}i8* @_Z2f3Pi
-// WIN-LABEL: define {{.*}}i8* @"?f3@@YAPEAXPEAH at Z"
+// CHECK-LABEL: define {{.*}}ptr @_Z2f3Pi
+// WIN-LABEL: define {{.*}}ptr @"?f3@@YAPEAXPEAH at Z"
 void * __ptr64 f3(int * __ptr64 p) { return 0; }

diff  --git a/clang/test/CodeGenCXX/mangle-subst-std.cpp b/clang/test/CodeGenCXX/mangle-subst-std.cpp
index bf831c5311d0e..da654bb9d9d0d 100644
--- a/clang/test/CodeGenCXX/mangle-subst-std.cpp
+++ b/clang/test/CodeGenCXX/mangle-subst-std.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 | FileCheck %s
 
 // Check mangling of Vtables, VTTs, and construction vtables that
 // involve standard substitutions.
@@ -16,8 +16,8 @@
 namespace std {
   struct A { A(); };
   
-  // CHECK-LABEL: define{{.*}} void @_ZNSt1AC2Ev(%"struct.std::A"* {{[^,]*}} %this) unnamed_addr
-  // CHECK-LABEL: define{{.*}} void @_ZNSt1AC1Ev(%"struct.std::A"* {{[^,]*}} %this) unnamed_addr
+  // CHECK-LABEL: define{{.*}} void @_ZNSt1AC2Ev(ptr {{[^,]*}} %this) unnamed_addr
+  // CHECK-LABEL: define{{.*}} void @_ZNSt1AC1Ev(ptr {{[^,]*}} %this) unnamed_addr
   A::A() { }
 };
 

diff  --git a/clang/test/CodeGenCXX/mangle-win-ccs.cpp b/clang/test/CodeGenCXX/mangle-win-ccs.cpp
index ecc5f641ffcee..8b3e67b918eba 100644
--- a/clang/test/CodeGenCXX/mangle-win-ccs.cpp
+++ b/clang/test/CodeGenCXX/mangle-win-ccs.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple i686-windows-gnu -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple i686-windows-itanium -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple i686-windows-gnu -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple i686-windows-itanium -o - | FileCheck %s
 
 // GCC 5.1 began mangling these Windows calling conventions into function
 // types, since they can be used for overloading. They've always been mangled
@@ -19,22 +19,22 @@ int as_stdcall() { return func_as_ptr(f_stdcall); }
 int as_fastcall() { return func_as_ptr(f_fastcall); }
 
 // CHECK: define dso_local noundef i32 @_Z8as_cdeclv()
-// CHECK:   call noundef i32 @_ZL11func_as_ptrIPFviiEEiT_(void (i32, i32)* noundef @_Z7f_cdeclii)
+// CHECK:   call noundef i32 @_ZL11func_as_ptrIPFviiEEiT_(ptr noundef @_Z7f_cdeclii)
 
 // CHECK: define dso_local noundef i32 @_Z10as_stdcallv()
-// CHECK:   call noundef i32 @_ZL11func_as_ptrIPU7stdcallFviiEEiT_(void (i32, i32)* noundef @"\01__Z9f_stdcallii at 8")
+// CHECK:   call noundef i32 @_ZL11func_as_ptrIPU7stdcallFviiEEiT_(ptr noundef @"\01__Z9f_stdcallii at 8")
 
 // CHECK: define dso_local noundef i32 @_Z11as_fastcallv()
-// CHECK:   call noundef i32 @_ZL11func_as_ptrIPU8fastcallFviiEEiT_(void (i32, i32)* noundef @"\01 at _Z10f_fastcallii@8")
+// CHECK:   call noundef i32 @_ZL11func_as_ptrIPU8fastcallFviiEEiT_(ptr noundef @"\01 at _Z10f_fastcallii@8")
 
 // PR40107: We should mangle thiscall here but we don't because we can't
 // disambiguate it from the member pointer case below where it shouldn't be
 // mangled.
 //int as_thiscall() { return func_as_ptr(f_thiscall); }
 // CHECKX: define dso_local i32 @_Z11as_thiscallv()
-// CHECKX:   call i32 @_ZL11func_as_ptrIPU8thiscallFviiEEiT_(void (i32, i32)* @_Z10f_thiscallii)
+// CHECKX:   call i32 @_ZL11func_as_ptrIPU8thiscallFviiEEiT_(ptr @_Z10f_thiscallii)
 
-// CHECK: define dso_local void @_Z11funcRefTypeRU8fastcallFviiE(void (i32, i32)* noundef nonnull %fr)
+// CHECK: define dso_local void @_Z11funcRefTypeRU8fastcallFviiE(ptr noundef nonnull %fr)
 void funcRefType(void(__attribute__((fastcall)) & fr)(int, int)) {
   fr(1, 2);
 }
@@ -43,16 +43,16 @@ struct Foo { void bar(int, int); };
 
 // PR40107: In this case, the member function pointer uses the thiscall
 // convention, but GCC doesn't mangle it, so we don't either.
-// CHECK: define dso_local void @_Z15memptr_thiscallP3FooMS_FvvE(%struct.Foo* {{.*}})
+// CHECK: define dso_local void @_Z15memptr_thiscallP3FooMS_FvvE(ptr {{.*}})
 void memptr_thiscall(Foo *o, void (Foo::*mp)()) { (o->*mp)(); }
 
-// CHECK: define dso_local void @_Z12memptrCCTypeR3FooMS_U8fastcallFviiE(%struct.Foo* {{.*}}, { i32, i32 }* noundef byval{{.*}})
+// CHECK: define dso_local void @_Z12memptrCCTypeR3FooMS_U8fastcallFviiE(ptr {{.*}}, ptr noundef byval{{.*}})
 void memptrCCType(Foo &o, void (__attribute__((fastcall)) Foo::*mp)(int, int)) {
   (o.*mp)(1, 2);
 }
 
 // CHECK: define dso_local noundef i32 @_Z17useTemplateFnTypev()
-// CHECK:   call noundef i32 @_ZL14templateFnTypeIU8fastcallFviiEElPT_(void (i32, i32)* noundef @"\01 at _Z10f_fastcallii@8")
+// CHECK:   call noundef i32 @_ZL14templateFnTypeIU8fastcallFviiEElPT_(ptr noundef @"\01 at _Z10f_fastcallii@8")
 template <typename Fn> static long templateFnType(Fn *fn) { return long(fn); }
 long useTemplateFnType() { return templateFnType(f_fastcall); }
 
@@ -62,8 +62,8 @@ template <typename T> void __attribute__((fastcall)) fnTemplate() {}
 template void __attribute__((fastcall)) fnTemplate<short>();
 template <> void __attribute__((fastcall)) fnTemplate<int>() {}
 
-// CHECK: define weak_odr dso_local x86_fastcallcc noundef void (i32, i32)* @"\01 at _Z12fnTempReturnIsEPU8fastcallFviiEv@0"()
-// CHECK: define          dso_local x86_fastcallcc noundef void (i32, i32)* @"\01 at _Z12fnTempReturnIiEPU8fastcallFviiEv@0"()
+// CHECK: define weak_odr dso_local x86_fastcallcc noundef ptr @"\01 at _Z12fnTempReturnIsEPU8fastcallFviiEv@0"()
+// CHECK: define          dso_local x86_fastcallcc noundef ptr @"\01 at _Z12fnTempReturnIiEPU8fastcallFviiEv@0"()
 typedef void (__attribute__((fastcall)) *fp_cc_t)(int, int);
 template <typename T> fp_cc_t __attribute__((fastcall)) fnTempReturn() { return nullptr; }
 template fp_cc_t __attribute__((fastcall)) fnTempReturn<short>();

diff  --git a/clang/test/CodeGenCXX/mangle-win64-ccs.cpp b/clang/test/CodeGenCXX/mangle-win64-ccs.cpp
index 2196afdb6ae7b..6ab7d13ef6f26 100644
--- a/clang/test/CodeGenCXX/mangle-win64-ccs.cpp
+++ b/clang/test/CodeGenCXX/mangle-win64-ccs.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-gnu -o - -emit-llvm %s | FileCheck %s -check-prefix CHECK-WIN
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-gnu -o - -emit-llvm %s | FileCheck %s -check-prefix CHECK-LIN
+// RUN: %clang_cc1 -triple x86_64-windows-gnu -o - -emit-llvm %s | FileCheck %s -check-prefix CHECK-WIN
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -o - -emit-llvm %s | FileCheck %s -check-prefix CHECK-LIN
 
 typedef __PTRDIFF_TYPE__ ptr
diff _t;
 template <typename FTy> ptr
diff _t func_as_int(FTy *fp) { return ptr
diff _t(fp); }
@@ -16,11 +16,11 @@ ptr
diff _t useThem() {
 }
 
 // CHECK-WIN: define dso_local noundef i64 @_Z7useThemv()
-// CHECK-WIN:   call noundef i64 @_Z11func_as_intIFiiEExPT_(i32 (i32)* noundef @_Z7f_plaini)
-// CHECK-WIN:   call noundef i64 @_Z11func_as_intIU8sysv_abiFiiEExPT_(i32 (i32)* noundef @_Z9f_sysvabii)
-// CHECK-WIN:   call noundef i64 @_Z11func_as_intIFiiEExPT_(i32 (i32)* noundef @_Z7f_msabii)
+// CHECK-WIN:   call noundef i64 @_Z11func_as_intIFiiEExPT_(ptr noundef @_Z7f_plaini)
+// CHECK-WIN:   call noundef i64 @_Z11func_as_intIU8sysv_abiFiiEExPT_(ptr noundef @_Z9f_sysvabii)
+// CHECK-WIN:   call noundef i64 @_Z11func_as_intIFiiEExPT_(ptr noundef @_Z7f_msabii)
 
 // CHECK-LIN: define{{.*}} i64 @_Z7useThemv()
-// CHECK-LIN:   call noundef i64 @_Z11func_as_intIFiiEElPT_(i32 (i32)* noundef @_Z7f_plaini)
-// CHECK-LIN:   call noundef i64 @_Z11func_as_intIFiiEElPT_(i32 (i32)* noundef @_Z9f_sysvabii)
-// CHECK-LIN:   call noundef i64 @_Z11func_as_intIU6ms_abiFiiEElPT_(i32 (i32)* noundef @_Z7f_msabii)
+// CHECK-LIN:   call noundef i64 @_Z11func_as_intIFiiEElPT_(ptr noundef @_Z7f_plaini)
+// CHECK-LIN:   call noundef i64 @_Z11func_as_intIFiiEElPT_(ptr noundef @_Z9f_sysvabii)
+// CHECK-LIN:   call noundef i64 @_Z11func_as_intIU6ms_abiFiiEElPT_(ptr noundef @_Z7f_msabii)

diff  --git a/clang/test/CodeGenCXX/mangle.cpp b/clang/test/CodeGenCXX/mangle.cpp
index 84315591a4977..75c9966fb807a 100644
--- a/clang/test/CodeGenCXX/mangle.cpp
+++ b/clang/test/CodeGenCXX/mangle.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -fblocks -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-apple-darwin9 -fblocks -std=c++11 | FileCheck %s
 struct X { };
 struct Y { };
 
@@ -280,13 +280,13 @@ struct Ops {
   void *v;
 };
 
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsplERKS_
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN3OpsplERKS_
 Ops& Ops::operator+(const Ops&) { return *this; }
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsmiERKS_
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN3OpsmiERKS_
 Ops& Ops::operator-(const Ops&) { return *this; }
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsanERKS_
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN3OpsanERKS_
 Ops& Ops::operator&(const Ops&) { return *this; }
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.Ops* @_ZN3OpsmlERKS_
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN3OpsmlERKS_
 Ops& Ops::operator*(const Ops&) { return *this; }
 
 // PR5861
@@ -302,7 +302,7 @@ template<typename T, typename = Policy<P, true> > class Alloc
   T *allocate(int, const void*) { return 0; }
 };
 
-// CHECK-LABEL: define weak_odr noundef i8* @_ZN6PR58615AllocIcNS_6PolicyINS_1PELb1EEEE8allocateEiPKv
+// CHECK-LABEL: define weak_odr noundef ptr @_ZN6PR58615AllocIcNS_6PolicyINS_1PELb1EEEE8allocateEiPKv
 template class Alloc<char>;
 }
 
@@ -522,7 +522,7 @@ namespace test14 {
       static int a(), x;
     };
     // CHECK-LABEL: define{{.*}} i32 @_ZN6test141S1aEv
-    // CHECK: load i32, i32* @_ZN6test141S1xE
+    // CHECK: load i32, ptr @_ZN6test141S1xE
     int S::a() { return S::x; }
   }
 }
@@ -900,7 +900,7 @@ namespace test39 {
 }
 
 namespace test40 {
-  // CHECK: i32* {{.*}} @_ZZN6test401fEvE1a_0
+  // CHECK: ptr {{.*}} @_ZZN6test401fEvE1a_0
   void h(int&);
   inline void f() {
     if (0) {
@@ -950,7 +950,7 @@ namespace test44 {
   void f() {
     obj.bar();
   }
-  // CHECK-LABEL: define linkonce_odr void @_ZN6test443foo3barEv(%"struct.test44::foo"* {{[^,]*}} %this)
+  // CHECK-LABEL: define linkonce_odr void @_ZN6test443foo3barEv(ptr {{[^,]*}} %this)
 }
 
 namespace test45 {
@@ -960,7 +960,7 @@ namespace test45 {
   template <typename T>
   void f(enum T::e *) {}
   template void f<S>(S::e *);
-  // CHECK-LABEL: define weak_odr void @_ZN6test451fINS_1SEEEvPTeNT_1eE(i32* noundef %0)
+  // CHECK-LABEL: define weak_odr void @_ZN6test451fINS_1SEEEvPTeNT_1eE(ptr noundef %0)
 }
 
 namespace test46 {
@@ -970,7 +970,7 @@ namespace test46 {
   template <typename T>
   void f(struct T::s *) {}
   template void f<S>(S::s *);
-  // CHECK-LABEL: define weak_odr void @_ZN6test461fINS_1SEEEvPTsNT_1sE(%"struct.test46::S::s"* noundef %0)
+  // CHECK-LABEL: define weak_odr void @_ZN6test461fINS_1SEEEvPTsNT_1sE(ptr noundef %0)
 }
 
 namespace test47 {
@@ -980,7 +980,7 @@ namespace test47 {
   template <typename T>
   void f(class T::c *) {}
   template void f<S>(S::c *);
-  // CHECK-LABEL: define weak_odr void @_ZN6test471fINS_1SEEEvPTsNT_1cE(%"class.test47::S::c"* noundef %0)
+  // CHECK-LABEL: define weak_odr void @_ZN6test471fINS_1SEEEvPTsNT_1cE(ptr noundef %0)
 }
 
 namespace test48 {
@@ -990,7 +990,7 @@ namespace test48 {
   template <typename T>
   void f(union T::u *) {}
   template void f<S>(S::u *);
-  // CHECK-LABEL: define weak_odr void @_ZN6test481fINS_1SEEEvPTuNT_1uE(%"union.test48::S::u"* noundef %0)
+  // CHECK-LABEL: define weak_odr void @_ZN6test481fINS_1SEEEvPTuNT_1uE(ptr noundef %0)
 }
 
 namespace test49 {

diff  --git a/clang/test/CodeGenCXX/matrix-type-operators.cpp b/clang/test/CodeGenCXX/matrix-type-operators.cpp
index 379cef511ec8f..db10e2d9ce41d 100644
--- a/clang/test/CodeGenCXX/matrix-type-operators.cpp
+++ b/clang/test/CodeGenCXX/matrix-type-operators.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -O0 -fenable-matrix -triple x86_64-apple-darwin %s -emit-llvm -disable-llvm-passes -o - -std=c++11 | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -O1 -fenable-matrix -triple x86_64-apple-darwin %s -emit-llvm -disable-llvm-passes -o - -std=c++11 | FileCheck --check-prefixes=CHECK,OPT %s
+// RUN: %clang_cc1 -O0 -fenable-matrix -triple x86_64-apple-darwin %s -emit-llvm -disable-llvm-passes -o - -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 -O1 -fenable-matrix -triple x86_64-apple-darwin %s -emit-llvm -disable-llvm-passes -o - -std=c++11 | FileCheck --check-prefixes=CHECK,OPT %s
 
 typedef double dx5x5_t __attribute__((matrix_type(5, 5)));
 using fx2x3_t = float __attribute__((matrix_type(2, 3)));
@@ -18,11 +18,11 @@ typename MyMatrix<EltTy0, R0, C0>::matrix_t add(MyMatrix<EltTy0, R0, C0> &A, MyM
 
 void test_add_template() {
   // CHECK-LABEL: define{{.*}} void @_Z17test_add_templatev()
-  // CHECK:       %call = call noundef <10 x float> @_Z3addIfLj2ELj5EEN8MyMatrixIT_XT0_EXT1_EE8matrix_tERS2_S4_(%struct.MyMatrix* noundef nonnull align 4 dereferenceable(40) %Mat1, %struct.MyMatrix* noundef nonnull align 4 dereferenceable(40) %Mat2)
+  // CHECK:       %call = call noundef <10 x float> @_Z3addIfLj2ELj5EEN8MyMatrixIT_XT0_EXT1_EE8matrix_tERS2_S4_(ptr noundef nonnull align 4 dereferenceable(40) %Mat1, ptr noundef nonnull align 4 dereferenceable(40) %Mat2)
 
   // CHECK-LABEL: define linkonce_odr noundef <10 x float> @_Z3addIfLj2ELj5EEN8MyMatrixIT_XT0_EXT1_EE8matrix_tERS2_S4_(
-  // CHECK:       [[MAT1:%.*]] = load <10 x float>, <10 x float>* {{.*}}, align 4
-  // CHECK:       [[MAT2:%.*]] = load <10 x float>, <10 x float>* {{.*}}, align 4
+  // CHECK:       [[MAT1:%.*]] = load <10 x float>, ptr {{.*}}, align 4
+  // CHECK:       [[MAT2:%.*]] = load <10 x float>, ptr {{.*}}, align 4
   // CHECK-NEXT:  [[RES:%.*]] = fadd <10 x float> [[MAT1]], [[MAT2]]
   // CHECK-NEXT:  ret <10 x float> [[RES]]
 
@@ -38,11 +38,11 @@ typename MyMatrix<EltTy0, R0, C0>::matrix_t subtract(MyMatrix<EltTy0, R0, C0> &A
 
 void test_subtract_template() {
   // CHECK-LABEL: define{{.*}} void @_Z22test_subtract_templatev()
-  // CHECK:       %call = call noundef <10 x float> @_Z8subtractIfLj2ELj5EEN8MyMatrixIT_XT0_EXT1_EE8matrix_tERS2_S4_(%struct.MyMatrix* noundef nonnull align 4 dereferenceable(40) %Mat1, %struct.MyMatrix* noundef nonnull align 4 dereferenceable(40) %Mat2)
+  // CHECK:       %call = call noundef <10 x float> @_Z8subtractIfLj2ELj5EEN8MyMatrixIT_XT0_EXT1_EE8matrix_tERS2_S4_(ptr noundef nonnull align 4 dereferenceable(40) %Mat1, ptr noundef nonnull align 4 dereferenceable(40) %Mat2)
 
   // CHECK-LABEL: define linkonce_odr noundef <10 x float> @_Z8subtractIfLj2ELj5EEN8MyMatrixIT_XT0_EXT1_EE8matrix_tERS2_S4_(
-  // CHECK:       [[MAT1:%.*]] = load <10 x float>, <10 x float>* {{.*}}, align 4
-  // CHECK:       [[MAT2:%.*]] = load <10 x float>, <10 x float>* {{.*}}, align 4
+  // CHECK:       [[MAT1:%.*]] = load <10 x float>, ptr {{.*}}, align 4
+  // CHECK:       [[MAT2:%.*]] = load <10 x float>, ptr {{.*}}, align 4
   // CHECK-NEXT:  [[RES:%.*]] = fsub <10 x float> [[MAT1]], [[MAT2]]
   // CHECK-NEXT:  ret <10 x float> [[RES]]
 
@@ -60,12 +60,12 @@ struct DoubleWrapper1 {
 
 void test_DoubleWrapper1_Sub1(MyMatrix<double, 10, 9> &m) {
   // CHECK-LABEL: define{{.*}} void @_Z24test_DoubleWrapper1_Sub1R8MyMatrixIdLj10ELj9EE(
-  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, <90 x double>* {{.*}}, align 8
-  // CHECK:       [[SCALAR:%.*]] = call noundef double @_ZN14DoubleWrapper1cvdEv(%struct.DoubleWrapper1* {{[^,]*}} %w1)
+  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, ptr {{.*}}, align 8
+  // CHECK:       [[SCALAR:%.*]] = call noundef double @_ZN14DoubleWrapper1cvdEv(ptr {{[^,]*}} %w1)
   // CHECK-NEXT:  [[SCALAR_EMBED:%.*]] = insertelement <90 x double> poison, double [[SCALAR]], i32 0
   // CHECK-NEXT:  [[SCALAR_EMBED1:%.*]] = shufflevector <90 x double> [[SCALAR_EMBED]], <90 x double> poison, <90 x i32> zeroinitializer
   // CHECK-NEXT:  [[RES:%.*]] = fsub <90 x double> [[MATRIX]], [[SCALAR_EMBED1]]
-  // CHECK:       store <90 x double> [[RES]], <90 x double>* {{.*}}, align 8
+  // CHECK:       store <90 x double> [[RES]], ptr {{.*}}, align 8
 
   DoubleWrapper1 w1;
   w1.x = 10;
@@ -74,12 +74,12 @@ void test_DoubleWrapper1_Sub1(MyMatrix<double, 10, 9> &m) {
 
 void test_DoubleWrapper1_Sub2(MyMatrix<double, 10, 9> &m) {
   // CHECK-LABEL: define{{.*}} void @_Z24test_DoubleWrapper1_Sub2R8MyMatrixIdLj10ELj9EE(
-  // CHECK:       [[SCALAR:%.*]] = call noundef double @_ZN14DoubleWrapper1cvdEv(%struct.DoubleWrapper1* {{[^,]*}} %w1)
-  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, <90 x double>* {{.*}}, align 8
+  // CHECK:       [[SCALAR:%.*]] = call noundef double @_ZN14DoubleWrapper1cvdEv(ptr {{[^,]*}} %w1)
+  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, ptr {{.*}}, align 8
   // CHECK-NEXT:  [[SCALAR_EMBED:%.*]] = insertelement <90 x double> poison, double [[SCALAR]], i32 0
   // CHECK-NEXT:  [[SCALAR_EMBED1:%.*]] = shufflevector <90 x double> [[SCALAR_EMBED]], <90 x double> poison, <90 x i32> zeroinitializer
   // CHECK-NEXT:  [[RES:%.*]] = fsub <90 x double> [[SCALAR_EMBED1]], [[MATRIX]]
-  // CHECK:       store <90 x double> [[RES]], <90 x double>* {{.*}}, align 8
+  // CHECK:       store <90 x double> [[RES]], ptr {{.*}}, align 8
 
   DoubleWrapper1 w1;
   w1.x = 10;
@@ -95,12 +95,12 @@ struct DoubleWrapper2 {
 
 void test_DoubleWrapper2_Add1(MyMatrix<double, 10, 9> &m) {
   // CHECK-LABEL: define{{.*}} void @_Z24test_DoubleWrapper2_Add1R8MyMatrixIdLj10ELj9EE(
-  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, <90 x double>* {{.+}}, align 8
-  // CHECK:       [[SCALAR:%.*]] = call noundef double @_ZN14DoubleWrapper2cvdEv(%struct.DoubleWrapper2* {{[^,]*}} %w2)
+  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, ptr {{.+}}, align 8
+  // CHECK:       [[SCALAR:%.*]] = call noundef double @_ZN14DoubleWrapper2cvdEv(ptr {{[^,]*}} %w2)
   // CHECK-NEXT:  [[SCALAR_EMBED:%.*]] = insertelement <90 x double> poison, double [[SCALAR]], i32 0
   // CHECK-NEXT:  [[SCALAR_EMBED1:%.*]] = shufflevector <90 x double> [[SCALAR_EMBED]], <90 x double> poison, <90 x i32> zeroinitializer
   // CHECK-NEXT:  [[RES:%.*]] = fadd <90 x double> [[MATRIX]], [[SCALAR_EMBED1]]
-  // CHECK:       store <90 x double> [[RES]], <90 x double>* {{.*}}, align 8
+  // CHECK:       store <90 x double> [[RES]], ptr {{.*}}, align 8
 
   DoubleWrapper2 w2;
   w2.x = 20;
@@ -109,12 +109,12 @@ void test_DoubleWrapper2_Add1(MyMatrix<double, 10, 9> &m) {
 
 void test_DoubleWrapper2_Add2(MyMatrix<double, 10, 9> &m) {
   // CHECK-LABEL: define{{.*}} void @_Z24test_DoubleWrapper2_Add2R8MyMatrixIdLj10ELj9EE(
-  // CHECK:       [[SCALAR:%.*]] = call noundef double @_ZN14DoubleWrapper2cvdEv(%struct.DoubleWrapper2* {{[^,]*}} %w2)
-  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, <90 x double>* {{.*}}, align 8
+  // CHECK:       [[SCALAR:%.*]] = call noundef double @_ZN14DoubleWrapper2cvdEv(ptr {{[^,]*}} %w2)
+  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, ptr {{.*}}, align 8
   // CHECK-NEXT:  [[SCALAR_EMBED:%.*]] = insertelement <90 x double> poison, double [[SCALAR]], i32 0
   // CHECK-NEXT:  [[SCALAR_EMBED1:%.*]] = shufflevector <90 x double> [[SCALAR_EMBED]], <90 x double> poison, <90 x i32> zeroinitializer
   // CHECK-NEXT:  [[RES:%.*]] = fadd <90 x double> [[SCALAR_EMBED1]], [[MATRIX]]
-  // CHECK:       store <90 x double> [[RES]], <90 x double>* {{.*}}, align 8
+  // CHECK:       store <90 x double> [[RES]], ptr {{.*}}, align 8
 
   DoubleWrapper2 w2;
   w2.x = 20;
@@ -130,13 +130,13 @@ struct IntWrapper {
 
 void test_IntWrapper_Add(MyMatrix<double, 10, 9> &m) {
   // CHECK-LABEL: define{{.*}} void @_Z19test_IntWrapper_AddR8MyMatrixIdLj10ELj9EE(
-  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, <90 x double>* {{.*}}, align 8
-  // CHECK:       [[SCALAR:%.*]] = call noundef i32 @_ZN10IntWrappercviEv(%struct.IntWrapper* {{[^,]*}} %w3)
+  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, ptr {{.*}}, align 8
+  // CHECK:       [[SCALAR:%.*]] = call noundef i32 @_ZN10IntWrappercviEv(ptr {{[^,]*}} %w3)
   // CHECK:       [[SCALAR_FP:%.*]] = sitofp i32 %call to double
   // CHECK-NEXT:  [[SCALAR_EMBED:%.*]] = insertelement <90 x double> poison, double [[SCALAR_FP]], i32 0
   // CHECK-NEXT:  [[SCALAR_EMBED1:%.*]] = shufflevector <90 x double> [[SCALAR_EMBED]], <90 x double> poison, <90 x i32> zeroinitializer
   // CHECK-NEXT:  [[RES:%.*]] = fadd <90 x double> [[MATRIX]], [[SCALAR_EMBED1]]
-  // CHECK:       store <90 x double> [[RES]], <90 x double>* {{.*}}, align 8
+  // CHECK:       store <90 x double> [[RES]], ptr {{.*}}, align 8
 
   IntWrapper w3;
   w3.x = 'c';
@@ -145,13 +145,13 @@ void test_IntWrapper_Add(MyMatrix<double, 10, 9> &m) {
 
 void test_IntWrapper_Sub(MyMatrix<double, 10, 9> &m) {
   // CHECK-LABEL: define{{.*}} void @_Z19test_IntWrapper_SubR8MyMatrixIdLj10ELj9EE(
-  // CHECK:       [[SCALAR:%.*]] = call noundef i32 @_ZN10IntWrappercviEv(%struct.IntWrapper* {{[^,]*}} %w3)
+  // CHECK:       [[SCALAR:%.*]] = call noundef i32 @_ZN10IntWrappercviEv(ptr {{[^,]*}} %w3)
   // CHECK-NEXT:  [[SCALAR_FP:%.*]] = sitofp i32 %call to double
-  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, <90 x double>* {{.*}}, align 8
+  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, ptr {{.*}}, align 8
   // CHECK-NEXT:  [[SCALAR_EMBED:%.*]] = insertelement <90 x double> poison, double [[SCALAR_FP]], i32 0
   // CHECK-NEXT:  [[SCALAR_EMBED1:%.*]] = shufflevector <90 x double> [[SCALAR_EMBED]], <90 x double> poison, <90 x i32> zeroinitializer
   // CHECK-NEXT:  [[RES:%.*]] = fsub <90 x double> [[SCALAR_EMBED1]], [[MATRIX]]
-  // CHECK:       store <90 x double> [[RES]], <90 x double>* {{.*}}, align 8
+  // CHECK:       store <90 x double> [[RES]], ptr {{.*}}, align 8
 
   IntWrapper w3;
   w3.x = 'c';
@@ -167,15 +167,14 @@ MyMatrix<float, 2, 2> test_multiply_template(MyMatrix<float, 2, 5> Mat1,
                                              MyMatrix<float, 5, 2> Mat2) {
   // CHECK-LABEL: define{{.*}} void @_Z22test_multiply_template8MyMatrixIfLj2ELj5EES_IfLj5ELj2EE(
   // CHECK-NEXT:  entry:
-  // CHECK-NEXT:    [[RES:%.*]] = call noundef <4 x float> @_Z8multiplyIfLj2ELj5ELj2EEN8MyMatrixIT_XT0_EXT2_EE8matrix_tERS0_IS1_XT0_EXT1_EERS0_IS1_XT1_EXT2_EE(%struct.MyMatrix* noundef nonnull align 4 dereferenceable(40) %Mat1, %struct.MyMatrix.2* noundef nonnull align 4 dereferenceable(40) %Mat2)
-  // CHECK-NEXT:    %value = getelementptr inbounds %struct.MyMatrix.1, %struct.MyMatrix.1* %agg.result, i32 0, i32 0
-  // CHECK-NEXT:    [[VALUE_ADDR:%.*]] = bitcast [4 x float]* %value to <4 x float>*
-  // CHECK-NEXT:    store <4 x float> [[RES]], <4 x float>* [[VALUE_ADDR]], align 4
+  // CHECK-NEXT:    [[RES:%.*]] = call noundef <4 x float> @_Z8multiplyIfLj2ELj5ELj2EEN8MyMatrixIT_XT0_EXT2_EE8matrix_tERS0_IS1_XT0_EXT1_EERS0_IS1_XT1_EXT2_EE(ptr noundef nonnull align 4 dereferenceable(40) %Mat1, ptr noundef nonnull align 4 dereferenceable(40) %Mat2)
+  // CHECK-NEXT:    %value = getelementptr inbounds %struct.MyMatrix.1, ptr %agg.result, i32 0, i32 0
+  // CHECK-NEXT:    store <4 x float> [[RES]], ptr %value, align 4
   // CHECK-NEXT:    ret void
   //
   // CHECK-LABEL:  define linkonce_odr noundef <4 x float> @_Z8multiplyIfLj2ELj5ELj2EEN8MyMatrixIT_XT0_EXT2_EE8matrix_tERS0_IS1_XT0_EXT1_EERS0_IS1_XT1_EXT2_EE(
-  // CHECK:         [[MAT1:%.*]] = load <10 x float>, <10 x float>* {{.*}}, align 4
-  // CHECK:         [[MAT2:%.*]] = load <10 x float>, <10 x float>* {{.*}}, align 4
+  // CHECK:         [[MAT1:%.*]] = load <10 x float>, ptr {{.*}}, align 4
+  // CHECK:         [[MAT2:%.*]] = load <10 x float>, ptr {{.*}}, align 4
   // CHECK-NEXT:    [[RES:%.*]] = call <4 x float> @llvm.matrix.multiply.v4f32.v10f32.v10f32(<10 x float> [[MAT1]], <10 x float> [[MAT2]], i32 2, i32 5, i32 2)
   // CHECK-NEXT:    ret <4 x float> [[RES]]
 
@@ -186,13 +185,13 @@ MyMatrix<float, 2, 2> test_multiply_template(MyMatrix<float, 2, 5> Mat1,
 
 void test_IntWrapper_Multiply(MyMatrix<double, 10, 9> &m, IntWrapper &w3) {
   // CHECK-LABEL: define{{.*}} void @_Z24test_IntWrapper_MultiplyR8MyMatrixIdLj10ELj9EER10IntWrapper(
-  // CHECK:       [[SCALAR:%.*]] = call noundef i32 @_ZN10IntWrappercviEv(%struct.IntWrapper* noundef {{.*}})
+  // CHECK:       [[SCALAR:%.*]] = call noundef i32 @_ZN10IntWrappercviEv(ptr noundef {{.*}})
   // CHECK-NEXT:  [[SCALAR_FP:%.*]] = sitofp i32 %call to double
-  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, <90 x double>* {{.*}}, align 8
+  // CHECK:       [[MATRIX:%.*]] = load <90 x double>, ptr {{.*}}, align 8
   // CHECK-NEXT:  [[SCALAR_EMBED:%.*]] = insertelement <90 x double> poison, double [[SCALAR_FP]], i32 0
   // CHECK-NEXT:  [[SCALAR_EMBED1:%.*]] = shufflevector <90 x double> [[SCALAR_EMBED]], <90 x double> poison, <90 x i32> zeroinitializer
   // CHECK-NEXT:  [[RES:%.*]] = fmul <90 x double> [[SCALAR_EMBED1]], [[MATRIX]]
-  // CHECK:       store <90 x double> [[RES]], <90 x double>* {{.*}}, align 8
+  // CHECK:       store <90 x double> [[RES]], ptr {{.*}}, align 8
   // CHECK:       ret void
   m.value = w3 * m.value;
 }
@@ -204,27 +203,26 @@ void insert(MyMatrix<EltTy, Rows, Columns> &Mat, EltTy e, unsigned i, unsigned j
 
 void test_insert_template1(MyMatrix<unsigned, 2, 2> &Mat, unsigned e, unsigned i, unsigned j) {
   // CHECK-LABEL: @_Z21test_insert_template1R8MyMatrixIjLj2ELj2EEjjj(
-  // CHECK:         [[MAT_ADDR:%.*]] = load %struct.MyMatrix.3*, %struct.MyMatrix.3** %Mat.addr, align 8
-  // CHECK-NEXT:    [[E:%.*]] = load i32, i32* %e.addr, align 4
-  // CHECK-NEXT:    [[I:%.*]] = load i32, i32* %i.addr, align 4
-  // CHECK-NEXT:    [[J:%.*]] = load i32, i32* %j.addr, align 4
-  // CHECK-NEXT:    call void @_Z6insertIjLj2ELj2EEvR8MyMatrixIT_XT0_EXT1_EES1_jj(%struct.MyMatrix.3* noundef nonnull align 4 dereferenceable(16) [[MAT_ADDR]], i32 noundef [[E]], i32 noundef [[I]], i32 noundef [[J]])
+  // CHECK:         [[MAT_ADDR:%.*]] = load ptr, ptr %Mat.addr, align 8
+  // CHECK-NEXT:    [[E:%.*]] = load i32, ptr %e.addr, align 4
+  // CHECK-NEXT:    [[I:%.*]] = load i32, ptr %i.addr, align 4
+  // CHECK-NEXT:    [[J:%.*]] = load i32, ptr %j.addr, align 4
+  // CHECK-NEXT:    call void @_Z6insertIjLj2ELj2EEvR8MyMatrixIT_XT0_EXT1_EES1_jj(ptr noundef nonnull align 4 dereferenceable(16) [[MAT_ADDR]], i32 noundef [[E]], i32 noundef [[I]], i32 noundef [[J]])
   // CHECK-NEXT:    ret void
   //
   // CHECK-LABEL: define linkonce_odr void @_Z6insertIjLj2ELj2EEvR8MyMatrixIT_XT0_EXT1_EES1_jj(
-  // CHECK:         [[E:%.*]] = load i32, i32* %e.addr, align 4
-  // CHECK:         [[I:%.*]] = load i32, i32* %i.addr, align 4
+  // CHECK:         [[E:%.*]] = load i32, ptr %e.addr, align 4
+  // CHECK:         [[I:%.*]] = load i32, ptr %i.addr, align 4
   // CHECK-NEXT:    [[I_EXT:%.*]] = zext i32 [[I]] to i64
-  // CHECK-NEXT:    [[J:%.*]] = load i32, i32* %j.addr, align 4
+  // CHECK-NEXT:    [[J:%.*]] = load i32, ptr %j.addr, align 4
   // CHECK-NEXT:    [[J_EXT:%.*]] = zext i32 [[J]] to i64
   // CHECK-NEXT:    [[IDX1:%.*]] = mul i64 [[J_EXT]], 2
   // CHECK-NEXT:    [[IDX2:%.*]] = add i64 [[IDX1]], [[I_EXT]]
-  // CHECK-NEXT:    [[MAT_ADDR:%.*]] = bitcast [4 x i32]* {{.*}} to <4 x i32>*
   // OPT-NEXT:      [[CMP:%.*]] = icmp ult i64 [[IDX2]], 4
   // OPT-NEXT:      call void @llvm.assume(i1 [[CMP]])
-  // CHECK-NEXT:    [[MAT:%.*]] = load <4 x i32>, <4 x i32>* [[MAT_ADDR]], align 4
+  // CHECK-NEXT:    [[MAT:%.*]] = load <4 x i32>, ptr {{.*}}, align 4
   // CHECK-NEXT:    [[MATINS:%.*]] = insertelement <4 x i32> [[MAT]], i32 [[E]], i64 [[IDX2]]
-  // CHECK-NEXT:    store <4 x i32> [[MATINS]], <4 x i32>* [[MAT_ADDR]], align 4
+  // CHECK-NEXT:    store <4 x i32> [[MATINS]], ptr {{.*}}, align 4
   // CHECK-NEXT:    ret void
 
   insert(Mat, e, i, j);
@@ -232,25 +230,24 @@ void test_insert_template1(MyMatrix<unsigned, 2, 2> &Mat, unsigned e, unsigned i
 
 void test_insert_template2(MyMatrix<float, 3, 8> &Mat, float e) {
   // CHECK-LABEL: @_Z21test_insert_template2R8MyMatrixIfLj3ELj8EEf(
-  // CHECK:         [[MAT_ADDR:%.*]] = load %struct.MyMatrix.4*, %struct.MyMatrix.4** %Mat.addr, align 8
-  // CHECK-NEXT:    [[E:%.*]] = load float, float* %e.addr, align 4
-  // CHECK-NEXT:    call void @_Z6insertIfLj3ELj8EEvR8MyMatrixIT_XT0_EXT1_EES1_jj(%struct.MyMatrix.4* noundef nonnull align 4 dereferenceable(96) [[MAT_ADDR]], float noundef [[E]], i32 noundef 2, i32 noundef 5)
+  // CHECK:         [[MAT_ADDR:%.*]] = load ptr, ptr %Mat.addr, align 8
+  // CHECK-NEXT:    [[E:%.*]] = load float, ptr %e.addr, align 4
+  // CHECK-NEXT:    call void @_Z6insertIfLj3ELj8EEvR8MyMatrixIT_XT0_EXT1_EES1_jj(ptr noundef nonnull align 4 dereferenceable(96) [[MAT_ADDR]], float noundef [[E]], i32 noundef 2, i32 noundef 5)
   // CHECK-NEXT:    ret void
   //
   // CHECK-LABEL: define linkonce_odr void @_Z6insertIfLj3ELj8EEvR8MyMatrixIT_XT0_EXT1_EES1_jj(
-  // CHECK:         [[E:%.*]] = load float, float* %e.addr, align 4
-  // CHECK:         [[I:%.*]] = load i32, i32* %i.addr, align 4
+  // CHECK:         [[E:%.*]] = load float, ptr %e.addr, align 4
+  // CHECK:         [[I:%.*]] = load i32, ptr %i.addr, align 4
   // CHECK-NEXT:    [[I_EXT:%.*]] = zext i32 [[I]] to i64
-  // CHECK-NEXT:    [[J:%.*]] = load i32, i32* %j.addr, align 4
+  // CHECK-NEXT:    [[J:%.*]] = load i32, ptr %j.addr, align 4
   // CHECK-NEXT:    [[J_EXT:%.*]] = zext i32 [[J]] to i64
   // CHECK-NEXT:    [[IDX1:%.*]] = mul i64 [[J_EXT]], 3
   // CHECK-NEXT:    [[IDX2:%.*]] = add i64 [[IDX1]], [[I_EXT]]
-  // CHECK-NEXT:    [[MAT_ADDR:%.*]] = bitcast [24 x float]* {{.*}} to <24 x float>*
   // OPT-NEXT:      [[CMP:%.*]] = icmp ult i64 [[IDX2]], 24
   // OPT-NEXT:      call void @llvm.assume(i1 [[CMP]])
-  // CHECK-NEXT:    [[MAT:%.*]] = load <24 x float>, <24 x float>* [[MAT_ADDR]], align 4
+  // CHECK-NEXT:    [[MAT:%.*]] = load <24 x float>, ptr {{.*}}, align 4
   // CHECK-NEXT:    [[MATINS:%.*]] = insertelement <24 x float> [[MAT]], float [[E]], i64 [[IDX2]]
-  // CHECK-NEXT:    store <24 x float> [[MATINS]], <24 x float>* [[MAT_ADDR]], align 4
+  // CHECK-NEXT:    store <24 x float> [[MATINS]], ptr {{.*}}, align 4
   // CHECK-NEXT:    ret void
 
   insert(Mat, e, 2, 5);
@@ -264,11 +261,11 @@ EltTy extract(MyMatrix<EltTy, Rows, Columns> &Mat) {
 int test_extract_template(MyMatrix<int, 2, 2> Mat1) {
   // CHECK-LABEL: @_Z21test_extract_template8MyMatrixIiLj2ELj2EE(
   // CHECK-NEXT:  entry:
-  // CHECK-NEXT:    [[CALL:%.*]] = call noundef i32 @_Z7extractIiLj2ELj2EET_R8MyMatrixIS0_XT0_EXT1_EE(%struct.MyMatrix.5* noundef nonnull align 4 dereferenceable(16) [[MAT1:%.*]])
+  // CHECK-NEXT:    [[CALL:%.*]] = call noundef i32 @_Z7extractIiLj2ELj2EET_R8MyMatrixIS0_XT0_EXT1_EE(ptr noundef nonnull align 4 dereferenceable(16) [[MAT1:%.*]])
   // CHECK-NEXT:    ret i32 [[CALL]]
   //
   // CHECK-LABEL: define linkonce_odr noundef i32 @_Z7extractIiLj2ELj2EET_R8MyMatrixIS0_XT0_EXT1_EE(
-  // CHECK:         [[MAT:%.*]] = load <4 x i32>, <4 x i32>* {{.*}}, align 4
+  // CHECK:         [[MAT:%.*]] = load <4 x i32>, ptr {{.*}}, align 4
   // CHECK-NEXT:    [[MATEXT:%.*]] = extractelement <4 x i32> [[MAT]], i64 1
   // CHECK-NEXT:    ret i32 [[MATEXT]]
 
@@ -282,9 +279,9 @@ auto matrix_subscript(double4x4 m, R r, C c) -> decltype(m[r][c]) {}
 
 double test_matrix_subscript(double4x4 m) {
   // CHECK-LABEL: @_Z21test_matrix_subscriptu11matrix_typeILm4ELm4EdE(
-  // CHECK:         [[MAT:%.*]] = load <16 x double>, <16 x double>* {{.*}}, align 8
-  // CHECK-NEXT:    [[CALL:%.*]] = call noundef nonnull align 8 dereferenceable(8) double* @_Z16matrix_subscriptIiiEDTixixfp_fp0_fp1_Eu11matrix_typeILm4ELm4EdET_T0_(<16 x double> noundef [[MAT]], i32 noundef 1, i32 noundef 2)
-  // CHECK-NEXT:    [[RES:%.*]] = load double, double* [[CALL]], align 8
+  // CHECK:         [[MAT:%.*]] = load <16 x double>, ptr {{.*}}, align 8
+  // CHECK-NEXT:    [[CALL:%.*]] = call noundef nonnull align 8 dereferenceable(8) ptr @_Z16matrix_subscriptIiiEDTixixfp_fp0_fp1_Eu11matrix_typeILm4ELm4EdET_T0_(<16 x double> noundef [[MAT]], i32 noundef 1, i32 noundef 2)
+  // CHECK-NEXT:    [[RES:%.*]] = load double, ptr [[CALL]], align 8
   // CHECK-NEXT:    ret double [[RES]]
 
   return matrix_subscript(m, 1, 2);
@@ -295,12 +292,11 @@ const double &test_matrix_subscript_reference(const double4x4 m) {
   // CHECK-NEXT:  entry:
   // CHECK-NEXT:    [[M_ADDR:%.*]] = alloca [16 x double], align 8
   // CHECK-NEXT:    [[REF_TMP:%.*]] = alloca double, align 8
-  // CHECK-NEXT:    [[NAMELESS0:%.*]] = bitcast [16 x double]* [[M_ADDR]] to <16 x double>*
-  // CHECK-NEXT:    store <16 x double> [[M:%.*]], <16 x double>* [[NAMELESS0]], align 8
-  // CHECK:         [[NAMELESS1:%.*]] = load <16 x double>, <16 x double>* [[NAMELESS0]], align 8
+  // CHECK-NEXT:    store <16 x double> [[M:%.*]], ptr [[M_ADDR]], align 8
+  // CHECK:         [[NAMELESS1:%.*]] = load <16 x double>, ptr [[M_ADDR]], align 8
   // CHECK-NEXT:    [[MATEXT:%.*]] = extractelement <16 x double> [[NAMELESS1]], i64 4
-  // CHECK-NEXT:    store double [[MATEXT]], double* [[REF_TMP]], align 8
-  // CHECK:         ret double* [[REF_TMP]]
+  // CHECK-NEXT:    store double [[MATEXT]], ptr [[REF_TMP]], align 8
+  // CHECK:         ret ptr [[REF_TMP]]
 
   return m[0][1];
 }
@@ -314,19 +310,18 @@ struct UnsignedWrapper {
 
 double extract_IntWrapper_idx(double4x4 &m, IntWrapper i, UnsignedWrapper j) {
   // CHECK-LABEL: define{{.*}} double @_Z22extract_IntWrapper_idxRu11matrix_typeILm4ELm4EdE10IntWrapper15UnsignedWrapper(
-  // CHECK:         [[I:%.*]] = call noundef i32 @_ZN10IntWrappercviEv(%struct.IntWrapper* {{[^,]*}} %i)
+  // CHECK:         [[I:%.*]] = call noundef i32 @_ZN10IntWrappercviEv(ptr {{[^,]*}} %i)
   // CHECK-NEXT:    [[I_ADD:%.*]] = add nsw i32 [[I]], 1
   // CHECK-NEXT:    [[I_ADD_EXT:%.*]] = sext i32 [[I_ADD]] to i64
-  // CHECK-NEXT:    [[J:%.*]] = call noundef i32 @_ZN15UnsignedWrappercvjEv(%struct.UnsignedWrapper* {{[^,]*}} %j)
+  // CHECK-NEXT:    [[J:%.*]] = call noundef i32 @_ZN15UnsignedWrappercvjEv(ptr {{[^,]*}} %j)
   // CHECK-NEXT:    [[J_SUB:%.*]] = sub i32 [[J]], 1
   // CHECK-NEXT:    [[J_SUB_EXT:%.*]] = zext i32 [[J_SUB]] to i64
   // CHECK-NEXT:    [[IDX1:%.*]] = mul i64 [[J_SUB_EXT]], 4
   // CHECK-NEXT:    [[IDX2:%.*]] = add i64 [[IDX1]], [[I_ADD_EXT]]
   // OPT-NEXT:      [[CMP:%.*]] = icmp ult i64 [[IDX2]], 16
   // OPT-NEXT:      call void @llvm.assume(i1 [[CMP]])
-  // CHECK-NEXT:    [[MAT_ADDR:%.*]] = load [16 x double]*, [16 x double]** %m.addr, align 8
-  // CHECK-NEXT:    [[MAT_ADDR2:%.*]] = bitcast [16 x double]* [[MAT_ADDR]] to <16 x double>*
-  // CHECK-NEXT:    [[MAT:%.*]] = load <16 x double>, <16 x double>* [[MAT_ADDR2]], align 8
+  // CHECK-NEXT:    [[MAT_ADDR:%.*]] = load ptr, ptr %m.addr, align 8
+  // CHECK-NEXT:    [[MAT:%.*]] = load <16 x double>, ptr [[MAT_ADDR]], align 8
   // CHECK-NEXT:    [[MATEXT:%.*]]  = extractelement <16 x double> [[MAT]], i64 [[IDX2]]
   // CHECK-NEXT:    ret double [[MATEXT]]
   return m[i + 1][j - 1];
@@ -348,58 +343,54 @@ constexpr identmatrix_t identmatrix;
 
 void test_constexpr1(matrix_type<float, 4, 4> &m) {
   // CHECK-LABEL: define{{.*}} void @_Z15test_constexpr1Ru11matrix_typeILm4ELm4EfE(
-  // CHECK:         [[MAT:%.*]] = load <16 x float>, <16 x float>* {{.*}}, align 4
-  // CHECK-NEXT:    [[IM:%.*]] = call noundef <16 x float> @_ZNK13identmatrix_tcvu11matrix_typeIXT0_EXT0_ET_EIfLj4EEEv(%struct.identmatrix_t* {{[^,]*}} @_ZL11identmatrix)
+  // CHECK:         [[MAT:%.*]] = load <16 x float>, ptr {{.*}}, align 4
+  // CHECK-NEXT:    [[IM:%.*]] = call noundef <16 x float> @_ZNK13identmatrix_tcvu11matrix_typeIXT0_EXT0_ET_EIfLj4EEEv(ptr {{[^,]*}} @_ZL11identmatrix)
   // CHECK-NEXT:    [[ADD:%.*]] = fadd <16 x float> [[MAT]], [[IM]]
-  // CHECK-NEXT:    [[MAT_ADDR:%.*]] = load [16 x float]*, [16 x float]** %m.addr, align 8
-  // CHECK-NEXT:    [[MAT_ADDR2:%.*]] = bitcast [16 x float]* [[MAT_ADDR]] to <16 x float>*
-  // CHECK-NEXT:    store <16 x float> [[ADD]], <16 x float>* [[MAT_ADDR2]], align 4
+  // CHECK-NEXT:    [[MAT_ADDR:%.*]] = load ptr, ptr %m.addr, align 8
+  // CHECK-NEXT:    store <16 x float> [[ADD]], ptr [[MAT_ADDR]], align 4
   // CHECK-NEXT:    ret voi
 
   // CHECK-LABEL: define linkonce_odr noundef <16 x float> @_ZNK13identmatrix_tcvu11matrix_typeIXT0_EXT0_ET_EIfLj4EEEv(
   // CHECK-LABEL: for.body:                                         ; preds = %for.cond
-  // CHECK-NEXT:   [[I:%.*]] = load i32, i32* %i, align 4
+  // CHECK-NEXT:   [[I:%.*]] = load i32, ptr %i, align 4
   // CHECK-NEXT:   [[I_EXT:%.*]] = zext i32 [[I]] to i64
-  // CHECK-NEXT:   [[I2:%.*]] = load i32, i32* %i, align 4
+  // CHECK-NEXT:   [[I2:%.*]] = load i32, ptr %i, align 4
   // CHECK-NEXT:   [[I2_EXT:%.*]] = zext i32 [[I2]] to i64
   // CHECK-NEXT:   [[IDX1:%.*]] = mul i64 [[I2_EXT]], 4
   // CHECK-NEXT:   [[IDX2:%.*]] = add i64 [[IDX1]], [[I_EXT]]
-  // CHECK-NEXT:   [[MAT_ADDR:%.*]] = bitcast [16 x float]* %result to <16 x float>*
   // OPT-NEXT:     [[CMP:%.*]] = icmp ult i64 [[IDX2]], 16
   // OPT-NEXT:     call void @llvm.assume(i1 [[CMP]])
-  // CHECK-NEXT:   [[MAT:%.*]] = load <16 x float>, <16 x float>* [[MAT_ADDR]], align 4
+  // CHECK-NEXT:   [[MAT:%.*]] = load <16 x float>, ptr %result, align 4
   // CHECK-NEXT:   [[MATINS:%.*]] = insertelement <16 x float> [[MAT]], float 1.000000e+00, i64 [[IDX2]]
-  // CHECK-NEXT:   store <16 x float> [[MATINS]], <16 x float>* [[MAT_ADDR]], align 4
+  // CHECK-NEXT:   store <16 x float> [[MATINS]], ptr %result, align 4
   // CHECK-NEXT:   br label %for.inc
   m = m + identmatrix;
 }
 
 void test_constexpr2(matrix_type<int, 5, 5> &m) {
   // CHECK-LABEL: define{{.*}} void @_Z15test_constexpr2Ru11matrix_typeILm5ELm5EiE(
-  // CHECK:         [[IM:%.*]] = call noundef <25 x i32> @_ZNK13identmatrix_tcvu11matrix_typeIXT0_EXT0_ET_EIiLj5EEEv(%struct.identmatrix_t* {{[^,]*}} @_ZL11identmatrix)
-  // CHECK:         [[MAT:%.*]] = load <25 x i32>, <25 x i32>* {{.*}}, align 4
+  // CHECK:         [[IM:%.*]] = call noundef <25 x i32> @_ZNK13identmatrix_tcvu11matrix_typeIXT0_EXT0_ET_EIiLj5EEEv(ptr {{[^,]*}} @_ZL11identmatrix)
+  // CHECK:         [[MAT:%.*]] = load <25 x i32>, ptr {{.*}}, align 4
   // CHECK-NEXT:    [[SUB:%.*]] = sub <25 x i32> [[IM]], [[MAT]]
   // CHECK-NEXT:    [[SUB2:%.*]] = add <25 x i32> [[SUB]], <i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1, i32 1>
-  // CHECK-NEXT:    [[MAT_ADDR:%.*]] = load [25 x i32]*, [25 x i32]** %m.addr, align 8
-  // CHECK-NEXT:    [[MAT_ADDR2:%.*]] = bitcast [25 x i32]* [[MAT_ADDR]] to <25 x i32>*
-  // CHECK-NEXT:    store <25 x i32> [[SUB2]], <25 x i32>* [[MAT_ADDR2]], align 4
+  // CHECK-NEXT:    [[MAT_ADDR:%.*]] = load ptr, ptr %m.addr, align 8
+  // CHECK-NEXT:    store <25 x i32> [[SUB2]], ptr [[MAT_ADDR]], align 4
   // CHECK-NEXT:    ret void
   //
 
   // CHECK-LABEL: define linkonce_odr noundef <25 x i32> @_ZNK13identmatrix_tcvu11matrix_typeIXT0_EXT0_ET_EIiLj5EEEv(
   // CHECK-LABEL: for.body:                                         ; preds = %for.cond
-  // CHECK-NEXT:   [[I:%.*]] = load i32, i32* %i, align 4
+  // CHECK-NEXT:   [[I:%.*]] = load i32, ptr %i, align 4
   // CHECK-NEXT:   [[I_EXT:%.*]] = zext i32 [[I]] to i64
-  // CHECK-NEXT:   [[I2:%.*]] = load i32, i32* %i, align 4
+  // CHECK-NEXT:   [[I2:%.*]] = load i32, ptr %i, align 4
   // CHECK-NEXT:   [[I2_EXT:%.*]] = zext i32 [[I2]] to i64
   // CHECK-NEXT:   [[IDX1:%.*]] = mul i64 [[I2_EXT]], 5
   // CHECK-NEXT:   [[IDX2:%.*]] = add i64 [[IDX1]], [[I_EXT]]
-  // CHECK-NEXT:   [[MAT_ADDR:%.*]] = bitcast [25 x i32]* %result to <25 x i32>*
   // OPT-NEXT:     [[CMP:%.*]] = icmp ult i64 [[IDX2]], 25
   // OPT-NEXT:     call void @llvm.assume(i1 [[CMP]])
-  // CHECK-NEXT:   [[MAT:%.*]] = load <25 x i32>, <25 x i32>* [[MAT_ADDR]], align 4
+  // CHECK-NEXT:   [[MAT:%.*]] = load <25 x i32>, ptr %result, align 4
   // CHECK-NEXT:   [[MATINS:%.*]] = insertelement <25 x i32> [[MAT]], i32 1, i64 [[IDX2]]
-  // CHECK-NEXT:   store <25 x i32> [[MATINS]], <25 x i32>* [[MAT_ADDR]], align 4
+  // CHECK-NEXT:   store <25 x i32> [[MATINS]], ptr %result, align 4
   // CHECK-NEXT:   br label %for.inc
 
   m = identmatrix - m + 1;

diff  --git a/clang/test/CodeGenCXX/member-expr-references-variable.cpp b/clang/test/CodeGenCXX/member-expr-references-variable.cpp
index b45478b16a131..4a6756d22c40c 100644
--- a/clang/test/CodeGenCXX/member-expr-references-variable.cpp
+++ b/clang/test/CodeGenCXX/member-expr-references-variable.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 %s -triple x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
 
 struct Agg { const char * x; const char * y; constexpr Agg() : x(0), y(0) {} };
 
@@ -21,84 +21,78 @@ Struct *getPtr();
 
 void scalarStaticVariableInMemberExpr(Struct *ptr, Struct &ref) {
   use(1, Struct::name);
-// CHECK: call void @_Z3useiPKc(i32 noundef 1, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @[[STR]], i32 0, i32 0))
+// CHECK: call void @_Z3useiPKc(i32 noundef 1, ptr noundef @[[STR]])
   Struct s;
   use(2, s.name);
-// CHECK: call void @_Z3useiPKc(i32 noundef 2, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @[[STR]], i32 0, i32 0))
+// CHECK: call void @_Z3useiPKc(i32 noundef 2, ptr noundef @[[STR]])
   use(3, ptr->name);
-// CHECK: load %struct.Struct*, %struct.Struct** %{{.*}}, align 8
-// CHECK: call void @_Z3useiPKc(i32 noundef 3, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @[[STR]], i32 0, i32 0))
+// CHECK: load ptr, ptr %{{.*}}, align 8
+// CHECK: call void @_Z3useiPKc(i32 noundef 3, ptr noundef @[[STR]])
   use(4, ref.name);
-// CHECK: load %struct.Struct*, %struct.Struct** %{{.*}}, align 8
-// CHECK: call void @_Z3useiPKc(i32 noundef 4, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @[[STR]], i32 0, i32 0))
+// CHECK: load ptr, ptr %{{.*}}, align 8
+// CHECK: call void @_Z3useiPKc(i32 noundef 4, ptr noundef @[[STR]])
   use(5, Struct(2).name);
-// CHECK: call void @_ZN6StructC1Ei(%struct.Struct* {{[^,]*}} %{{.*}}, i32 noundef 2)
-// CHECK: call void @_Z3useiPKc(i32 noundef 5, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @[[STR]], i32 0, i32 0))
+// CHECK: call void @_ZN6StructC1Ei(ptr {{[^,]*}} %{{.*}}, i32 noundef 2)
+// CHECK: call void @_Z3useiPKc(i32 noundef 5, ptr noundef @[[STR]])
   use(6, getPtr()->name);
-// CHECK: call noundef %struct.Struct* @_Z6getPtrv()
-// CHECK: call void @_Z3useiPKc(i32 noundef 6, i8* noundef getelementptr inbounds ([4 x i8], [4 x i8]* @[[STR]], i32 0, i32 0))
+// CHECK: call noundef ptr @_Z6getPtrv()
+// CHECK: call void @_Z3useiPKc(i32 noundef 6, ptr noundef @[[STR]])
 }
 
 void use(int n, __complex float v);
 
 void complexStaticVariableInMemberExpr(Struct *ptr, Struct &ref) {
   use(1, Struct::complexValue);
-// CHECK: store float 4.200000e+01, float* %[[coerce0:.*]].{{.*}}, align 4
-// CHECK: store float 0.000000e+00, float* %[[coerce0]].{{.*}}, align 4
-// CHECK: %[[cast0:.*]] = bitcast { float, float }* %[[coerce0]] to <2 x float>*
-// CHECK: %[[vector0:.*]] = load <2 x float>, <2 x float>* %[[cast0]], align 4
+// CHECK: store float 4.200000e+01, ptr %[[coerce0:.*]].{{.*}}, align 4
+// CHECK: store float 0.000000e+00, ptr %[[coerce0]].{{.*}}, align 4
+// CHECK: %[[vector0:.*]] = load <2 x float>, ptr %[[coerce0]], align 4
 // CHECK: call void @_Z3useiCf(i32 noundef 1, <2 x float> noundef %[[vector0]])
   Struct s;
   use(2, s.complexValue);
-// CHECK: store float 4.200000e+01, float* %[[coerce1:.*]].{{.*}}, align 4
-// CHECK: store float 0.000000e+00, float* %[[coerce1]].{{.*}}, align 4
-// CHECK: %[[cast1:.*]] = bitcast { float, float }* %[[coerce1]] to <2 x float>*
-// CHECK: %[[vector1:.*]] = load <2 x float>, <2 x float>* %[[cast1]], align 4
+// CHECK: store float 4.200000e+01, ptr %[[coerce1:.*]].{{.*}}, align 4
+// CHECK: store float 0.000000e+00, ptr %[[coerce1]].{{.*}}, align 4
+// CHECK: %[[vector1:.*]] = load <2 x float>, ptr %[[coerce1]], align 4
 // CHECK: call void @_Z3useiCf(i32 noundef 2, <2 x float> noundef %[[vector1]])
   use(3, ptr->complexValue);
-// CHECK: load %struct.Struct*, %struct.Struct** %{{.*}}, align 8
-// CHECK: store float 4.200000e+01, float* %[[coerce2:.*]].{{.*}}, align 4
-// CHECK: store float 0.000000e+00, float* %[[coerce2]].{{.*}}, align 4
-// CHECK: %[[cast2:.*]] = bitcast { float, float }* %[[coerce2]] to <2 x float>*
-// CHECK: %[[vector2:.*]] = load <2 x float>, <2 x float>* %[[cast2]], align 4
+// CHECK: load ptr, ptr %{{.*}}, align 8
+// CHECK: store float 4.200000e+01, ptr %[[coerce2:.*]].{{.*}}, align 4
+// CHECK: store float 0.000000e+00, ptr %[[coerce2]].{{.*}}, align 4
+// CHECK: %[[vector2:.*]] = load <2 x float>, ptr %[[coerce2]], align 4
 // CHECK: call void @_Z3useiCf(i32 noundef 3, <2 x float> noundef %[[vector2]])
   use(4, ref.complexValue);
-// CHECK: load %struct.Struct*, %struct.Struct** %{{.*}}, align 8
-// CHECK: store float 4.200000e+01, float* %[[coerce3:.*]].{{.*}}, align 4
-// CHECK: store float 0.000000e+00, float* %[[coerce3]].{{.*}}, align 4
-// CHECK: %[[cast3:.*]] = bitcast { float, float }* %[[coerce3]] to <2 x float>*
-// CHECK: %[[vector3:.*]] = load <2 x float>, <2 x float>* %[[cast3]], align 4
+// CHECK: load ptr, ptr %{{.*}}, align 8
+// CHECK: store float 4.200000e+01, ptr %[[coerce3:.*]].{{.*}}, align 4
+// CHECK: store float 0.000000e+00, ptr %[[coerce3]].{{.*}}, align 4
+// CHECK: %[[vector3:.*]] = load <2 x float>, ptr %[[coerce3]], align 4
 // CHECK: call void @_Z3useiCf(i32 noundef 4, <2 x float> noundef %[[vector3]])
   use(5, Struct(2).complexValue);
-// CHECK: call void @_ZN6StructC1Ei(%struct.Struct* {{[^,]*}} %{{.*}}, i32 noundef 2)
-// CHECK: store float 4.200000e+01, float* %[[coerce4:.*]].{{.*}}, align 4
-// CHECK: store float 0.000000e+00, float* %[[coerce4]].{{.*}}, align 4
-// CHECK: %[[cast4:.*]] = bitcast { float, float }* %[[coerce4]] to <2 x float>*
-// CHECK: %[[vector4:.*]] = load <2 x float>, <2 x float>* %[[cast4]], align 4
+// CHECK: call void @_ZN6StructC1Ei(ptr {{[^,]*}} %{{.*}}, i32 noundef 2)
+// CHECK: store float 4.200000e+01, ptr %[[coerce4:.*]].{{.*}}, align 4
+// CHECK: store float 0.000000e+00, ptr %[[coerce4]].{{.*}}, align 4
+// CHECK: %[[vector4:.*]] = load <2 x float>, ptr %[[coerce4]], align 4
 // CHECK: call void @_Z3useiCf(i32 noundef 5, <2 x float> noundef %[[vector4]])
   use(6, getPtr()->complexValue);
-// CHECK: call noundef %struct.Struct* @_Z6getPtrv()
-// CHECK: store float 4.200000e+01, float* %[[coerce5:.*]].{{.*}}, align 4
-// CHECK: store float 0.000000e+00, float* %[[coerce5]].{{.*}}, align 4
-// CHECK: %[[cast5:.*]] = bitcast { float, float }* %[[coerce5]] to <2 x float>*
-// CHECK: %[[vector5:.*]] = load <2 x float>, <2 x float>* %[[cast5]], align 4
+// CHECK: call noundef ptr @_Z6getPtrv()
+// CHECK: store float 4.200000e+01, ptr %[[coerce5:.*]].{{.*}}, align 4
+// CHECK: store float 0.000000e+00, ptr %[[coerce5]].{{.*}}, align 4
+// CHECK: %[[vector5:.*]] = load <2 x float>, ptr %[[coerce5]], align 4
 // CHECK: call void @_Z3useiCf(i32 noundef 6, <2 x float> noundef %[[vector5]])
 }
 
 void aggregateRefInMemberExpr(Struct *ptr, Struct &ref) {
   use(1, Struct::agg.x);
-// CHECK: %[[value0:.*]] = load i8*, i8** getelementptr inbounds (%struct.Agg, %struct.Agg* @_ZGRN6Struct3aggE_, i32 0, i32 0), align 8
-// CHECK: call void @_Z3useiPKc(i32 noundef 1, i8* noundef %[[value0]])
+// CHECK: %[[value0:.*]] = load ptr, ptr @_ZGRN6Struct3aggE_, align 8
+// CHECK: call void @_Z3useiPKc(i32 noundef 1, ptr noundef %[[value0]])
   Struct s;
   use(2, s.agg.x);
-// CHECK: %[[value1:.*]] = load i8*, i8** getelementptr inbounds (%struct.Agg, %struct.Agg* @_ZGRN6Struct3aggE_, i32 0, i32 0), align 8
-// CHECK: call void @_Z3useiPKc(i32 noundef 2, i8* noundef %[[value1]])
+// CHECK: %[[value1:.*]] = load ptr, ptr @_ZGRN6Struct3aggE_, align 8
+// CHECK: call void @_Z3useiPKc(i32 noundef 2, ptr noundef %[[value1]])
   use(3, ptr->agg.x);
-// CHECK: load %struct.Struct*, %struct.Struct** %{{.*}}, align 8
-// CHECK: %[[value2:.*]] = load i8*, i8** getelementptr inbounds (%struct.Agg, %struct.Agg* @_ZGRN6Struct3aggE_, i32 0, i32 0), align 8
-// CHECK: call void @_Z3useiPKc(i32 noundef 3, i8* noundef %[[value2]])
+// CHECK: load ptr, ptr %{{.*}}, align 8
+// CHECK: %[[value2:.*]] = load ptr, ptr @_ZGRN6Struct3aggE_, align 8
+// CHECK: call void @_Z3useiPKc(i32 noundef 3, ptr noundef %[[value2]])
   use(4, ref.agg.x);
-// CHECK: load %struct.Struct*, %struct.Struct** %{{.*}}, align 8
-// CHECK: %[[value3:.*]] = load i8*, i8** getelementptr inbounds (%struct.Agg, %struct.Agg* @_ZGRN6Struct3aggE_, i32 0, i32 0), align 8
-// CHECK: call void @_Z3useiPKc(i32 noundef 4, i8* noundef %[[value3]])
+// CHECK: load ptr, ptr %{{.*}}, align 8
+// CHECK: %[[value3:.*]] = load ptr, ptr @_ZGRN6Struct3aggE_, align 8
+// CHECK: call void @_Z3useiPKc(i32 noundef 4, ptr noundef %[[value3]])
 }

diff  --git a/clang/test/CodeGenCXX/member-function-pointer-calls.cpp b/clang/test/CodeGenCXX/member-function-pointer-calls.cpp
index 68c006e3319ba..ff511c0243801 100644
--- a/clang/test/CodeGenCXX/member-function-pointer-calls.cpp
+++ b/clang/test/CodeGenCXX/member-function-pointer-calls.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -O3 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -O3 -o - | FileCheck %s
 /// Check that we pass the member pointers indirectly for MinGW64
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-windows-gnu -emit-llvm -o - | FileCheck %s -check-prefix MINGW64
+// RUN: %clang_cc1 %s -triple=x86_64-windows-gnu -emit-llvm -o - | FileCheck %s -check-prefix MINGW64
 /// We should be able to optimize calls via the indirectly passed member pointers
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-windows-gnu -emit-llvm -O3 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-windows-gnu -emit-llvm -O3 -o - | FileCheck %s
 struct A {
   virtual int vf1() { return 1; }
   virtual int vf2() { return 2; }
@@ -16,7 +16,7 @@ int f(A* a, int (A::*fp)()) {
 // CHECK-NOT: }
 // CHECK: ret i32 1
 // MINGW64-LABEL: define dso_local noundef i32 @_Z2g1v()
-// MINGW64: call noundef i32 @_Z1fP1AMS_FivE(%struct.A* noundef %{{.*}}, { i64, i64 }* noundef %{{.*}})
+// MINGW64: call noundef i32 @_Z1fP1AMS_FivE(ptr noundef %{{.*}}, ptr noundef %{{.*}})
 int g1() {
   A a;
   return f(&a, &A::vf1);
@@ -26,7 +26,7 @@ int g1() {
 // CHECK-NOT: }
 // CHECK: ret i32 2
 // MINGW64-LABEL: define dso_local noundef i32 @_Z2g2v()
-// MINGW64: call noundef i32 @_Z1fP1AMS_FivE(%struct.A* noundef %{{.*}}, { i64, i64 }* noundef %{{.*}})
+// MINGW64: call noundef i32 @_Z1fP1AMS_FivE(ptr noundef %{{.*}}, ptr noundef %{{.*}})
 int g2() {
   A a;
   return f(&a, &A::vf2);

diff  --git a/clang/test/CodeGenCXX/member-function-pointers.cpp b/clang/test/CodeGenCXX/member-function-pointers.cpp
index 0259370e6d505..f74263cd46215 100644
--- a/clang/test/CodeGenCXX/member-function-pointers.cpp
+++ b/clang/test/CodeGenCXX/member-function-pointers.cpp
@@ -1,13 +1,13 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=x86_64-unknown-unknown | FileCheck -check-prefix CODE-LP64 %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=i386-unknown-unknown | FileCheck -check-prefix CODE-LP32 %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=x86_64-unknown-unknown | FileCheck -check-prefix GLOBAL-LP64 %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=i386-unknown-unknown | FileCheck -check-prefix GLOBAL-LP32 %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=armv7-unknown-unknown | FileCheck -check-prefix GLOBAL-ARM %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-unknown-unknown | FileCheck -check-prefix CODE-LP64 %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i386-unknown-unknown | FileCheck -check-prefix CODE-LP32 %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-unknown-unknown | FileCheck -check-prefix GLOBAL-LP64 %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i386-unknown-unknown | FileCheck -check-prefix GLOBAL-LP32 %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-unknown | FileCheck -check-prefix GLOBAL-ARM %s
 
 // MIPS uses the same representation of method pointers as ARM.
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=mips-unknown-linux-gnu | FileCheck -check-prefix GLOBAL-ARM %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=mips-unknown-linux-gnu | FileCheck -check-prefix GLOBAL-ARM %s
 // WebAssembly uses the same representation of method pointers as ARM.
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple=wasm32-unknown-unknown | FileCheck -check-prefix GLOBAL-ARM %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=wasm32-unknown-unknown | FileCheck -check-prefix GLOBAL-ARM %s
 
 struct A { int a; void f(); virtual void vf1(); virtual void vf2(); };
 struct B { int b; virtual void g(); };
@@ -18,7 +18,7 @@ void (A::*volatile vpa)();
 void (B::*pb)();
 void (C::*pc)();
 
-// GLOBAL-LP64: @pa2 ={{.*}} global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A1fEv to i64), i64 0 }, align 8
+// GLOBAL-LP64: @pa2 ={{.*}} global { i64, i64 } { i64 ptrtoint (ptr @_ZN1A1fEv to i64), i64 0 }, align 8
 void (A::*pa2)() = &A::f;
 
 // GLOBAL-LP64: @pa3 ={{.*}} global { i64, i64 } { i64 1, i64 0 }, align 8
@@ -29,37 +29,37 @@ void (A::*pa3)() = &A::vf1;
 // GLOBAL-LP32: @pa4 ={{.*}} global { i32, i32 } { i32 5, i32 0 }, align 4
 void (A::*pa4)() = &A::vf2;
 
-// GLOBAL-LP64: @pc2 ={{.*}} global { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A1fEv to i64), i64 16 }, align 8
+// GLOBAL-LP64: @pc2 ={{.*}} global { i64, i64 } { i64 ptrtoint (ptr @_ZN1A1fEv to i64), i64 16 }, align 8
 void (C::*pc2)() = &C::f;
 
 // GLOBAL-LP64: @pc3 ={{.*}} global { i64, i64 } { i64 1, i64 0 }, align 8
 void (A::*pc3)() = &A::vf1;
 
 void f() {
-  // CODE-LP64: store { i64, i64 } zeroinitializer, { i64, i64 }* @pa
+  // CODE-LP64: store { i64, i64 } zeroinitializer, ptr @pa
   pa = 0;
 
   // Is this okay?  What are LLVM's volatile semantics for structs?
-  // CODE-LP64: store volatile { i64, i64 } zeroinitializer, { i64, i64 }* @vpa
+  // CODE-LP64: store volatile { i64, i64 } zeroinitializer, ptr @vpa
   vpa = 0;
 
-  // CODE-LP64: [[TMP:%.*]] = load { i64, i64 }, { i64, i64 }* @pa, align 8
+  // CODE-LP64: [[TMP:%.*]] = load { i64, i64 }, ptr @pa, align 8
   // CODE-LP64: [[TMPADJ:%.*]] = extractvalue { i64, i64 } [[TMP]], 1
   // CODE-LP64: [[ADJ:%.*]] = add nsw i64 [[TMPADJ]], 16
   // CODE-LP64: [[RES:%.*]] = insertvalue { i64, i64 } [[TMP]], i64 [[ADJ]], 1
-  // CODE-LP64: store { i64, i64 } [[RES]], { i64, i64 }* @pc, align 8
+  // CODE-LP64: store { i64, i64 } [[RES]], ptr @pc, align 8
   pc = pa;
 
-  // CODE-LP64: [[TMP:%.*]] = load { i64, i64 }, { i64, i64 }* @pc, align 8
+  // CODE-LP64: [[TMP:%.*]] = load { i64, i64 }, ptr @pc, align 8
   // CODE-LP64: [[TMPADJ:%.*]] = extractvalue { i64, i64 } [[TMP]], 1
   // CODE-LP64: [[ADJ:%.*]] = sub nsw i64 [[TMPADJ]], 16
   // CODE-LP64: [[RES:%.*]] = insertvalue { i64, i64 } [[TMP]], i64 [[ADJ]], 1
-  // CODE-LP64: store { i64, i64 } [[RES]], { i64, i64 }* @pa, align 8
+  // CODE-LP64: store { i64, i64 } [[RES]], ptr @pa, align 8
   pa = static_cast<void (A::*)()>(pc);
 }
 
 void f2() {
-  // CODE-LP64: store { i64, i64 } { i64 ptrtoint (void (%struct.A*)* @_ZN1A1fEv to i64), i64 0 }
+  // CODE-LP64: store { i64, i64 } { i64 ptrtoint (ptr @_ZN1A1fEv to i64), i64 0 }
   void (A::*pa2)() = &A::f;
   
   // CODE-LP64: store { i64, i64 } { i64 1, i64 0 }
@@ -192,9 +192,9 @@ namespace test7 {
   struct B { void foo(); virtual void vfoo(); };
   struct C : A, B { void foo(); virtual void vfoo(); };
 
-  // GLOBAL-ARM: @_ZN5test74ptr0E ={{.*}} global {{.*}} { i32 ptrtoint ({{.*}}* @_ZN5test71A3fooEv to i32), i32 0 }
-  // GLOBAL-ARM: @_ZN5test74ptr1E ={{.*}} global {{.*}} { i32 ptrtoint ({{.*}}* @_ZN5test71B3fooEv to i32), i32 8 }
-  // GLOBAL-ARM: @_ZN5test74ptr2E ={{.*}} global {{.*}} { i32 ptrtoint ({{.*}}* @_ZN5test71C3fooEv to i32), i32 0 }
+  // GLOBAL-ARM: @_ZN5test74ptr0E ={{.*}} global {{.*}} { i32 ptrtoint (ptr @_ZN5test71A3fooEv to i32), i32 0 }
+  // GLOBAL-ARM: @_ZN5test74ptr1E ={{.*}} global {{.*}} { i32 ptrtoint (ptr @_ZN5test71B3fooEv to i32), i32 8 }
+  // GLOBAL-ARM: @_ZN5test74ptr2E ={{.*}} global {{.*}} { i32 ptrtoint (ptr @_ZN5test71C3fooEv to i32), i32 0 }
   // GLOBAL-ARM: @_ZN5test74ptr3E ={{.*}} global {{.*}} { i32 0, i32 1 }
   // GLOBAL-ARM: @_ZN5test74ptr4E ={{.*}} global {{.*}} { i32 0, i32 9 }
   // GLOBAL-ARM: @_ZN5test74ptr5E ={{.*}} global {{.*}} { i32 0, i32 1 }
@@ -261,24 +261,24 @@ namespace test10 {
 
 // It's not that the offsets are doubled on ARM, it's that they're left-shifted by 1.
 
-// GLOBAL-LP64: @_ZN6test101aE ={{.*}} global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 0 }, align 8
-// GLOBAL-LP32: @_ZN6test101aE ={{.*}} global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 0 }, align 4
-// GLOBAL-ARM:  @_ZN6test101aE ={{.*}} global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 0 }, align 4
+// GLOBAL-LP64: @_ZN6test101aE ={{.*}} global { i64, i64 } { i64 ptrtoint (ptr @_ZN6test101A3fooEv to i64), i64 0 }, align 8
+// GLOBAL-LP32: @_ZN6test101aE ={{.*}} global { i32, i32 } { i32 ptrtoint (ptr @_ZN6test101A3fooEv to i32), i32 0 }, align 4
+// GLOBAL-ARM:  @_ZN6test101aE ={{.*}} global { i32, i32 } { i32 ptrtoint (ptr @_ZN6test101A3fooEv to i32), i32 0 }, align 4
   void (A::*a)() = &A::foo;
 
-// GLOBAL-LP64: @_ZN6test101bE ={{.*}} global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 8 }, align 8
-// GLOBAL-LP32: @_ZN6test101bE ={{.*}} global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 4 }, align 4
-// GLOBAL-ARM:  @_ZN6test101bE ={{.*}} global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 8 }, align 4
+// GLOBAL-LP64: @_ZN6test101bE ={{.*}} global { i64, i64 } { i64 ptrtoint (ptr @_ZN6test101A3fooEv to i64), i64 8 }, align 8
+// GLOBAL-LP32: @_ZN6test101bE ={{.*}} global { i32, i32 } { i32 ptrtoint (ptr @_ZN6test101A3fooEv to i32), i32 4 }, align 4
+// GLOBAL-ARM:  @_ZN6test101bE ={{.*}} global { i32, i32 } { i32 ptrtoint (ptr @_ZN6test101A3fooEv to i32), i32 8 }, align 4
   void (B::*b)() = (void (B::*)()) &A::foo;
 
-// GLOBAL-LP64: @_ZN6test101cE ={{.*}} global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 8 }, align 8
-// GLOBAL-LP32: @_ZN6test101cE ={{.*}} global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 4 }, align 4
-// GLOBAL-ARM:  @_ZN6test101cE ={{.*}} global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 8 }, align 4
+// GLOBAL-LP64: @_ZN6test101cE ={{.*}} global { i64, i64 } { i64 ptrtoint (ptr @_ZN6test101A3fooEv to i64), i64 8 }, align 8
+// GLOBAL-LP32: @_ZN6test101cE ={{.*}} global { i32, i32 } { i32 ptrtoint (ptr @_ZN6test101A3fooEv to i32), i32 4 }, align 4
+// GLOBAL-ARM:  @_ZN6test101cE ={{.*}} global { i32, i32 } { i32 ptrtoint (ptr @_ZN6test101A3fooEv to i32), i32 8 }, align 4
   void (C::*c)() = (void (C::*)()) (void (B::*)()) &A::foo;
 
-// GLOBAL-LP64: @_ZN6test101dE ={{.*}} global { i64, i64 } { i64 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i64), i64 16 }, align 8
-// GLOBAL-LP32: @_ZN6test101dE ={{.*}} global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 8 }, align 4
-// GLOBAL-ARM:  @_ZN6test101dE ={{.*}} global { i32, i32 } { i32 ptrtoint (void (%"struct.test10::A"*)* @_ZN6test101A3fooEv to i32), i32 16 }, align 4
+// GLOBAL-LP64: @_ZN6test101dE ={{.*}} global { i64, i64 } { i64 ptrtoint (ptr @_ZN6test101A3fooEv to i64), i64 16 }, align 8
+// GLOBAL-LP32: @_ZN6test101dE ={{.*}} global { i32, i32 } { i32 ptrtoint (ptr @_ZN6test101A3fooEv to i32), i32 8 }, align 4
+// GLOBAL-ARM:  @_ZN6test101dE ={{.*}} global { i32, i32 } { i32 ptrtoint (ptr @_ZN6test101A3fooEv to i32), i32 16 }, align 4
   void (D::*d)() = (void (C::*)()) (void (B::*)()) &A::foo;
 }
 

diff  --git a/clang/test/CodeGenCXX/member-functions.cpp b/clang/test/CodeGenCXX/member-functions.cpp
index 38f667a2d8443..562a5e52fd34e 100644
--- a/clang/test/CodeGenCXX/member-functions.cpp
+++ b/clang/test/CodeGenCXX/member-functions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-apple-darwin9 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin9 -o - %s | FileCheck %s
 
 struct C {
   void f();
@@ -16,7 +16,7 @@ void test1() {
   // CHECK: call void @_ZN1C1fEv
   c.f();
 
-  // CHECK: call void (%struct.C*, i32, ...) @_ZN1C1gEiz
+  // CHECK: call void (ptr, i32, ...) @_ZN1C1gEiz
   c.g(1, 2, 3);
 }
 

diff  --git a/clang/test/CodeGenCXX/member-init-assignment.cpp b/clang/test/CodeGenCXX/member-init-assignment.cpp
index 0fff9d7b3c760..5639b7804963d 100644
--- a/clang/test/CodeGenCXX/member-init-assignment.cpp
+++ b/clang/test/CodeGenCXX/member-init-assignment.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s
 // PR7291
 
 struct Foo {
@@ -10,8 +10,8 @@ struct Foo {
 Foo::Foo(unsigned arg) : file_id(arg = 42)
 { }
 
-// CHECK: define {{.*}} @_ZN3FooC2Ej(%struct.Foo* {{[^,]*}} %this, i32 noundef %arg) unnamed_addr
+// CHECK: define {{.*}} @_ZN3FooC2Ej(ptr {{[^,]*}} %this, i32 noundef %arg) unnamed_addr
 // CHECK: [[ARG:%.*]] = alloca i32
-// CHECK: store i32 42, i32* [[ARG]]
-// CHECK: store i32 42, i32* %{{.*}}
+// CHECK: store i32 42, ptr [[ARG]]
+// CHECK: store i32 42, ptr %{{.*}}
 // CHECK: ret {{void|%struct.Foo}}

diff  --git a/clang/test/CodeGenCXX/member-templates.cpp b/clang/test/CodeGenCXX/member-templates.cpp
index d7cc227ad5f79..eaab798a1dc39 100644
--- a/clang/test/CodeGenCXX/member-templates.cpp
+++ b/clang/test/CodeGenCXX/member-templates.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
 
 // CHECK: ; ModuleID
 struct A {
@@ -15,8 +15,8 @@ struct B {
 
 template<typename T> B::B(T) {}
 
-// CHECK-LABEL: define weak_odr void @_ZN1BC2IiEET_(%struct.B* {{[^,]*}} %this, i32 noundef %0) unnamed_addr
-// CHECK-LABEL: define weak_odr void @_ZN1BC1IiEET_(%struct.B* {{[^,]*}} %this, i32 noundef %0) unnamed_addr
+// CHECK-LABEL: define weak_odr void @_ZN1BC2IiEET_(ptr {{[^,]*}} %this, i32 noundef %0) unnamed_addr
+// CHECK-LABEL: define weak_odr void @_ZN1BC1IiEET_(ptr {{[^,]*}} %this, i32 noundef %0) unnamed_addr
 template B::B(int);
 
 template<typename T>

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp b/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
index a8c0ba414f028..d71eb96a2e337 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-alignment-fail.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fno-rtti -emit-llvm -triple=i686-pc-win32 -o - %s  2>/dev/null | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -fno-rtti -emit-llvm -triple=x86_64-pc-win32 -o - %s  2>/dev/null | FileCheck %s -check-prefix CHECK-X64
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -triple=i686-pc-win32 -o - %s  2>/dev/null | FileCheck %s
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -triple=x86_64-pc-win32 -o - %s  2>/dev/null | FileCheck %s -check-prefix CHECK-X64
 
 struct B { char a; };
 struct A : virtual B {} a;
 
 // The <> indicate that the pointer is packed, which is required to support
 // microsoft layout in 32 bit mode, but not 64 bit mode.
-// CHECK: %struct.A = type <{ i32*, %struct.B }>
-// CHECK-X64: %struct.A = type { i32*, %struct.B }
+// CHECK: %struct.A = type <{ ptr, %struct.B }>
+// CHECK-X64: %struct.A = type { ptr, %struct.B }

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-byval-sret.cpp b/clang/test/CodeGenCXX/microsoft-abi-byval-sret.cpp
index 0f5b6f1404d95..fde27c6ce85db 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-byval-sret.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-byval-sret.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=i686-pc-win32 -mconstructor-aliases -fno-rtti | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i686-pc-win32 -mconstructor-aliases -fno-rtti | FileCheck %s
 
 struct A {
   A() : a(42) {}
@@ -18,38 +18,38 @@ A B::foo(A x) {
   return x;
 }
 
-// CHECK-LABEL: define dso_local x86_thiscallcc %struct.A* @"?foo at B@@QAE?AUA@@U2@@Z"
-// CHECK:       (%struct.B* noundef %this, <{ %struct.A*, %struct.A }>* inalloca(<{ %struct.A*, %struct.A }>) %0)
-// CHECK:   getelementptr inbounds <{ %struct.A*, %struct.A }>, <{ %struct.A*, %struct.A }>* %{{.*}}, i32 0, i32 0
-// CHECK:   load %struct.A*, %struct.A**
-// CHECK:   ret %struct.A*
+// CHECK-LABEL: define dso_local x86_thiscallcc ptr @"?foo at B@@QAE?AUA@@U2@@Z"
+// CHECK:       (ptr noundef %this, ptr inalloca(<{ ptr, %struct.A }>) %0)
+// CHECK:   getelementptr inbounds <{ ptr, %struct.A }>, ptr %{{.*}}, i32 0, i32 0
+// CHECK:   load ptr, ptr
+// CHECK:   ret ptr
 
 A B::bar(A x) {
   return x;
 }
 
-// CHECK-LABEL: define dso_local %struct.A* @"?bar at B@@QAA?AUA@@U2@@Z"
-// CHECK:       (<{ %struct.B*, %struct.A*, %struct.A }>* inalloca(<{ %struct.B*, %struct.A*, %struct.A }>) %0)
-// CHECK:   getelementptr inbounds <{ %struct.B*, %struct.A*, %struct.A }>, <{ %struct.B*, %struct.A*, %struct.A }>* %{{.*}}, i32 0, i32 1
-// CHECK:   load %struct.A*, %struct.A**
-// CHECK:   ret %struct.A*
+// CHECK-LABEL: define dso_local ptr @"?bar at B@@QAA?AUA@@U2@@Z"
+// CHECK:       (ptr inalloca(<{ ptr, ptr, %struct.A }>) %0)
+// CHECK:   getelementptr inbounds <{ ptr, ptr, %struct.A }>, ptr %{{.*}}, i32 0, i32 1
+// CHECK:   load ptr, ptr
+// CHECK:   ret ptr
 
 A B::baz(A x) {
   return x;
 }
 
-// CHECK-LABEL: define dso_local x86_stdcallcc %struct.A* @"?baz at B@@QAG?AUA@@U2@@Z"
-// CHECK:       (<{ %struct.B*, %struct.A*, %struct.A }>* inalloca(<{ %struct.B*, %struct.A*, %struct.A }>) %0)
-// CHECK:   getelementptr inbounds <{ %struct.B*, %struct.A*, %struct.A }>, <{ %struct.B*, %struct.A*, %struct.A }>* %{{.*}}, i32 0, i32 1
-// CHECK:   load %struct.A*, %struct.A**
-// CHECK:   ret %struct.A*
+// CHECK-LABEL: define dso_local x86_stdcallcc ptr @"?baz at B@@QAG?AUA@@U2@@Z"
+// CHECK:       (ptr inalloca(<{ ptr, ptr, %struct.A }>) %0)
+// CHECK:   getelementptr inbounds <{ ptr, ptr, %struct.A }>, ptr %{{.*}}, i32 0, i32 1
+// CHECK:   load ptr, ptr
+// CHECK:   ret ptr
 
 A B::qux(A x) {
   return x;
 }
 
 // CHECK-LABEL: define dso_local x86_fastcallcc void @"?qux at B@@QAI?AUA@@U2@@Z"
-// CHECK:       (%struct.B* inreg noundef %this, %struct.A* inreg noalias sret(%struct.A) align 4 %agg.result, <{ %struct.A }>* inalloca(<{ %struct.A }>) %0)
+// CHECK:       (ptr inreg noundef %this, ptr inreg noalias sret(%struct.A) align 4 %agg.result, ptr inalloca(<{ %struct.A }>) %0)
 // CHECK:   ret void
 
 int main() {
@@ -60,11 +60,11 @@ int main() {
   a = b.qux(a);
 }
 
-// CHECK: call x86_thiscallcc %struct.A* @"?foo at B@@QAE?AUA@@U2@@Z"
-// CHECK:       (%struct.B* noundef %{{[^,]*}}, <{ %struct.A*, %struct.A }>* inalloca(<{ %struct.A*, %struct.A }>) %{{[^,]*}})
-// CHECK: call %struct.A* @"?bar at B@@QAA?AUA@@U2@@Z"
-// CHECK:       (<{ %struct.B*, %struct.A*, %struct.A }>* inalloca(<{ %struct.B*, %struct.A*, %struct.A }>) %{{[^,]*}})
-// CHECK: call x86_stdcallcc %struct.A* @"?baz at B@@QAG?AUA@@U2@@Z"
-// CHECK:       (<{ %struct.B*, %struct.A*, %struct.A }>* inalloca(<{ %struct.B*, %struct.A*, %struct.A }>) %{{[^,]*}})
+// CHECK: call x86_thiscallcc ptr @"?foo at B@@QAE?AUA@@U2@@Z"
+// CHECK:       (ptr noundef %{{[^,]*}}, ptr inalloca(<{ ptr, %struct.A }>) %{{[^,]*}})
+// CHECK: call ptr @"?bar at B@@QAA?AUA@@U2@@Z"
+// CHECK:       (ptr inalloca(<{ ptr, ptr, %struct.A }>) %{{[^,]*}})
+// CHECK: call x86_stdcallcc ptr @"?baz at B@@QAG?AUA@@U2@@Z"
+// CHECK:       (ptr inalloca(<{ ptr, ptr, %struct.A }>) %{{[^,]*}})
 // CHECK: call x86_fastcallcc void @"?qux at B@@QAI?AUA@@U2@@Z"
-// CHECK:       (%struct.B* inreg noundef %{{[^,]*}}, %struct.A* inreg sret(%struct.A) align 4 %{{.*}}, <{ %struct.A }>* inalloca(<{ %struct.A }>) %{{[^,]*}})
+// CHECK:       (ptr inreg noundef %{{[^,]*}}, ptr inreg sret(%struct.A) align 4 %{{.*}}, ptr inalloca(<{ %struct.A }>) %{{[^,]*}})

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp b/clang/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp
index 9acd90af2ff86..66ecf500a8693 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -fno-rtti -triple=i686-pc-win32 -emit-llvm -o - | FileCheck --check-prefix=CHECK32 %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -fno-rtti -triple=x86_64-pc-win32 -emit-llvm -o - | FileCheck --check-prefix=CHECK64 %s
+// RUN: %clang_cc1 %s -fno-rtti -triple=i686-pc-win32 -emit-llvm -o - | FileCheck --check-prefix=CHECK32 %s
+// RUN: %clang_cc1 %s -fno-rtti -triple=x86_64-pc-win32 -emit-llvm -o - | FileCheck --check-prefix=CHECK64 %s
 
 namespace byval_thunk {
 struct Agg {
@@ -15,17 +15,17 @@ struct C : A, B { C(); virtual void foo(Agg x); };
 C::C() {} // force emission
 
 // CHECK32-LABEL: define linkonce_odr dso_local x86_thiscallcc void @"?foo at C@byval_thunk@@W3AEXUAgg at 2@@Z"
-// CHECK32:             (%"struct.byval_thunk::C"* noundef %this, <{ %"struct.byval_thunk::Agg" }>* inalloca(<{ %"struct.byval_thunk::Agg" }>) %0)
-// CHECK32:   getelementptr i8, i8* %{{.*}}, i32 -4
+// CHECK32:             (ptr noundef %this, ptr inalloca(<{ %"struct.byval_thunk::Agg" }>) %0)
+// CHECK32:   getelementptr i8, ptr %{{.*}}, i32 -4
 // CHECK32:   musttail call x86_thiscallcc void @"?foo at C@byval_thunk@@UAEXUAgg at 2@@Z"
-// CHECK32:       (%"struct.byval_thunk::C"* noundef %{{.*}}, <{ %"struct.byval_thunk::Agg" }>* inalloca(<{ %"struct.byval_thunk::Agg" }>) %0)
+// CHECK32:       (ptr noundef %{{.*}}, ptr inalloca(<{ %"struct.byval_thunk::Agg" }>) %0)
 // CHECK32-NEXT: ret void
 
 // CHECK64-LABEL: define linkonce_odr dso_local void @"?foo at C@byval_thunk@@W7EAAXUAgg at 2@@Z"
-// CHECK64:             (%"struct.byval_thunk::C"* noundef %this, %"struct.byval_thunk::Agg"* noundef %x)
-// CHECK64:   getelementptr i8, i8* %{{.*}}, i32 -8
+// CHECK64:             (ptr noundef %this, ptr noundef %x)
+// CHECK64:   getelementptr i8, ptr %{{.*}}, i32 -8
 // CHECK64:   call void @"?foo at C@byval_thunk@@UEAAXUAgg at 2@@Z"
-// CHECK64:       (%"struct.byval_thunk::C"* {{[^,]*}} %{{.*}}, %"struct.byval_thunk::Agg"* noundef %x)
+// CHECK64:       (ptr {{[^,]*}} %{{.*}}, ptr noundef %x)
 // CHECK64-NOT: call
 // CHECK64:   ret void
 }
@@ -44,20 +44,20 @@ struct C : A, B { C(); virtual void __stdcall foo(Agg x); };
 C::C() {} // force emission
 
 // CHECK32-LABEL: define linkonce_odr dso_local x86_stdcallcc void @"?foo at C@stdcall_thunk@@W3AGXUAgg at 2@@Z"
-// CHECK32:             (<{ %"struct.stdcall_thunk::C"*, %"struct.stdcall_thunk::Agg" }>* inalloca(<{ %"struct.stdcall_thunk::C"*, %"struct.stdcall_thunk::Agg" }>) %0)
-// CHECK32:   %[[this_slot:[^ ]*]] = getelementptr inbounds <{ %"struct.stdcall_thunk::C"*, %"struct.stdcall_thunk::Agg" }>, <{ %"struct.stdcall_thunk::C"*, %"struct.stdcall_thunk::Agg" }>* %0, i32 0, i32 0
-// CHECK32:   load %"struct.stdcall_thunk::C"*, %"struct.stdcall_thunk::C"** %[[this_slot]]
-// CHECK32:   getelementptr i8, i8* %{{.*}}, i32 -4
-// CHECK32:   store %"struct.stdcall_thunk::C"* %{{.*}}, %"struct.stdcall_thunk::C"** %[[this_slot]]
+// CHECK32:             (ptr inalloca(<{ ptr, %"struct.stdcall_thunk::Agg" }>) %0)
+// CHECK32:   %[[this_slot:[^ ]*]] = getelementptr inbounds <{ ptr, %"struct.stdcall_thunk::Agg" }>, ptr %0, i32 0, i32 0
+// CHECK32:   load ptr, ptr %[[this_slot]]
+// CHECK32:   getelementptr i8, ptr %{{.*}}, i32 -4
+// CHECK32:   store ptr %{{.*}}, ptr %[[this_slot]]
 // CHECK32:   musttail call x86_stdcallcc void @"?foo at C@stdcall_thunk@@UAGXUAgg at 2@@Z"
-// CHECK32:       (<{ %"struct.stdcall_thunk::C"*, %"struct.stdcall_thunk::Agg" }>*  inalloca(<{ %"struct.stdcall_thunk::C"*, %"struct.stdcall_thunk::Agg" }>) %0)
+// CHECK32:       (ptr  inalloca(<{ ptr, %"struct.stdcall_thunk::Agg" }>) %0)
 // CHECK32-NEXT: ret void
 
 // CHECK64-LABEL: define linkonce_odr dso_local void @"?foo at C@stdcall_thunk@@W7EAAXUAgg at 2@@Z"
-// CHECK64:             (%"struct.stdcall_thunk::C"* noundef %this, %"struct.stdcall_thunk::Agg"* noundef %x)
-// CHECK64:   getelementptr i8, i8* %{{.*}}, i32 -8
+// CHECK64:             (ptr noundef %this, ptr noundef %x)
+// CHECK64:   getelementptr i8, ptr %{{.*}}, i32 -8
 // CHECK64:   call void @"?foo at C@stdcall_thunk@@UEAAXUAgg at 2@@Z"
-// CHECK64:       (%"struct.stdcall_thunk::C"* {{[^,]*}} %{{.*}}, %"struct.stdcall_thunk::Agg"* noundef %x)
+// CHECK64:       (ptr {{[^,]*}} %{{.*}}, ptr noundef %x)
 // CHECK64-NOT: call
 // CHECK64:   ret void
 }
@@ -75,21 +75,21 @@ struct B { virtual Agg __cdecl foo(Agg x); };
 struct C : A, B { C(); virtual Agg __cdecl foo(Agg x); };
 C::C() {} // force emission
 
-// CHECK32-LABEL: define linkonce_odr dso_local %"struct.sret_thunk::Agg"* @"?foo at C@sret_thunk@@W3AA?AUAgg at 2@U32@@Z"
-// CHECK32:             (<{ %"struct.sret_thunk::C"*, %"struct.sret_thunk::Agg"*, %"struct.sret_thunk::Agg" }>* inalloca(<{ %"struct.sret_thunk::C"*, %"struct.sret_thunk::Agg"*, %"struct.sret_thunk::Agg" }>) %0)
-// CHECK32:   %[[this_slot:[^ ]*]] = getelementptr inbounds <{ %"struct.sret_thunk::C"*, %"struct.sret_thunk::Agg"*, %"struct.sret_thunk::Agg" }>, <{ %"struct.sret_thunk::C"*, %"struct.sret_thunk::Agg"*, %"struct.sret_thunk::Agg" }>* %0, i32 0, i32 0
-// CHECK32:   load %"struct.sret_thunk::C"*, %"struct.sret_thunk::C"** %[[this_slot]]
-// CHECK32:   getelementptr i8, i8* %{{.*}}, i32 -4
-// CHECK32:   store %"struct.sret_thunk::C"* %{{.*}}, %"struct.sret_thunk::C"** %[[this_slot]]
-// CHECK32:   %[[rv:[^ ]*]] = musttail call %"struct.sret_thunk::Agg"* @"?foo at C@sret_thunk@@UAA?AUAgg at 2@U32@@Z"
-// CHECK32:       (<{ %"struct.sret_thunk::C"*, %"struct.sret_thunk::Agg"*, %"struct.sret_thunk::Agg" }>*  inalloca(<{ %"struct.sret_thunk::C"*, %"struct.sret_thunk::Agg"*, %"struct.sret_thunk::Agg" }>) %0)
-// CHECK32-NEXT: ret %"struct.sret_thunk::Agg"* %[[rv]]
+// CHECK32-LABEL: define linkonce_odr dso_local ptr @"?foo at C@sret_thunk@@W3AA?AUAgg at 2@U32@@Z"
+// CHECK32:             (ptr inalloca(<{ ptr, ptr, %"struct.sret_thunk::Agg" }>) %0)
+// CHECK32:   %[[this_slot:[^ ]*]] = getelementptr inbounds <{ ptr, ptr, %"struct.sret_thunk::Agg" }>, ptr %0, i32 0, i32 0
+// CHECK32:   load ptr, ptr %[[this_slot]]
+// CHECK32:   getelementptr i8, ptr %{{.*}}, i32 -4
+// CHECK32:   store ptr %{{.*}}, ptr %[[this_slot]]
+// CHECK32:   %[[rv:[^ ]*]] = musttail call ptr @"?foo at C@sret_thunk@@UAA?AUAgg at 2@U32@@Z"
+// CHECK32:       (ptr  inalloca(<{ ptr, ptr, %"struct.sret_thunk::Agg" }>) %0)
+// CHECK32-NEXT: ret ptr %[[rv]]
 
 // CHECK64-LABEL: define linkonce_odr dso_local void @"?foo at C@sret_thunk@@W7EAA?AUAgg at 2@U32@@Z"
-// CHECK64:             (%"struct.sret_thunk::C"* noundef %this, %"struct.sret_thunk::Agg"* noalias sret(%"struct.sret_thunk::Agg") align 4 %agg.result, %"struct.sret_thunk::Agg"* noundef %x)
-// CHECK64:   getelementptr i8, i8* %{{.*}}, i32 -8
+// CHECK64:             (ptr noundef %this, ptr noalias sret(%"struct.sret_thunk::Agg") align 4 %agg.result, ptr noundef %x)
+// CHECK64:   getelementptr i8, ptr %{{.*}}, i32 -8
 // CHECK64:   call void @"?foo at C@sret_thunk@@UEAA?AUAgg at 2@U32@@Z"
-// CHECK64:       (%"struct.sret_thunk::C"* {{[^,]*}} %{{.*}}, %"struct.sret_thunk::Agg"* sret(%"struct.sret_thunk::Agg") align 4 %agg.result, %"struct.sret_thunk::Agg"* noundef %x)
+// CHECK64:       (ptr {{[^,]*}} %{{.*}}, ptr sret(%"struct.sret_thunk::Agg") align 4 %agg.result, ptr noundef %x)
 // CHECK64-NOT: call
 // CHECK64:   ret void
 }

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp b/clang/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp
index cc7811c72d66d..b4a6ff8e6d0ff 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-cdecl-method-sret.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-pc-win32 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i386-pc-win32 -emit-llvm %s -o - | FileCheck %s
 
 // PR15768
 
@@ -19,9 +19,9 @@ S C::variadic_sret(const char *f, ...) { return S(); }
 S C::cdecl_sret() { return S(); }
 S C::byval_and_sret(S a) { return S(); }
 
-// CHECK: define dso_local void @"?variadic_sret at C@@QAA?AUS@@PBDZZ"(%struct.C* {{[^,]*}} %this, %struct.S* noalias sret(%struct.S) align 4 %agg.result, i8* noundef %f, ...)
-// CHECK: define dso_local void @"?cdecl_sret at C@@QAA?AUS@@XZ"(%struct.C* {{[^,]*}} %this, %struct.S* noalias sret(%struct.S) align 4 %agg.result)
-// CHECK: define dso_local void @"?byval_and_sret at C@@QAA?AUS@@U2@@Z"(%struct.C* {{[^,]*}} %this, %struct.S* noalias sret(%struct.S) align 4 %agg.result, %struct.S* noundef byval(%struct.S) align 4 %a)
+// CHECK: define dso_local void @"?variadic_sret at C@@QAA?AUS@@PBDZZ"(ptr {{[^,]*}} %this, ptr noalias sret(%struct.S) align 4 %agg.result, ptr noundef %f, ...)
+// CHECK: define dso_local void @"?cdecl_sret at C@@QAA?AUS@@XZ"(ptr {{[^,]*}} %this, ptr noalias sret(%struct.S) align 4 %agg.result)
+// CHECK: define dso_local void @"?byval_and_sret at C@@QAA?AUS@@U2@@Z"(ptr {{[^,]*}} %this, ptr noalias sret(%struct.S) align 4 %agg.result, ptr noundef byval(%struct.S) align 4 %a)
 
 int main() {
   C c;
@@ -41,4 +41,4 @@ struct A {
 S A::f(int x) {
   return S();
 }
-// CHECK-LABEL: define dso_local x86_fastcallcc void @"?f at A@@QAI?AUS@@H at Z"(%struct.A* inreg noundef nonnull align 1 dereferenceable(1) %this, %struct.S* inreg noalias sret(%struct.S) align 4 %agg.result, i32 noundef %x)
+// CHECK-LABEL: define dso_local x86_fastcallcc void @"?f at A@@QAI?AUS@@H at Z"(ptr inreg noundef nonnull align 1 dereferenceable(1) %this, ptr inreg noalias sret(%struct.S) align 4 %agg.result, i32 noundef %x)

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-eh-terminate.cpp b/clang/test/CodeGenCXX/microsoft-abi-eh-terminate.cpp
index 51e073484f400..07716fed92ea9 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-eh-terminate.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-eh-terminate.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc -mconstructor-aliases -fexceptions -fcxx-exceptions -fms-compatibility-version=18.00 | FileCheck -check-prefix=MSVC2013 -check-prefix=CHECK %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc -mconstructor-aliases -fexceptions -fcxx-exceptions -fms-compatibility-version=19.00 | FileCheck -check-prefix=MSVC2015 -check-prefix=CHECK %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc -mconstructor-aliases -fexceptions -fcxx-exceptions -fms-compatibility-version=18.00 | FileCheck -check-prefix=MSVC2013 -check-prefix=CHECK %s
+// RUN: %clang_cc1 -std=c++11 -emit-llvm %s -o - -triple=x86_64-pc-windows-msvc -mconstructor-aliases -fexceptions -fcxx-exceptions -fms-compatibility-version=19.00 | FileCheck -check-prefix=MSVC2015 -check-prefix=CHECK %s
 
 void may_throw();
 void never_throws() noexcept(true) {
@@ -7,7 +7,7 @@ void never_throws() noexcept(true) {
 }
 
 // CHECK-LABEL: define dso_local void @"?never_throws@@YAXXZ"()
-// CHECK-SAME:          personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+// CHECK-SAME:          personality ptr @__CxxFrameHandler3
 // CHECK:      invoke void @"?may_throw@@YAXXZ"()
 // CHECK:      %[[cp:.*]] = cleanuppad within none []
 // MSVC2013:      call void @"?terminate@@YAXXZ"()

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-extern-template.cpp b/clang/test/CodeGenCXX/microsoft-abi-extern-template.cpp
index 06aa1d039e790..ea12aa64ae305 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-extern-template.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-extern-template.cpp
@@ -1,19 +1,19 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fno-rtti-data -O1 -disable-llvm-passes %s -emit-llvm -o - -triple x86_64-windows-msvc | FileCheck %s
+// RUN: %clang_cc1 -fno-rtti-data -O1 -disable-llvm-passes %s -emit-llvm -o - -triple x86_64-windows-msvc | FileCheck %s
 
 // Even though Foo<int> has an extern template declaration, we have to emit our
 // own copy the vftable when emitting the available externally constructor.
 
-// CHECK: @"??_7?$Foo at H@@6B@" = linkonce_odr unnamed_addr constant { [1 x i8*] } { [1 x i8*] [
-// CHECK-SAME:   i8* bitcast (i8* (%struct.Foo*, i32)* @"??_G?$Foo at H@@UEAAPEAXI at Z" to i8*)
+// CHECK: @"??_7?$Foo at H@@6B@" = linkonce_odr unnamed_addr constant { [1 x ptr] } { [1 x ptr] [
+// CHECK-SAME:   ptr @"??_G?$Foo at H@@UEAAPEAXI at Z"
 // CHECK-SAME: ] }, comdat
 
-// CHECK-LABEL: define dso_local noundef %struct.Foo* @"?f@@YAPEAU?$Foo at H@@XZ"()
-// CHECK: call noundef %struct.Foo* @"??0?$Foo at H@@QEAA at XZ"(%struct.Foo* {{[^,]*}} %{{.*}})
+// CHECK-LABEL: define dso_local noundef ptr @"?f@@YAPEAU?$Foo at H@@XZ"()
+// CHECK: call noundef ptr @"??0?$Foo at H@@QEAA at XZ"(ptr {{[^,]*}} %{{.*}})
 
-// CHECK: define available_externally dso_local noundef %struct.Foo* @"??0?$Foo at H@@QEAA at XZ"(%struct.Foo* {{[^,]*}} returned align 8 dereferenceable(8) %this)
+// CHECK: define available_externally dso_local noundef ptr @"??0?$Foo at H@@QEAA at XZ"(ptr {{[^,]*}} returned align 8 dereferenceable(8) %this)
 // CHECK:   store {{.*}} @"??_7?$Foo at H@@6B@"
 
-// CHECK: define linkonce_odr dso_local noundef i8* @"??_G?$Foo at H@@UEAAPEAXI at Z"(%struct.Foo* {{[^,]*}} %this, i32 noundef %should_call_delete)
+// CHECK: define linkonce_odr dso_local noundef ptr @"??_G?$Foo at H@@UEAAPEAXI at Z"(ptr {{[^,]*}} %this, i32 noundef %should_call_delete)
 
 struct Base {
   virtual ~Base();

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-methods.cpp b/clang/test/CodeGenCXX/microsoft-abi-methods.cpp
index fecc984c22b4f..0c92ff51f32ce 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-methods.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-methods.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 | FileCheck %s
 
 class C {
  public:
@@ -42,7 +42,7 @@ void call_vararg_method() {
   C instance;
   instance.vararg_method("Hello");
 // Make sure that the call uses the right calling convention:
-// CHECK: call void (%class.C*, i8*, ...) @"?vararg_method at C@@QAAXPBDZZ"
+// CHECK: call void (ptr, ptr, ...) @"?vararg_method at C@@QAAXPBDZZ"
 // CHECK: ret
 
 // Make sure that the definition uses the right calling convention:
@@ -71,8 +71,8 @@ void constructors() {
   Child c;
 // Make sure that the Base constructor call noundef in the Child constructor uses
 // the right calling convention:
-// CHECK: define linkonce_odr dso_local x86_thiscallcc noundef %class.Child* @"??0Child@@QAE at XZ"
-// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc noundef %class.Base* @"??0Base@@QAE at XZ"
+// CHECK: define linkonce_odr dso_local x86_thiscallcc noundef ptr @"??0Child@@QAE at XZ"
+// CHECK: %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc noundef ptr @"??0Base@@QAE at XZ"
 // CHECK: ret
 
 // Make sure that the Base destructor call noundef in the Child denstructor uses
@@ -82,7 +82,7 @@ void constructors() {
 // CHECK: ret
 
 // Make sure that the Base constructor definition uses the right CC:
-// CHECK: define linkonce_odr dso_local x86_thiscallcc noundef %class.Base* @"??0Base@@QAE at XZ"
+// CHECK: define linkonce_odr dso_local x86_thiscallcc noundef ptr @"??0Base@@QAE at XZ"
 
 // Make sure that the Base destructor definition uses the right CC:
 // CHECK: define linkonce_odr dso_local x86_thiscallcc void @"??1Base@@QAE at XZ"

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-rtti.cpp b/clang/test/CodeGenCXX/microsoft-abi-rtti.cpp
index e0ec515b913c0..79414f7d4db84 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-rtti.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-rtti.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple=i386-pc-win32 2>/dev/null %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple=x86_64-pc-win32 2>/dev/null %s | FileCheck --check-prefix=X64 %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple=i386-pc-win32 2>/dev/null %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -triple=x86_64-pc-win32 2>/dev/null %s | FileCheck --check-prefix=X64 %s
 
 struct N {};
 struct M : private N {};
@@ -26,242 +26,242 @@ struct Y2 { virtual void f() {} };
 struct A2 : Z2, Y2 {};
 struct B2 : virtual A2 { B2() {} virtual void f() {} } b2;
 
-// CHECK-DAG: @"??_R4B2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 8, i32 4, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUB2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3B2@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUB2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUB2@@\00" }, comdat
-// CHECK-DAG: @"??_R3B2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 4, %rtti.BaseClassDescriptor** getelementptr inbounds ([5 x %rtti.BaseClassDescriptor*], [5 x %rtti.BaseClassDescriptor*]* @"??_R2B2@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2B2@@8" = linkonce_odr constant [5 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@B2@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3FA at A2@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3EA at Z2@@8", %rtti.BaseClassDescriptor* @"??_R13A at 3EA@Y2@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@B2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUB2@@@8" to i8*), i32 3, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3B2@@8" }, comdat
-// CHECK-DAG: @"??_R1A at A@3FA at A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUA2@@@8" to i8*), i32 2, i32 0, i32 0, i32 4, i32 80, %rtti.ClassHierarchyDescriptor* @"??_R3A2@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUA2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUA2@@\00" }, comdat
-// CHECK-DAG: @"??_R3A2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 1, i32 3, %rtti.BaseClassDescriptor** getelementptr inbounds ([4 x %rtti.BaseClassDescriptor*], [4 x %rtti.BaseClassDescriptor*]* @"??_R2A2@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2A2@@8" = linkonce_odr constant [4 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@A2@@8", %rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Z2@@8", %rtti.BaseClassDescriptor* @"??_R13?0A at EA@Y2@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUA2@@@8" to i8*), i32 2, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3A2@@8" }, comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUZ2@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3Z2@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUZ2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUZ2@@\00" }, comdat
-// CHECK-DAG: @"??_R3Z2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*], [2 x %rtti.BaseClassDescriptor*]* @"??_R2Z2@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2Z2@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Z2@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R13?0A at EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUY2@@@8" to i8*), i32 0, i32 4, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3Y2@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUY2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUY2@@\00" }, comdat
-// CHECK-DAG: @"??_R3Y2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*], [2 x %rtti.BaseClassDescriptor*]* @"??_R2Y2@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2Y2@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Y2@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUY2@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3Y2@@8" }, comdat
-// CHECK-DAG: @"??_R1A at A@3EA at Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUZ2@@@8" to i8*), i32 0, i32 0, i32 0, i32 4, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3Z2@@8" }, comdat
-// CHECK-DAG: @"??_R13A at 3EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUY2@@@8" to i8*), i32 0, i32 4, i32 0, i32 4, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3Y2@@8" }, comdat
-// CHECK-DAG: @"??_R4B2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 12, i32 8, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUB2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3B2@@8" }, comdat
-// CHECK-DAG: @"??_R4A2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUA2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3A2@@8" }, comdat
-// CHECK-DAG: @"??_R4A2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUA2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3A2@@8" }, comdat
-// CHECK-DAG: @"??_R4Y2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUY2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3Y2@@8" }, comdat
-// CHECK-DAG: @"??_R4Z2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUZ2@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3Z2@@8" }, comdat
-// CHECK-DAG: @"??_R4B1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 8, i32 4, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUB1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3B1@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUB1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUB1@@\00" }, comdat
-// CHECK-DAG: @"??_R3B1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, %rtti.BaseClassDescriptor** getelementptr inbounds ([3 x %rtti.BaseClassDescriptor*], [3 x %rtti.BaseClassDescriptor*]* @"??_R2B1@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2B1@@8" = linkonce_odr constant [3 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@B1@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3FA at A1@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@B1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUB1@@@8" to i8*), i32 1, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3B1@@8" }, comdat
-// CHECK-DAG: @"??_R1A at A@3FA at A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUA1@@@8" to i8*), i32 0, i32 0, i32 0, i32 4, i32 80, %rtti.ClassHierarchyDescriptor* @"??_R3A1@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUA1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUA1@@\00" }, comdat
-// CHECK-DAG: @"??_R3A1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*], [2 x %rtti.BaseClassDescriptor*]* @"??_R2A1@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2A1@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@A1@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUA1@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3A1@@8" }, comdat
-// CHECK-DAG: @"??_R4A1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUA1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3A1@@8" }, comdat
-// CHECK-DAG: @"??_R4Y1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUY1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3Y1@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUY1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUY1@@\00" }, comdat
-// CHECK-DAG: @"??_R3Y1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 6, %rtti.BaseClassDescriptor** getelementptr inbounds ([7 x %rtti.BaseClassDescriptor*], [7 x %rtti.BaseClassDescriptor*]* @"??_R2Y1@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2Y1@@8" = linkonce_odr constant [7 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Y1@@8", %rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@W1@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3FA at V1@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3EA at X1@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3FA at V1@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3EA at X1@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@Y1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUY1@@@8" to i8*), i32 5, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3Y1@@8" }, comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@W1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUW1@@@8" to i8*), i32 2, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3W1@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUW1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUW1@@\00" }, comdat
-// CHECK-DAG: @"??_R3W1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, %rtti.BaseClassDescriptor** getelementptr inbounds ([4 x %rtti.BaseClassDescriptor*], [4 x %rtti.BaseClassDescriptor*]* @"??_R2W1@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2W1@@8" = linkonce_odr constant [4 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@W1@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3FA at V1@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3EA at X1@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A at A@3FA at V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUV1@@@8" to i8*), i32 1, i32 0, i32 0, i32 4, i32 80, %rtti.ClassHierarchyDescriptor* @"??_R3V1@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUV1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUV1@@\00" }, comdat
-// CHECK-DAG: @"??_R3V1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, %rtti.BaseClassDescriptor** getelementptr inbounds ([3 x %rtti.BaseClassDescriptor*], [3 x %rtti.BaseClassDescriptor*]* @"??_R2V1@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2V1@@8" = linkonce_odr constant [3 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@V1@@8", %rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@X1@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUV1@@@8" to i8*), i32 1, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3V1@@8" }, comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUX1@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3X1@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUX1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUX1@@\00" }, comdat
-// CHECK-DAG: @"??_R3X1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*], [2 x %rtti.BaseClassDescriptor*]* @"??_R2X1@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2X1@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@X1@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A at A@3EA at X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUX1@@@8" to i8*), i32 0, i32 0, i32 0, i32 4, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3X1@@8" }, comdat
-// CHECK-DAG: @"??_R4W1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUW1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3W1@@8" }, comdat
-// CHECK-DAG: @"??_R4V1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUV1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3V1@@8" }, comdat
-// CHECK-DAG: @"??_R4X1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor8* @"??_R0?AUX1@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3X1@@8" }, comdat
-// CHECK-DAG: @"??_R4C@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUC@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3C@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUC@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUC@@\00" }, comdat
-// CHECK-DAG: @"??_R3C@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, %rtti.BaseClassDescriptor** getelementptr inbounds ([4 x %rtti.BaseClassDescriptor*], [4 x %rtti.BaseClassDescriptor*]* @"??_R2C@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2C@@8" = linkonce_odr constant [4 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@C@@8", %rtti.BaseClassDescriptor* @"??_R13?0A at EA@B@@8", %rtti.BaseClassDescriptor* @"??_R13?0A at EA@A@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@C@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUC@@@8" to i8*), i32 2, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3C@@8" }, comdat
-// CHECK-DAG: @"??_R13?0A at EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUB@@@8" to i8*), i32 1, i32 4, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3B@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUB@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUB@@\00" }, comdat
-// CHECK-DAG: @"??_R3B@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, %rtti.BaseClassDescriptor** getelementptr inbounds ([3 x %rtti.BaseClassDescriptor*], [3 x %rtti.BaseClassDescriptor*]* @"??_R2B@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2B@@8" = linkonce_odr constant [3 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@B@@8", %rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@A@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUB@@@8" to i8*), i32 1, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3B@@8" }, comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUA@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3A@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUA@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUA@@\00" }, comdat
-// CHECK-DAG: @"??_R3A@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*], [2 x %rtti.BaseClassDescriptor*]* @"??_R2A@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2A@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@A@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R13?0A at EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUA@@@8" to i8*), i32 0, i32 4, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3A@@8" }, comdat
-// CHECK-DAG: @"??_R4Y@@6BZ@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVY@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3Y@@8" }, comdat
-// CHECK-DAG: @"??_R0?AVY@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AVY@@\00" }, comdat
-// CHECK-DAG: @"??_R3Y@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 9, %rtti.BaseClassDescriptor** getelementptr inbounds ([10 x %rtti.BaseClassDescriptor*], [10 x %rtti.BaseClassDescriptor*]* @"??_R2Y@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2Y@@8" = linkonce_odr constant [10 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Y@@8", %rtti.BaseClassDescriptor* @"??_R1A@?0A at EN@Z@@8", %rtti.BaseClassDescriptor* @"??_R13?0A at EN@W@@8", %rtti.BaseClassDescriptor* @"??_R17?0A at EN@M@@8", %rtti.BaseClassDescriptor* @"??_R17?0A at EN@N@@8", %rtti.BaseClassDescriptor* @"??_R1A at 33FN@V@@8", %rtti.BaseClassDescriptor* @"??_R1A at 33EJ@X@@8", %rtti.BaseClassDescriptor* @"??_R1A at 33FN@V@@8", %rtti.BaseClassDescriptor* @"??_R1A at 33EJ@X@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@Y@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVY@@@8" to i8*), i32 8, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3Y@@8" }, comdat
-// CHECK-DAG: @"??_R1A@?0A at EN@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVZ@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"??_R3Z@@8" }, comdat
-// CHECK-DAG: @"??_R0?AVZ@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AVZ@@\00" }, comdat
-// CHECK-DAG: @"??_R3Z@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*], [2 x %rtti.BaseClassDescriptor*]* @"??_R2Z@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2Z@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Z@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVZ@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3Z@@8" }, comdat
-// CHECK-DAG: @"??_R13?0A at EN@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVW@@@8" to i8*), i32 4, i32 4, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"??_R3W@@8" }, comdat
-// CHECK-DAG: @"??_R0?AVW@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AVW@@\00" }, comdat
-// CHECK-DAG: @"??_R3W@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 5, %rtti.BaseClassDescriptor** getelementptr inbounds ([6 x %rtti.BaseClassDescriptor*], [6 x %rtti.BaseClassDescriptor*]* @"??_R2W@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2W@@8" = linkonce_odr constant [6 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@W@@8", %rtti.BaseClassDescriptor* @"??_R13?0A at EN@M@@8", %rtti.BaseClassDescriptor* @"??_R13?0A at EN@N@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3FN at V@@8", %rtti.BaseClassDescriptor* @"??_R1A at A@3EJ at X@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVW@@@8" to i8*), i32 4, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3W@@8" }, comdat
-// CHECK-DAG: @"??_R13?0A at EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUM@@@8" to i8*), i32 1, i32 4, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"??_R3M@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUM@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUM@@\00" }, comdat
-// CHECK-DAG: @"??_R3M@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, %rtti.BaseClassDescriptor** getelementptr inbounds ([3 x %rtti.BaseClassDescriptor*], [3 x %rtti.BaseClassDescriptor*]* @"??_R2M@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2M@@8" = linkonce_odr constant [3 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@M@@8", %rtti.BaseClassDescriptor* @"??_R1A@?0A at EN@N@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUM@@@8" to i8*), i32 1, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3M@@8" }, comdat
-// CHECK-DAG: @"??_R1A@?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUN@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"??_R3N@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUN@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUN@@\00" }, comdat
-// CHECK-DAG: @"??_R3N@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*], [2 x %rtti.BaseClassDescriptor*]* @"??_R2N@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2N@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@N@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUN@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3N@@8" }, comdat
-// CHECK-DAG: @"??_R13?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUN@@@8" to i8*), i32 0, i32 4, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"??_R3N@@8" }, comdat
-// CHECK-DAG: @"??_R1A at A@3FN at V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVV@@@8" to i8*), i32 1, i32 0, i32 0, i32 4, i32 93, %rtti.ClassHierarchyDescriptor* @"??_R3V@@8" }, comdat
-// CHECK-DAG: @"??_R0?AVV@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AVV@@\00" }, comdat
-// CHECK-DAG: @"??_R3V@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, %rtti.BaseClassDescriptor** getelementptr inbounds ([3 x %rtti.BaseClassDescriptor*], [3 x %rtti.BaseClassDescriptor*]* @"??_R2V@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2V@@8" = linkonce_odr constant [3 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@V@@8", %rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@X@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVV@@@8" to i8*), i32 1, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3V@@8" }, comdat
-// CHECK-DAG: @"??_R1A@?0A at EA@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUX@@@8" to i8*), i32 0, i32 0, i32 -1, i32 0, i32 64, %rtti.ClassHierarchyDescriptor* @"??_R3X@@8" }, comdat
-// CHECK-DAG: @"??_R0?AUX@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUX@@\00" }, comdat
-// CHECK-DAG: @"??_R3X@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, %rtti.BaseClassDescriptor** getelementptr inbounds ([2 x %rtti.BaseClassDescriptor*], [2 x %rtti.BaseClassDescriptor*]* @"??_R2X@@8", i32 0, i32 0) }, comdat
-// CHECK-DAG: @"??_R2X@@8" = linkonce_odr constant [2 x %rtti.BaseClassDescriptor*] [%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@X@@8", %rtti.BaseClassDescriptor* null], comdat
-// CHECK-DAG: @"??_R1A at A@3EJ at X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUX@@@8" to i8*), i32 0, i32 0, i32 0, i32 4, i32 73, %rtti.ClassHierarchyDescriptor* @"??_R3X@@8" }, comdat
-// CHECK-DAG: @"??_R17?0A at EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUM@@@8" to i8*), i32 1, i32 8, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"??_R3M@@8" }, comdat
-// CHECK-DAG: @"??_R17?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUN@@@8" to i8*), i32 0, i32 8, i32 -1, i32 0, i32 77, %rtti.ClassHierarchyDescriptor* @"??_R3N@@8" }, comdat
-// CHECK-DAG: @"??_R1A at 33FN@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVV@@@8" to i8*), i32 1, i32 0, i32 4, i32 4, i32 93, %rtti.ClassHierarchyDescriptor* @"??_R3V@@8" }, comdat
-// CHECK-DAG: @"??_R1A at 33EJ@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUX@@@8" to i8*), i32 0, i32 0, i32 4, i32 4, i32 73, %rtti.ClassHierarchyDescriptor* @"??_R3X@@8" }, comdat
-// CHECK-DAG: @"??_R4Y@@6BW@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 8, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVY@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3Y@@8" }, comdat
-// CHECK-DAG: @"??_R4W@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVW@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3W@@8" }, comdat
-// CHECK-DAG: @"??_R4Z@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVZ@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3Z@@8" }, comdat
-// CHECK-DAG: @"??_R4V@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AVV@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3V@@8" }, comdat
-// CHECK-DAG: @"??_R4X@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUX@@@8" to i8*), %rtti.ClassHierarchyDescriptor* @"??_R3X@@8" }, comdat
+// CHECK-DAG: @"??_R4B2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 8, i32 4, ptr @"??_R0?AUB2@@@8", ptr @"??_R3B2@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUB2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUB2@@\00" }, comdat
+// CHECK-DAG: @"??_R3B2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 4, ptr @"??_R2B2@@8" }, comdat
+// CHECK-DAG: @"??_R2B2@@8" = linkonce_odr constant [5 x ptr] [ptr @"??_R1A@?0A at EA@B2@@8", ptr @"??_R1A at A@3FA at A2@@8", ptr @"??_R1A at A@3EA at Z2@@8", ptr @"??_R13A at 3EA@Y2@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@B2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUB2@@@8", i32 3, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3B2@@8" }, comdat
+// CHECK-DAG: @"??_R1A at A@3FA at A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUA2@@@8", i32 2, i32 0, i32 0, i32 4, i32 80, ptr @"??_R3A2@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUA2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUA2@@\00" }, comdat
+// CHECK-DAG: @"??_R3A2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 1, i32 3, ptr @"??_R2A2@@8" }, comdat
+// CHECK-DAG: @"??_R2A2@@8" = linkonce_odr constant [4 x ptr] [ptr @"??_R1A@?0A at EA@A2@@8", ptr @"??_R1A@?0A at EA@Z2@@8", ptr @"??_R13?0A at EA@Y2@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUA2@@@8", i32 2, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3A2@@8" }, comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUZ2@@@8", i32 0, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3Z2@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUZ2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUZ2@@\00" }, comdat
+// CHECK-DAG: @"??_R3Z2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, ptr @"??_R2Z2@@8" }, comdat
+// CHECK-DAG: @"??_R2Z2@@8" = linkonce_odr constant [2 x ptr] [ptr @"??_R1A@?0A at EA@Z2@@8", ptr null], comdat
+// CHECK-DAG: @"??_R13?0A at EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUY2@@@8", i32 0, i32 4, i32 -1, i32 0, i32 64, ptr @"??_R3Y2@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUY2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUY2@@\00" }, comdat
+// CHECK-DAG: @"??_R3Y2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, ptr @"??_R2Y2@@8" }, comdat
+// CHECK-DAG: @"??_R2Y2@@8" = linkonce_odr constant [2 x ptr] [ptr @"??_R1A@?0A at EA@Y2@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUY2@@@8", i32 0, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3Y2@@8" }, comdat
+// CHECK-DAG: @"??_R1A at A@3EA at Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUZ2@@@8", i32 0, i32 0, i32 0, i32 4, i32 64, ptr @"??_R3Z2@@8" }, comdat
+// CHECK-DAG: @"??_R13A at 3EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUY2@@@8", i32 0, i32 4, i32 0, i32 4, i32 64, ptr @"??_R3Y2@@8" }, comdat
+// CHECK-DAG: @"??_R4B2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 12, i32 8, ptr @"??_R0?AUB2@@@8", ptr @"??_R3B2@@8" }, comdat
+// CHECK-DAG: @"??_R4A2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AUA2@@@8", ptr @"??_R3A2@@8" }, comdat
+// CHECK-DAG: @"??_R4A2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, ptr @"??_R0?AUA2@@@8", ptr @"??_R3A2@@8" }, comdat
+// CHECK-DAG: @"??_R4Y2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AUY2@@@8", ptr @"??_R3Y2@@8" }, comdat
+// CHECK-DAG: @"??_R4Z2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AUZ2@@@8", ptr @"??_R3Z2@@8" }, comdat
+// CHECK-DAG: @"??_R4B1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 8, i32 4, ptr @"??_R0?AUB1@@@8", ptr @"??_R3B1@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUB1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUB1@@\00" }, comdat
+// CHECK-DAG: @"??_R3B1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, ptr @"??_R2B1@@8" }, comdat
+// CHECK-DAG: @"??_R2B1@@8" = linkonce_odr constant [3 x ptr] [ptr @"??_R1A@?0A at EA@B1@@8", ptr @"??_R1A at A@3FA at A1@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@B1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUB1@@@8", i32 1, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3B1@@8" }, comdat
+// CHECK-DAG: @"??_R1A at A@3FA at A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUA1@@@8", i32 0, i32 0, i32 0, i32 4, i32 80, ptr @"??_R3A1@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUA1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUA1@@\00" }, comdat
+// CHECK-DAG: @"??_R3A1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, ptr @"??_R2A1@@8" }, comdat
+// CHECK-DAG: @"??_R2A1@@8" = linkonce_odr constant [2 x ptr] [ptr @"??_R1A@?0A at EA@A1@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUA1@@@8", i32 0, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3A1@@8" }, comdat
+// CHECK-DAG: @"??_R4A1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AUA1@@@8", ptr @"??_R3A1@@8" }, comdat
+// CHECK-DAG: @"??_R4Y1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, ptr @"??_R0?AUY1@@@8", ptr @"??_R3Y1@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUY1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUY1@@\00" }, comdat
+// CHECK-DAG: @"??_R3Y1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 6, ptr @"??_R2Y1@@8" }, comdat
+// CHECK-DAG: @"??_R2Y1@@8" = linkonce_odr constant [7 x ptr] [ptr @"??_R1A@?0A at EA@Y1@@8", ptr @"??_R1A@?0A at EA@W1@@8", ptr @"??_R1A at A@3FA at V1@@8", ptr @"??_R1A at A@3EA at X1@@8", ptr @"??_R1A at A@3FA at V1@@8", ptr @"??_R1A at A@3EA at X1@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@Y1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUY1@@@8", i32 5, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3Y1@@8" }, comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@W1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUW1@@@8", i32 2, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3W1@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUW1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUW1@@\00" }, comdat
+// CHECK-DAG: @"??_R3W1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, ptr @"??_R2W1@@8" }, comdat
+// CHECK-DAG: @"??_R2W1@@8" = linkonce_odr constant [4 x ptr] [ptr @"??_R1A@?0A at EA@W1@@8", ptr @"??_R1A at A@3FA at V1@@8", ptr @"??_R1A at A@3EA at X1@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A at A@3FA at V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUV1@@@8", i32 1, i32 0, i32 0, i32 4, i32 80, ptr @"??_R3V1@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUV1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUV1@@\00" }, comdat
+// CHECK-DAG: @"??_R3V1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, ptr @"??_R2V1@@8" }, comdat
+// CHECK-DAG: @"??_R2V1@@8" = linkonce_odr constant [3 x ptr] [ptr @"??_R1A@?0A at EA@V1@@8", ptr @"??_R1A@?0A at EA@X1@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUV1@@@8", i32 1, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3V1@@8" }, comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUX1@@@8", i32 0, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3X1@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUX1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUX1@@\00" }, comdat
+// CHECK-DAG: @"??_R3X1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, ptr @"??_R2X1@@8" }, comdat
+// CHECK-DAG: @"??_R2X1@@8" = linkonce_odr constant [2 x ptr] [ptr @"??_R1A@?0A at EA@X1@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A at A@3EA at X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUX1@@@8", i32 0, i32 0, i32 0, i32 4, i32 64, ptr @"??_R3X1@@8" }, comdat
+// CHECK-DAG: @"??_R4W1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, ptr @"??_R0?AUW1@@@8", ptr @"??_R3W1@@8" }, comdat
+// CHECK-DAG: @"??_R4V1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AUV1@@@8", ptr @"??_R3V1@@8" }, comdat
+// CHECK-DAG: @"??_R4X1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AUX1@@@8", ptr @"??_R3X1@@8" }, comdat
+// CHECK-DAG: @"??_R4C@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AUC@@@8", ptr @"??_R3C@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUC@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUC@@\00" }, comdat
+// CHECK-DAG: @"??_R3C@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, ptr @"??_R2C@@8" }, comdat
+// CHECK-DAG: @"??_R2C@@8" = linkonce_odr constant [4 x ptr] [ptr @"??_R1A@?0A at EA@C@@8", ptr @"??_R13?0A at EA@B@@8", ptr @"??_R13?0A at EA@A@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@C@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUC@@@8", i32 2, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3C@@8" }, comdat
+// CHECK-DAG: @"??_R13?0A at EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUB@@@8", i32 1, i32 4, i32 -1, i32 0, i32 64, ptr @"??_R3B@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUB@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUB@@\00" }, comdat
+// CHECK-DAG: @"??_R3B@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, ptr @"??_R2B@@8" }, comdat
+// CHECK-DAG: @"??_R2B@@8" = linkonce_odr constant [3 x ptr] [ptr @"??_R1A@?0A at EA@B@@8", ptr @"??_R1A@?0A at EA@A@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUB@@@8", i32 1, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3B@@8" }, comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUA@@@8", i32 0, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3A@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUA@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUA@@\00" }, comdat
+// CHECK-DAG: @"??_R3A@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, ptr @"??_R2A@@8" }, comdat
+// CHECK-DAG: @"??_R2A@@8" = linkonce_odr constant [2 x ptr] [ptr @"??_R1A@?0A at EA@A@@8", ptr null], comdat
+// CHECK-DAG: @"??_R13?0A at EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUA@@@8", i32 0, i32 4, i32 -1, i32 0, i32 64, ptr @"??_R3A@@8" }, comdat
+// CHECK-DAG: @"??_R4Y@@6BZ@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AVY@@@8", ptr @"??_R3Y@@8" }, comdat
+// CHECK-DAG: @"??_R0?AVY@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AVY@@\00" }, comdat
+// CHECK-DAG: @"??_R3Y@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 9, ptr @"??_R2Y@@8" }, comdat
+// CHECK-DAG: @"??_R2Y@@8" = linkonce_odr constant [10 x ptr] [ptr @"??_R1A@?0A at EA@Y@@8", ptr @"??_R1A@?0A at EN@Z@@8", ptr @"??_R13?0A at EN@W@@8", ptr @"??_R17?0A at EN@M@@8", ptr @"??_R17?0A at EN@N@@8", ptr @"??_R1A at 33FN@V@@8", ptr @"??_R1A at 33EJ@X@@8", ptr @"??_R1A at 33FN@V@@8", ptr @"??_R1A at 33EJ@X@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@Y@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AVY@@@8", i32 8, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3Y@@8" }, comdat
+// CHECK-DAG: @"??_R1A@?0A at EN@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AVZ@@@8", i32 0, i32 0, i32 -1, i32 0, i32 77, ptr @"??_R3Z@@8" }, comdat
+// CHECK-DAG: @"??_R0?AVZ@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AVZ@@\00" }, comdat
+// CHECK-DAG: @"??_R3Z@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, ptr @"??_R2Z@@8" }, comdat
+// CHECK-DAG: @"??_R2Z@@8" = linkonce_odr constant [2 x ptr] [ptr @"??_R1A@?0A at EA@Z@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AVZ@@@8", i32 0, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3Z@@8" }, comdat
+// CHECK-DAG: @"??_R13?0A at EN@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AVW@@@8", i32 4, i32 4, i32 -1, i32 0, i32 77, ptr @"??_R3W@@8" }, comdat
+// CHECK-DAG: @"??_R0?AVW@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AVW@@\00" }, comdat
+// CHECK-DAG: @"??_R3W@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 5, ptr @"??_R2W@@8" }, comdat
+// CHECK-DAG: @"??_R2W@@8" = linkonce_odr constant [6 x ptr] [ptr @"??_R1A@?0A at EA@W@@8", ptr @"??_R13?0A at EN@M@@8", ptr @"??_R13?0A at EN@N@@8", ptr @"??_R1A at A@3FN at V@@8", ptr @"??_R1A at A@3EJ at X@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AVW@@@8", i32 4, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3W@@8" }, comdat
+// CHECK-DAG: @"??_R13?0A at EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUM@@@8", i32 1, i32 4, i32 -1, i32 0, i32 77, ptr @"??_R3M@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUM@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUM@@\00" }, comdat
+// CHECK-DAG: @"??_R3M@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, ptr @"??_R2M@@8" }, comdat
+// CHECK-DAG: @"??_R2M@@8" = linkonce_odr constant [3 x ptr] [ptr @"??_R1A@?0A at EA@M@@8", ptr @"??_R1A@?0A at EN@N@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUM@@@8", i32 1, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3M@@8" }, comdat
+// CHECK-DAG: @"??_R1A@?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUN@@@8", i32 0, i32 0, i32 -1, i32 0, i32 77, ptr @"??_R3N@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUN@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUN@@\00" }, comdat
+// CHECK-DAG: @"??_R3N@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, ptr @"??_R2N@@8" }, comdat
+// CHECK-DAG: @"??_R2N@@8" = linkonce_odr constant [2 x ptr] [ptr @"??_R1A@?0A at EA@N@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUN@@@8", i32 0, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3N@@8" }, comdat
+// CHECK-DAG: @"??_R13?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUN@@@8", i32 0, i32 4, i32 -1, i32 0, i32 77, ptr @"??_R3N@@8" }, comdat
+// CHECK-DAG: @"??_R1A at A@3FN at V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AVV@@@8", i32 1, i32 0, i32 0, i32 4, i32 93, ptr @"??_R3V@@8" }, comdat
+// CHECK-DAG: @"??_R0?AVV@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AVV@@\00" }, comdat
+// CHECK-DAG: @"??_R3V@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, ptr @"??_R2V@@8" }, comdat
+// CHECK-DAG: @"??_R2V@@8" = linkonce_odr constant [3 x ptr] [ptr @"??_R1A@?0A at EA@V@@8", ptr @"??_R1A@?0A at EA@X@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AVV@@@8", i32 1, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3V@@8" }, comdat
+// CHECK-DAG: @"??_R1A@?0A at EA@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUX@@@8", i32 0, i32 0, i32 -1, i32 0, i32 64, ptr @"??_R3X@@8" }, comdat
+// CHECK-DAG: @"??_R0?AUX@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUX@@\00" }, comdat
+// CHECK-DAG: @"??_R3X@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, ptr @"??_R2X@@8" }, comdat
+// CHECK-DAG: @"??_R2X@@8" = linkonce_odr constant [2 x ptr] [ptr @"??_R1A@?0A at EA@X@@8", ptr null], comdat
+// CHECK-DAG: @"??_R1A at A@3EJ at X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUX@@@8", i32 0, i32 0, i32 0, i32 4, i32 73, ptr @"??_R3X@@8" }, comdat
+// CHECK-DAG: @"??_R17?0A at EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUM@@@8", i32 1, i32 8, i32 -1, i32 0, i32 77, ptr @"??_R3M@@8" }, comdat
+// CHECK-DAG: @"??_R17?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUN@@@8", i32 0, i32 8, i32 -1, i32 0, i32 77, ptr @"??_R3N@@8" }, comdat
+// CHECK-DAG: @"??_R1A at 33FN@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AVV@@@8", i32 1, i32 0, i32 4, i32 4, i32 93, ptr @"??_R3V@@8" }, comdat
+// CHECK-DAG: @"??_R1A at 33EJ@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { ptr @"??_R0?AUX@@@8", i32 0, i32 0, i32 4, i32 4, i32 73, ptr @"??_R3X@@8" }, comdat
+// CHECK-DAG: @"??_R4Y@@6BW@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 8, i32 0, ptr @"??_R0?AVY@@@8", ptr @"??_R3Y@@8" }, comdat
+// CHECK-DAG: @"??_R4W@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 4, i32 0, ptr @"??_R0?AVW@@@8", ptr @"??_R3W@@8" }, comdat
+// CHECK-DAG: @"??_R4Z@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AVZ@@@8", ptr @"??_R3Z@@8" }, comdat
+// CHECK-DAG: @"??_R4V@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AVV@@@8", ptr @"??_R3V@@8" }, comdat
+// CHECK-DAG: @"??_R4X@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 0, i32 0, i32 0, ptr @"??_R0?AUX@@@8", ptr @"??_R3X@@8" }, comdat
 
-// X64-DAG: @"??_R4B2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 16, i32 4, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUB2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3B2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4B2@@6BZ2@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUB2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUB2@@\00" }, comdat
-// X64-DAG: @"??_R3B2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 4, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([5 x i32]* @"??_R2B2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2B2@@8" = linkonce_odr constant [5 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@B2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3FA at A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3EA at Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R17A at 3EA@Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@B2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUB2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 3, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3B2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A at A@3FA at A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUA2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 2, i32 0, i32 0, i32 4, i32 80, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUA2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUA2@@\00" }, comdat
-// X64-DAG: @"??_R3A2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 1, i32 3, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([4 x i32]* @"??_R2A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2A2@@8" = linkonce_odr constant [4 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R17?0A at EA@Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUA2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 2, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A@?0A at EA@Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUZ2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUZ2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUZ2@@\00" }, comdat
-// X64-DAG: @"??_R3Z2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"??_R2Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2Z2@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R17?0A at EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUY2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 8, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUY2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUY2@@\00" }, comdat
-// X64-DAG: @"??_R3Y2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"??_R2Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2Y2@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUY2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A at A@3EA at Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUZ2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R17A at 3EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUY2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 8, i32 0, i32 4, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4B2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 24, i32 12, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUB2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3B2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4B2@@6BY2@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4A2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUA2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4A2@@6BZ2@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4A2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUA2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3A2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4A2@@6BY2@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4Y2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUY2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Y2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4Y2@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4Z2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUZ2@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Z2@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4Z2@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4B1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 16, i32 4, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUB1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3B1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4B1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUB1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUB1@@\00" }, comdat
-// X64-DAG: @"??_R3B1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([3 x i32]* @"??_R2B1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2B1@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@B1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3FA at A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@B1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUB1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3B1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A at A@3FA at A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUA1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 80, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUA1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUA1@@\00" }, comdat
-// X64-DAG: @"??_R3A1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"??_R2A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2A1@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUA1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4A1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUA1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3A1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4A1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4Y1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUY1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Y1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4Y1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUY1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUY1@@\00" }, comdat
-// X64-DAG: @"??_R3Y1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 6, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([7 x i32]* @"??_R2Y1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2Y1@@8" = linkonce_odr constant [7 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Y1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@W1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3FA at V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3EA at X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3FA at V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3EA at X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@Y1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUY1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 5, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Y1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A@?0A at EA@W1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUW1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 2, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3W1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUW1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUW1@@\00" }, comdat
-// X64-DAG: @"??_R3W1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([4 x i32]* @"??_R2W1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2W1@@8" = linkonce_odr constant [4 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@W1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3FA at V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3EA at X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A at A@3FA at V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUV1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 0, i32 4, i32 80, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUV1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUV1@@\00" }, comdat
-// X64-DAG: @"??_R3V1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([3 x i32]* @"??_R2V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2V1@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUV1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A@?0A at EA@X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUX1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUX1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { i8** @"??_7type_info@@6B@", i8* null, [9 x i8] c".?AUX1@@\00" }, comdat
-// X64-DAG: @"??_R3X1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"??_R2X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2X1@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A at A@3EA at X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUX1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4W1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUW1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3W1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4W1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4V1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUV1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3V1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4V1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4X1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor8* @"??_R0?AUX1@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3X1@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4X1@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4C@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUC@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3C@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4C@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUC@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUC@@\00" }, comdat
-// X64-DAG: @"??_R3C@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([4 x i32]* @"??_R2C@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2C@@8" = linkonce_odr constant [4 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@C@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R17?0A at EA@B@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R17?0A at EA@A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@C@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUC@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 2, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3C@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R17?0A at EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUB@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 8, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3B@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUB@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUB@@\00" }, comdat
-// X64-DAG: @"??_R3B@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([3 x i32]* @"??_R2B@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2B@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@B@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUB@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3B@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A@?0A at EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUA@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUA@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUA@@\00" }, comdat
-// X64-DAG: @"??_R3A@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"??_R2A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2A@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R17?0A at EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUA@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 8, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3A@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4Y@@6BZ@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVY@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Y@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4Y@@6BZ@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AVY@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AVY@@\00" }, comdat
-// X64-DAG: @"??_R3Y@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 9, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([10 x i32]* @"??_R2Y@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2Y@@8" = linkonce_odr constant [10 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Y@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EN@Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R17?0A at EN@W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1BA@?0A at EN@M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1BA@?0A at EN@N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at 73FN@V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at 73EJ@X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at 73FN@V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at 73EJ@X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@Y@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVY@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 8, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Y@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A@?0A at EN@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVZ@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AVZ@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AVZ@@\00" }, comdat
-// X64-DAG: @"??_R3Z@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"??_R2Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2Z@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVZ@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R17?0A at EN@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVW@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 4, i32 8, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AVW@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AVW@@\00" }, comdat
-// X64-DAG: @"??_R3W@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 5, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([6 x i32]* @"??_R2W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2W@@8" = linkonce_odr constant [6 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R17?0A at EN@M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R17?0A at EN@N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3FN at V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A at A@3EJ at X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVW@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 4, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R17?0A at EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUM@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 8, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUM@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUM@@\00" }, comdat
-// X64-DAG: @"??_R3M@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([3 x i32]* @"??_R2M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2M@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EN@N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUM@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A@?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUN@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUN@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUN@@\00" }, comdat
-// X64-DAG: @"??_R3N@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"??_R2N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2N@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUN@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R17?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUN@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 8, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A at A@3FN at V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVV@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 0, i32 4, i32 93, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AVV@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AVV@@\00" }, comdat
-// X64-DAG: @"??_R3V@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([3 x i32]* @"??_R2V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2V@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A@?0A at EA@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVV@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A@?0A at EA@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUX@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R0?AUX@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUX@@\00" }, comdat
-// X64-DAG: @"??_R3X@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint ([2 x i32]* @"??_R2X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R2X@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.BaseClassDescriptor* @"??_R1A@?0A at EA@X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0], comdat
-// X64-DAG: @"??_R1A at A@3EJ at X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUX@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 73, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1BA@?0A at EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUM@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 16, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3M@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1BA@?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUN@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 16, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3N@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A at 73FN@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVV@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 1, i32 0, i32 8, i32 4, i32 93, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R1A at 73EJ@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUX@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 0, i32 0, i32 8, i32 4, i32 73, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4Y@@6BW@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 16, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVY@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Y@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4Y@@6BW@@@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4W@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVW@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3W@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4W@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4Z@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVZ@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3Z@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4Z@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4V@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AVV@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3V@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4V@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
-// X64-DAG: @"??_R4X@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.TypeDescriptor7* @"??_R0?AUX@@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.ClassHierarchyDescriptor* @"??_R3X@@8" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (%rtti.CompleteObjectLocator* @"??_R4X@@6B@" to i64), i64 ptrtoint (i8* @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4B2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 16, i32 4, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUB2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3B2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4B2@@6BZ2@@@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUB2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUB2@@\00" }, comdat
+// X64-DAG: @"??_R3B2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 4, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2B2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2B2@@8" = linkonce_odr constant [5 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@B2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3FA at A2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3EA at Z2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R17A at 3EA@Y2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@B2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUB2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 3, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3B2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A at A@3FA at A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUA2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 2, i32 0, i32 0, i32 4, i32 80, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3A2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUA2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUA2@@\00" }, comdat
+// X64-DAG: @"??_R3A2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 1, i32 3, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2A2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2A2@@8" = linkonce_odr constant [4 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@A2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@Z2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R17?0A at EA@Y2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@A2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUA2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 2, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3A2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A@?0A at EA@Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUZ2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Z2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUZ2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUZ2@@\00" }, comdat
+// X64-DAG: @"??_R3Z2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2Z2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2Z2@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@Z2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R17?0A at EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUY2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 8, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Y2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUY2@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUY2@@\00" }, comdat
+// X64-DAG: @"??_R3Y2@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2Y2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2Y2@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@Y2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUY2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Y2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A at A@3EA at Z2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUZ2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Z2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R17A at 3EA@Y2@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUY2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 8, i32 0, i32 4, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Y2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4B2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 24, i32 12, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUB2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3B2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4B2@@6BY2@@@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4A2@@6BZ2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUA2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3A2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4A2@@6BZ2@@@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4A2@@6BY2@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUA2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3A2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4A2@@6BY2@@@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4Y2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUY2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Y2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4Y2@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4Z2@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUZ2@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Z2@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4Z2@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4B1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 16, i32 4, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUB1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3B1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4B1@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUB1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUB1@@\00" }, comdat
+// X64-DAG: @"??_R3B1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2B1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2B1@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@B1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3FA at A1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@B1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUB1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3B1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A at A@3FA at A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUA1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 80, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3A1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUA1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUA1@@\00" }, comdat
+// X64-DAG: @"??_R3A1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2A1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2A1@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@A1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@A1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUA1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3A1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4A1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUA1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3A1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4A1@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4Y1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUY1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Y1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4Y1@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUY1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUY1@@\00" }, comdat
+// X64-DAG: @"??_R3Y1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 6, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2Y1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2Y1@@8" = linkonce_odr constant [7 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@Y1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@W1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3FA at V1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3EA at X1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3FA at V1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3EA at X1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@Y1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUY1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 5, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Y1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A@?0A at EA@W1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUW1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 2, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3W1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUW1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUW1@@\00" }, comdat
+// X64-DAG: @"??_R3W1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2W1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2W1@@8" = linkonce_odr constant [4 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@W1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3FA at V1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3EA at X1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A at A@3FA at V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUV1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 0, i32 0, i32 4, i32 80, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3V1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUV1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUV1@@\00" }, comdat
+// X64-DAG: @"??_R3V1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2V1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2V1@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@V1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@X1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@V1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUV1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3V1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A@?0A at EA@X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUX1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3X1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUX1@@@8" = linkonce_odr global %rtti.TypeDescriptor8 { ptr @"??_7type_info@@6B@", ptr null, [9 x i8] c".?AUX1@@\00" }, comdat
+// X64-DAG: @"??_R3X1@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2X1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2X1@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@X1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A at A@3EA at X1@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUX1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3X1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4W1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUW1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3W1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4W1@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4V1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUV1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3V1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4V1@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4X1@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUX1@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3X1@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4X1@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4C@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUC@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3C@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4C@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUC@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUC@@\00" }, comdat
+// X64-DAG: @"??_R3C@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 3, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2C@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2C@@8" = linkonce_odr constant [4 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@C@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R17?0A at EA@B@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R17?0A at EA@A@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@C@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUC@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 2, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3C@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R17?0A at EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUB@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 8, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3B@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUB@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUB@@\00" }, comdat
+// X64-DAG: @"??_R3B@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2B@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2B@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@B@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@A@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@B@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUB@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3B@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A@?0A at EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUA@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3A@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUA@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUA@@\00" }, comdat
+// X64-DAG: @"??_R3A@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2A@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2A@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@A@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R17?0A at EA@A@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUA@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 8, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3A@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4Y@@6BZ@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVY@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Y@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4Y@@6BZ@@@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AVY@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AVY@@\00" }, comdat
+// X64-DAG: @"??_R3Y@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 9, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2Y@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2Y@@8" = linkonce_odr constant [10 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@Y@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EN@Z@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R17?0A at EN@W@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1BA@?0A at EN@M@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1BA@?0A at EN@N@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at 73FN@V@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at 73EJ@X@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at 73FN@V@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at 73EJ@X@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@Y@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVY@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 8, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Y@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A@?0A at EN@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVZ@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Z@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AVZ@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AVZ@@\00" }, comdat
+// X64-DAG: @"??_R3Z@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2Z@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2Z@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@Z@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@Z@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVZ@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Z@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R17?0A at EN@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVW@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 4, i32 8, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3W@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AVW@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AVW@@\00" }, comdat
+// X64-DAG: @"??_R3W@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 3, i32 5, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2W@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2W@@8" = linkonce_odr constant [6 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@W@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R17?0A at EN@M@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R17?0A at EN@N@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3FN at V@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A at A@3EJ at X@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@W@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVW@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 4, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3W@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R17?0A at EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUM@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 8, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3M@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUM@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUM@@\00" }, comdat
+// X64-DAG: @"??_R3M@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2M@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2M@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@M@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EN@N@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUM@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3M@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A@?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUN@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3N@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUN@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUN@@\00" }, comdat
+// X64-DAG: @"??_R3N@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2N@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2N@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@N@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUN@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3N@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R17?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUN@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 8, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3N@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A at A@3FN at V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVV@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 0, i32 0, i32 4, i32 93, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3V@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AVV@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AVV@@\00" }, comdat
+// X64-DAG: @"??_R3V@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 2, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2V@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2V@@8" = linkonce_odr constant [3 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@V@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@X@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A@?0A at EA@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVV@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3V@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A@?0A at EA@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUX@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 -1, i32 0, i32 64, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3X@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R0?AUX@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUX@@\00" }, comdat
+// X64-DAG: @"??_R3X@@8" = linkonce_odr constant %rtti.ClassHierarchyDescriptor { i32 0, i32 0, i32 1, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R2X@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R2X@@8" = linkonce_odr constant [2 x i32] [i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R1A@?0A at EA@X@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0], comdat
+// X64-DAG: @"??_R1A at A@3EJ at X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUX@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 0, i32 4, i32 73, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3X@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1BA@?0A at EN@M@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUM@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 16, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3M@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1BA@?0A at EN@N@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUN@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 16, i32 -1, i32 0, i32 77, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3N@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A at 73FN@V@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVV@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 1, i32 0, i32 8, i32 4, i32 93, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3V@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R1A at 73EJ@X@@8" = linkonce_odr constant %rtti.BaseClassDescriptor { i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUX@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 0, i32 0, i32 8, i32 4, i32 73, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3X@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4Y@@6BW@@@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 16, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVY@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Y@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4Y@@6BW@@@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4W@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 8, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVW@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3W@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4W@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4Z@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVZ@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3Z@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4Z@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4V@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AVV@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3V@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4V@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat
+// X64-DAG: @"??_R4X@@6B@" = linkonce_odr constant %rtti.CompleteObjectLocator { i32 1, i32 0, i32 0, i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R0?AUX@@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R3X@@8" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32), i32 trunc (i64 sub nuw nsw (i64 ptrtoint (ptr @"??_R4X@@6B@" to i64), i64 ptrtoint (ptr @__ImageBase to i64)) to i32) }, comdat

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-static-initializers.cpp b/clang/test/CodeGenCXX/microsoft-abi-static-initializers.cpp
index a912b6e27686c..fa7670c744814 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-static-initializers.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-static-initializers.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -fno-threadsafe-statics -emit-llvm %s -o - -mconstructor-aliases -triple=i386-pc-win32 | FileCheck %s
-
-// CHECK: @llvm.global_ctors = appending global [5 x { i32, void ()*, i8* }] [
-// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @"??__Eselectany1@@YAXXZ", i8* getelementptr inbounds (%struct.S, %struct.S* @"?selectany1@@3US@@A", i32 0, i32 0) },
-// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @"??__Eselectany2@@YAXXZ", i8* getelementptr inbounds (%struct.S, %struct.S* @"?selectany2@@3US@@A", i32 0, i32 0) },
-// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @"??__E?s@?$ExportedTemplate at H@@2US@@A@@YAXXZ", i8* getelementptr inbounds (%struct.S, %struct.S* @"?s@?$ExportedTemplate at H@@2US@@A", i32 0, i32 0) },
-// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @"??__E?foo@?$B at H@@2VA@@A@@YAXXZ", i8* bitcast (%class.A* @"?foo@?$B at H@@2VA@@A" to i8*) },
-// CHECK: { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_microsoft_abi_static_initializers.cpp, i8* null }
+// RUN: %clang_cc1 -fms-extensions -fno-threadsafe-statics -emit-llvm %s -o - -mconstructor-aliases -triple=i386-pc-win32 | FileCheck %s
+
+// CHECK: @llvm.global_ctors = appending global [5 x { i32, ptr, ptr }] [
+// CHECK: { i32, ptr, ptr } { i32 65535, ptr @"??__Eselectany1@@YAXXZ", ptr @"?selectany1@@3US@@A" },
+// CHECK: { i32, ptr, ptr } { i32 65535, ptr @"??__Eselectany2@@YAXXZ", ptr @"?selectany2@@3US@@A" },
+// CHECK: { i32, ptr, ptr } { i32 65535, ptr @"??__E?s@?$ExportedTemplate at H@@2US@@A@@YAXXZ", ptr @"?s@?$ExportedTemplate at H@@2US@@A" },
+// CHECK: { i32, ptr, ptr } { i32 65535, ptr @"??__E?foo@?$B at H@@2VA@@A@@YAXXZ", ptr @"?foo@?$B at H@@2VA@@A" },
+// CHECK: { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_microsoft_abi_static_initializers.cpp, ptr null }
 // CHECK: ]
 
 struct S {
@@ -16,8 +16,8 @@ struct S {
 S s;
 
 // CHECK: define internal void @"??__Es@@YAXXZ"()
-// CHECK: call x86_thiscallcc noundef %struct.S* @"??0S@@QAE at XZ"
-// CHECK: call i32 @atexit(void ()* @"??__Fs@@YAXXZ")
+// CHECK: call x86_thiscallcc noundef ptr @"??0S@@QAE at XZ"
+// CHECK: call i32 @atexit(ptr @"??__Fs@@YAXXZ")
 // CHECK: ret void
 
 // CHECK: define internal void @"??__Fs@@YAXXZ"()
@@ -30,11 +30,11 @@ __declspec(selectany) S selectany1;
 __declspec(selectany) S selectany2;
 // CHECK: define linkonce_odr dso_local void @"??__Eselectany1@@YAXXZ"() {{.*}} comdat
 // CHECK-NOT: @"??_Bselectany1
-// CHECK: call x86_thiscallcc noundef %struct.S* @"??0S@@QAE at XZ"
+// CHECK: call x86_thiscallcc noundef ptr @"??0S@@QAE at XZ"
 // CHECK: ret void
 // CHECK: define linkonce_odr dso_local void @"??__Eselectany2@@YAXXZ"() {{.*}} comdat
 // CHECK-NOT: @"??_Bselectany2
-// CHECK: call x86_thiscallcc noundef %struct.S* @"??0S@@QAE at XZ"
+// CHECK: call x86_thiscallcc noundef ptr @"??0S@@QAE at XZ"
 // CHECK: ret void
 
 // The implicitly instantiated static data member should have initializer
@@ -52,8 +52,8 @@ void StaticLocal() {
 }
 
 // CHECK-LABEL: define dso_local void @"?StaticLocal@@YAXXZ"()
-// CHECK: load i32, i32* @"?$S1@?1??StaticLocal@@YAXXZ at 4IA"
-// CHECK: store i32 {{.*}}, i32* @"?$S1@?1??StaticLocal@@YAXXZ at 4IA"
+// CHECK: load i32, ptr @"?$S1@?1??StaticLocal@@YAXXZ at 4IA"
+// CHECK: store i32 {{.*}}, ptr @"?$S1@?1??StaticLocal@@YAXXZ at 4IA"
 // CHECK: ret
 
 void MultipleStatics() {
@@ -94,7 +94,7 @@ void MultipleStatics() {
   static S S35;
 }
 // CHECK-LABEL: define dso_local void @"?MultipleStatics@@YAXXZ"()
-// CHECK: load i32, i32* @"?$S1@?1??MultipleStatics@@YAXXZ at 4IA"
+// CHECK: load i32, ptr @"?$S1@?1??MultipleStatics@@YAXXZ at 4IA"
 // CHECK: and i32 {{.*}}, 1
 // CHECK: and i32 {{.*}}, 2
 // CHECK: and i32 {{.*}}, 4
@@ -102,7 +102,7 @@ void MultipleStatics() {
 // CHECK: and i32 {{.*}}, 16
 //   ...
 // CHECK: and i32 {{.*}}, -2147483648
-// CHECK: load i32, i32* @"?$S1@?1??MultipleStatics@@YAXXZ at 4IA.1"
+// CHECK: load i32, ptr @"?$S1@?1??MultipleStatics@@YAXXZ at 4IA.1"
 // CHECK: and i32 {{.*}}, 1
 // CHECK: and i32 {{.*}}, 2
 // CHECK: and i32 {{.*}}, 4
@@ -133,7 +133,7 @@ inline S &UnreachableStatic() {
   return s;
 }
 
-// CHECK-LABEL: define linkonce_odr dso_local noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.S* @"?UnreachableStatic@@YAAAUS@@XZ"() {{.*}} comdat
+// CHECK-LABEL: define linkonce_odr dso_local noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"?UnreachableStatic@@YAAAUS@@XZ"() {{.*}} comdat
 // CHECK: and i32 {{.*}}, 2
 // CHECK: or i32 {{.*}}, 2
 // CHECK: ret
@@ -143,19 +143,19 @@ inline S &getS() {
   return TheS;
 }
 
-// CHECK-LABEL: define linkonce_odr dso_local noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.S* @"?getS@@YAAAUS@@XZ"() {{.*}} comdat
-// CHECK: load i32, i32* @"??_B?1??getS@@YAAAUS@@XZ at 51"
+// CHECK-LABEL: define linkonce_odr dso_local noundef nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @"?getS@@YAAAUS@@XZ"() {{.*}} comdat
+// CHECK: load i32, ptr @"??_B?1??getS@@YAAAUS@@XZ at 51"
 // CHECK: and i32 {{.*}}, 1
 // CHECK: icmp eq i32 {{.*}}, 0
 // CHECK: br i1
 //   init:
 // CHECK: or i32 {{.*}}, 1
-// CHECK: store i32 {{.*}}, i32* @"??_B?1??getS@@YAAAUS@@XZ at 51"
-// CHECK: call x86_thiscallcc noundef %struct.S* @"??0S@@QAE at XZ"(%struct.S* {{[^,]*}} @"?TheS@?1??getS@@YAAAUS@@XZ at 4U2@A")
-// CHECK: call i32 @atexit(void ()* @"??__FTheS@?1??getS@@YAAAUS@@XZ at YAXXZ")
+// CHECK: store i32 {{.*}}, ptr @"??_B?1??getS@@YAAAUS@@XZ at 51"
+// CHECK: call x86_thiscallcc noundef ptr @"??0S@@QAE at XZ"(ptr {{[^,]*}} @"?TheS@?1??getS@@YAAAUS@@XZ at 4U2@A")
+// CHECK: call i32 @atexit(ptr @"??__FTheS@?1??getS@@YAAAUS@@XZ at YAXXZ")
 // CHECK: br label
 //   init.end:
-// CHECK: ret %struct.S* @"?TheS@?1??getS@@YAAAUS@@XZ at 4U2@A"
+// CHECK: ret ptr @"?TheS@?1??getS@@YAAAUS@@XZ at 4U2@A"
 
 inline int enum_in_function() {
   // CHECK-LABEL: define linkonce_odr dso_local noundef i32 @"?enum_in_function@@YAHXZ"() {{.*}} comdat
@@ -234,11 +234,11 @@ void force_usage() {
 // CHECK: define linkonce_odr dso_local void @"??__E?foo@?$B at H@@2VA@@A@@YAXXZ"() {{.*}} comdat
 // CHECK-NOT: and
 // CHECK-NOT: ?_Bfoo@
-// CHECK: call x86_thiscallcc noundef %class.A* @"??0A@@QAE at XZ"
-// CHECK: call i32 @atexit(void ()* @"??__F?foo@?$B at H@@2VA@@A@@YAXXZ")
+// CHECK: call x86_thiscallcc noundef ptr @"??0A@@QAE at XZ"
+// CHECK: call i32 @atexit(ptr @"??__F?foo@?$B at H@@2VA@@A@@YAXXZ")
 // CHECK: ret void
 
-// CHECK: define linkonce_odr dso_local x86_thiscallcc noundef %class.A* @"??0A@@QAE at XZ"({{.*}}) {{.*}} comdat
+// CHECK: define linkonce_odr dso_local x86_thiscallcc noundef ptr @"??0A@@QAE at XZ"({{.*}}) {{.*}} comdat
 
 // CHECK: define linkonce_odr dso_local x86_thiscallcc void @"??1A@@QAE at XZ"({{.*}}) {{.*}} comdat
 

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-template-static-init.cpp b/clang/test/CodeGenCXX/microsoft-abi-template-static-init.cpp
index 64910eb0e5885..60b48abca2f89 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-template-static-init.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-template-static-init.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=i686-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=i686-pc-windows-msvc -fms-extensions -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-pc-windows-msvc  -fms-extensions -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=i686-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-pc-win32 -fms-extensions -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=i686-pc-windows-msvc -fms-extensions -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-pc-windows-msvc  -fms-extensions -emit-llvm -o - | FileCheck %s
 
 struct S {
   S();
@@ -88,4 +88,4 @@ int foo();
 inline int zoo = foo();
 inline static int boo = foo();
 
-// CHECK: @llvm.used = appending global [8 x i8*] [i8* bitcast (i32* @"?x at selectany_init@@3HA" to i8*), i8* bitcast (i32* @"?x1 at selectany_init@@3HA" to i8*), i8* bitcast (i32* @"?x@?$A at H@explicit_template_instantiation@@2HA" to i8*), i8* bitcast (i32* @"?ioo@?$X_ at H@@2HA" to i8*), i8* getelementptr inbounds (%struct.A, %struct.A* @"?aoo at S1@@2UA@@A", i32 0, i32 0), i8* bitcast (i32* @"?zoo@@3HA" to i8*), i8* getelementptr inbounds (%struct.S, %struct.S* @"?s@?$ExportedTemplate at H@@2US@@A", i32 0, i32 0), i8* bitcast (i32* @"?x@?$A at H@implicit_template_instantiation@@2HA" to i8*)], section "llvm.metadata"
+// CHECK: @llvm.used = appending global [8 x ptr] [ptr @"?x at selectany_init@@3HA", ptr @"?x1 at selectany_init@@3HA", ptr @"?x@?$A at H@explicit_template_instantiation@@2HA", ptr @"?ioo@?$X_ at H@@2HA", ptr @"?aoo at S1@@2UA@@A", ptr @"?zoo@@3HA", ptr @"?s@?$ExportedTemplate at H@@2US@@A", ptr @"?x@?$A at H@implicit_template_instantiation@@2HA"], section "llvm.metadata"

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-throw.cpp b/clang/test/CodeGenCXX/microsoft-abi-throw.cpp
index aa79935e42ded..10a58b21fc101 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-throw.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-throw.cpp
@@ -1,29 +1,29 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -triple=i386-pc-win32 -std=c++11 %s -fcxx-exceptions -fms-extensions | FileCheck %s
-
-// CHECK-DAG: @"??_R0?AUY@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUY@@\00" }, comdat
-// CHECK-DAG: @"_CT??_R0?AUY@@@8??0Y@@QAE at ABU0@@Z8" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 4, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUY@@@8" to i8*), i32 0, i32 -1, i32 0, i32 8, i8* bitcast (%struct.Y* (%struct.Y*, %struct.Y*, i32)* @"??0Y@@QAE at ABU0@@Z" to i8*) }, section ".xdata", comdat
-// CHECK-DAG: @"??_R0?AUZ@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUZ@@\00" }, comdat
-// CHECK-DAG: @"_CT??_R0?AUZ@@@81" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUZ@@@8" to i8*), i32 0, i32 -1, i32 0, i32 1, i8* null }, section ".xdata", comdat
-// CHECK-DAG: @"??_R0?AUW@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUW@@\00" }, comdat
-// CHECK-DAG: @"_CT??_R0?AUW@@@8??0W@@QAE at ABU0@@Z44" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 4, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUW@@@8" to i8*), i32 4, i32 -1, i32 0, i32 4, i8* bitcast (%struct.W* (%struct.W*, %struct.W*, i32)* @"??0W@@QAE at ABU0@@Z" to i8*) }, section ".xdata", comdat
-// CHECK-DAG: @"??_R0?AUM@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUM@@\00" }, comdat
-// CHECK-DAG: @"_CT??_R0?AUM@@@818" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUM@@@8" to i8*), i32 8, i32 -1, i32 0, i32 1, i8* null }, section ".xdata", comdat
-// CHECK-DAG: @"??_R0?AUV@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { i8** @"??_7type_info@@6B@", i8* null, [8 x i8] c".?AUV@@\00" }, comdat
-// CHECK-DAG: @"_CT??_R0?AUV@@@81044" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0?AUV@@@8" to i8*), i32 0, i32 4, i32 4, i32 1, i8* null }, section ".xdata", comdat
-// CHECK-DAG: @"_CTA5?AUY@@" = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.5 { i32 5, [5 x %eh.CatchableType*] [%eh.CatchableType* @"_CT??_R0?AUY@@@8??0Y@@QAE at ABU0@@Z8", %eh.CatchableType* @"_CT??_R0?AUZ@@@81", %eh.CatchableType* @"_CT??_R0?AUW@@@8??0W@@QAE at ABU0@@Z44", %eh.CatchableType* @"_CT??_R0?AUM@@@818", %eh.CatchableType* @"_CT??_R0?AUV@@@81044"] }, section ".xdata", comdat
-// CHECK-DAG: @"_TI5?AUY@@" = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, i8* bitcast (void (%struct.Y*)* @"??_DY@@QAEXXZ" to i8*), i8* null, i8* bitcast (%eh.CatchableTypeArray.5* @"_CTA5?AUY@@" to i8*) }, section ".xdata", comdat
-// CHECK-DAG: @"_CT??_R0?AUDefault@@@8??_ODefault@@QAEXAAU0@@Z1" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, i8* bitcast (%rtti.TypeDescriptor13* @"??_R0?AUDefault@@@8" to i8*), i32 0, i32 -1, i32 0, i32 1, i8* bitcast (void (%struct.Default*, %struct.Default*)* @"??_ODefault@@QAEXAAU0@@Z" to i8*) }, section ".xdata", comdat
-// CHECK-DAG: @"_CT??_R0?AUDeletedCopy@@@81" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, i8* bitcast (%rtti.TypeDescriptor17* @"??_R0?AUDeletedCopy@@@8" to i8*), i32 0, i32 -1, i32 0, i32 1, i8* null }, section ".xdata", comdat
-// CHECk-DAG: @"_CT??_R0?AUMoveOnly@@@84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, i8* bitcast (%rtti.TypeDescriptor14* @"??_R0?AUMoveOnly@@@8" to i8*), i32 0, i321-1, i32 0, i32 4, i8* null }, section ".xdata", comda
-// CHECK-DAG: @"_CT??_R0?AUVariadic@@@8??_OVariadic@@QAEXAAU0@@Z1" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, i8* bitcast (%rtti.TypeDescriptor14* @"??_R0?AUVariadic@@@8" to i8*), i32 0, i32 -1, i32 0, i32 1, i8* bitcast (void (%struct.Variadic*, %struct.Variadic*)* @"??_OVariadic@@QAEXAAU0@@Z" to i8*) }, section ".xdata", comdat
-// CHECK-DAG: @"_CT??_R0?AUTemplateWithDefault@@@8??$?_OH at TemplateWithDefault@@QAEXAAU0@@Z1" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, i8* bitcast (%rtti.TypeDescriptor25* @"??_R0?AUTemplateWithDefault@@@8" to i8*), i32 0, i32 -1, i32 0, i32 1, i8* bitcast (void (%struct.TemplateWithDefault*, %struct.TemplateWithDefault*)* @"??$?_OH at TemplateWithDefault@@QAEXAAU0@@Z" to i8*) }, section ".xdata", comdat
-// CHECK-DAG: @"_CTA2$$T" = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.2 { i32 2, [2 x %eh.CatchableType*] [%eh.CatchableType* @"_CT??_R0$$T at 84", %eh.CatchableType* @"_CT??_R0PAX at 84"] }, section ".xdata", comdat
-// CHECK-DAG: @"_CT??_R0P6AXXZ at 84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 1, i8* bitcast (%rtti.TypeDescriptor7* @"??_R0P6AXXZ at 8" to i8*), i32 0, i32 -1, i32 0, i32 4, i8* null }, section ".xdata", comdat
-// CHECK-DAG: @_CTA1P6AXXZ = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.1 { i32 1, [1 x %eh.CatchableType*] [%eh.CatchableType* @"_CT??_R0P6AXXZ at 84"] }, section ".xdata", comdat
-// CHECK-DAG: @_TI1P6AXXZ = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, i8* null, i8* null, i8* bitcast (%eh.CatchableTypeArray.1* @_CTA1P6AXXZ to i8*) }, section ".xdata", comdat
-// CHECK-DAG: @_TIU2PAPFAH = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 4, i8* null, i8* null, i8* bitcast (%eh.CatchableTypeArray.2* @_CTA2PAPFAH to i8*) }, section ".xdata", comdat
-// CHECK-DAG: @_CTA2PAPFAH = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.2 { i32 2, [2 x %eh.CatchableType*] [%eh.CatchableType* @"_CT??_R0PAPFAH at 84", %eh.CatchableType* @"_CT??_R0PAX at 84"] }, section ".xdata", comdat
-// CHECK-DAG: @"_TI1?AUFoo@?A0x{{[^@]*}}@@" = internal unnamed_addr constant %eh.ThrowInfo { i32 0, i8* null, i8* null, i8* bitcast (%eh.CatchableTypeArray.1* @"_CTA1?AUFoo@?A0x{{[^@]*}}@@" to i8*) }, section ".xdata"
+// RUN: %clang_cc1 -emit-llvm -o - -triple=i386-pc-win32 -std=c++11 %s -fcxx-exceptions -fms-extensions | FileCheck %s
+
+// CHECK-DAG: @"??_R0?AUY@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUY@@\00" }, comdat
+// CHECK-DAG: @"_CT??_R0?AUY@@@8??0Y@@QAE at ABU0@@Z8" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 4, ptr @"??_R0?AUY@@@8", i32 0, i32 -1, i32 0, i32 8, ptr @"??0Y@@QAE at ABU0@@Z" }, section ".xdata", comdat
+// CHECK-DAG: @"??_R0?AUZ@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUZ@@\00" }, comdat
+// CHECK-DAG: @"_CT??_R0?AUZ@@@81" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, ptr @"??_R0?AUZ@@@8", i32 0, i32 -1, i32 0, i32 1, ptr null }, section ".xdata", comdat
+// CHECK-DAG: @"??_R0?AUW@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUW@@\00" }, comdat
+// CHECK-DAG: @"_CT??_R0?AUW@@@8??0W@@QAE at ABU0@@Z44" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 4, ptr @"??_R0?AUW@@@8", i32 4, i32 -1, i32 0, i32 4, ptr @"??0W@@QAE at ABU0@@Z" }, section ".xdata", comdat
+// CHECK-DAG: @"??_R0?AUM@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUM@@\00" }, comdat
+// CHECK-DAG: @"_CT??_R0?AUM@@@818" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, ptr @"??_R0?AUM@@@8", i32 8, i32 -1, i32 0, i32 1, ptr null }, section ".xdata", comdat
+// CHECK-DAG: @"??_R0?AUV@@@8" = linkonce_odr global %rtti.TypeDescriptor7 { ptr @"??_7type_info@@6B@", ptr null, [8 x i8] c".?AUV@@\00" }, comdat
+// CHECK-DAG: @"_CT??_R0?AUV@@@81044" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, ptr @"??_R0?AUV@@@8", i32 0, i32 4, i32 4, i32 1, ptr null }, section ".xdata", comdat
+// CHECK-DAG: @"_CTA5?AUY@@" = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.5 { i32 5, [5 x ptr] [ptr @"_CT??_R0?AUY@@@8??0Y@@QAE at ABU0@@Z8", ptr @"_CT??_R0?AUZ@@@81", ptr @"_CT??_R0?AUW@@@8??0W@@QAE at ABU0@@Z44", ptr @"_CT??_R0?AUM@@@818", ptr @"_CT??_R0?AUV@@@81044"] }, section ".xdata", comdat
+// CHECK-DAG: @"_TI5?AUY@@" = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, ptr @"??_DY@@QAEXXZ", ptr null, ptr @"_CTA5?AUY@@" }, section ".xdata", comdat
+// CHECK-DAG: @"_CT??_R0?AUDefault@@@8??_ODefault@@QAEXAAU0@@Z1" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, ptr @"??_R0?AUDefault@@@8", i32 0, i32 -1, i32 0, i32 1, ptr @"??_ODefault@@QAEXAAU0@@Z" }, section ".xdata", comdat
+// CHECK-DAG: @"_CT??_R0?AUDeletedCopy@@@81" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, ptr @"??_R0?AUDeletedCopy@@@8", i32 0, i32 -1, i32 0, i32 1, ptr null }, section ".xdata", comdat
+// CHECk-DAG: @"_CT??_R0?AUMoveOnly@@@84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, ptr @"??_R0?AUMoveOnly@@@8", i32 0, i321-1, i32 0, i32 4, ptr null }, section ".xdata", comda
+// CHECK-DAG: @"_CT??_R0?AUVariadic@@@8??_OVariadic@@QAEXAAU0@@Z1" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, ptr @"??_R0?AUVariadic@@@8", i32 0, i32 -1, i32 0, i32 1, ptr @"??_OVariadic@@QAEXAAU0@@Z" }, section ".xdata", comdat
+// CHECK-DAG: @"_CT??_R0?AUTemplateWithDefault@@@8??$?_OH at TemplateWithDefault@@QAEXAAU0@@Z1" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 0, ptr @"??_R0?AUTemplateWithDefault@@@8", i32 0, i32 -1, i32 0, i32 1, ptr @"??$?_OH at TemplateWithDefault@@QAEXAAU0@@Z" }, section ".xdata", comdat
+// CHECK-DAG: @"_CTA2$$T" = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.2 { i32 2, [2 x ptr] [ptr @"_CT??_R0$$T at 84", ptr @"_CT??_R0PAX at 84"] }, section ".xdata", comdat
+// CHECK-DAG: @"_CT??_R0P6AXXZ at 84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 1, ptr @"??_R0P6AXXZ at 8", i32 0, i32 -1, i32 0, i32 4, ptr null }, section ".xdata", comdat
+// CHECK-DAG: @_CTA1P6AXXZ = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.1 { i32 1, [1 x ptr] [ptr @"_CT??_R0P6AXXZ at 84"] }, section ".xdata", comdat
+// CHECK-DAG: @_TI1P6AXXZ = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, ptr null, ptr null, ptr @_CTA1P6AXXZ }, section ".xdata", comdat
+// CHECK-DAG: @_TIU2PAPFAH = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 4, ptr null, ptr null, ptr @_CTA2PAPFAH }, section ".xdata", comdat
+// CHECK-DAG: @_CTA2PAPFAH = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.2 { i32 2, [2 x ptr] [ptr @"_CT??_R0PAPFAH at 84", ptr @"_CT??_R0PAX at 84"] }, section ".xdata", comdat
+// CHECK-DAG: @"_TI1?AUFoo@?A0x{{[^@]*}}@@" = internal unnamed_addr constant %eh.ThrowInfo { i32 0, ptr null, ptr null, ptr @"_CTA1?AUFoo@?A0x{{[^@]*}}@@" }, section ".xdata"
 
 
 struct N { ~N(); };
@@ -36,21 +36,20 @@ struct Y : Z, W, virtual V {};
 
 void f(const Y &y) {
   // CHECK-LABEL: @"?f@@YAXABUY@@@Z"
-  // CHECK: call x86_thiscallcc noundef %struct.Y* @"??0Y@@QAE at ABU0@@Z"(%struct.Y* {{[^,]*}} %[[mem:.*]], %struct.Y*
-  // CHECK: %[[cast:.*]] = bitcast %struct.Y* %[[mem]] to i8*
-  // CHECK: call void @_CxxThrowException(i8* %[[cast]], %eh.ThrowInfo* @"_TI5?AUY@@")
+  // CHECK: call x86_thiscallcc noundef ptr @"??0Y@@QAE at ABU0@@Z"(ptr {{[^,]*}} %[[mem:.*]], ptr
+  // CHECK: call void @_CxxThrowException(ptr %[[mem]], ptr @"_TI5?AUY@@")
   throw y;
 }
 
 void g(const int *const *y) {
   // CHECK-LABEL: @"?g@@YAXPBQBH at Z"
-  // CHECK: call void @_CxxThrowException(i8* %{{.*}}, %eh.ThrowInfo* @_TIC2PAPBH)
+  // CHECK: call void @_CxxThrowException(ptr %{{.*}}, ptr @_TIC2PAPBH)
   throw y;
 }
 
 void h(__unaligned int * __unaligned *y) {
   // CHECK-LABEL: @"?h@@YAXPFAPFAH at Z"
-  // CHECK: call void @_CxxThrowException(i8* %{{.*}}, %eh.ThrowInfo* @_TIU2PAPFAH)
+  // CHECK: call void @_CxxThrowException(ptr %{{.*}}, ptr @_TIU2PAPFAH)
   throw y;
 }
 
@@ -141,13 +140,13 @@ using namespace std;
 
 void *GetExceptionInfo_test0() {
 // CHECK-LABEL: @"?GetExceptionInfo_test0@@YAPAXXZ"
-// CHECK:  ret i8* bitcast (%eh.ThrowInfo* @_TI1H to i8*)
+// CHECK:  ret ptr @_TI1H
   return __GetExceptionInfo(0);
 }
 
 void *GetExceptionInfo_test1() {
 // CHECK-LABEL: @"?GetExceptionInfo_test1@@YAPAXXZ"
-// CHECK:  ret i8* bitcast (%eh.ThrowInfo* @_TI1P6AXXZ to i8*)
+// CHECK:  ret ptr @_TI1P6AXXZ
   return __GetExceptionInfo<void (*)()>(&h);
 }
 
@@ -156,6 +155,6 @@ namespace { struct Foo { } foo_exc; }
 
 void *GetExceptionInfo_test2() {
 // CHECK-LABEL: @"?GetExceptionInfo_test2@@YAPAXXZ"
-// CHECK:  ret i8* bitcast (%eh.ThrowInfo* @"_TI1?AUFoo@?A0x{{[^@]*}}@@" to i8*)
+// CHECK:  ret ptr @"_TI1?AUFoo@?A0x{{[^@]*}}@@"
   return __GetExceptionInfo(foo_exc);
 }

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp b/clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp
index b9e2024017321..9364a425b1356 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-try-throw.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTRY   | FileCheck %s -check-prefix=TRY
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTHROW | FileCheck %s -check-prefix=THROW
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTRY   | FileCheck %s -check-prefix=TRY
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-win32 -mconstructor-aliases -fcxx-exceptions -fexceptions -fno-rtti -DTHROW | FileCheck %s -check-prefix=THROW
 
-// THROW-DAG: @"??_R0H at 8" = linkonce_odr global %rtti.TypeDescriptor2 { i8** @"??_7type_info@@6B@", i8* null, [3 x i8] c".H\00" }, comdat
-// THROW-DAG: @"_CT??_R0H at 84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 1, i8* bitcast (%rtti.TypeDescriptor2* @"??_R0H at 8" to i8*), i32 0, i32 -1, i32 0, i32 4, i8* null }, section ".xdata", comdat
-// THROW-DAG: @_CTA1H = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.1 { i32 1, [1 x %eh.CatchableType*] [%eh.CatchableType* @"_CT??_R0H at 84"] }, section ".xdata", comdat
-// THROW-DAG: @_TI1H = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, i8* null, i8* null, i8* bitcast (%eh.CatchableTypeArray.1* @_CTA1H to i8*) }, section ".xdata", comdat
+// THROW-DAG: @"??_R0H at 8" = linkonce_odr global %rtti.TypeDescriptor2 { ptr @"??_7type_info@@6B@", ptr null, [3 x i8] c".H\00" }, comdat
+// THROW-DAG: @"_CT??_R0H at 84" = linkonce_odr unnamed_addr constant %eh.CatchableType { i32 1, ptr @"??_R0H at 8", i32 0, i32 -1, i32 0, i32 4, ptr null }, section ".xdata", comdat
+// THROW-DAG: @_CTA1H = linkonce_odr unnamed_addr constant %eh.CatchableTypeArray.1 { i32 1, [1 x ptr] [ptr @"_CT??_R0H at 84"] }, section ".xdata", comdat
+// THROW-DAG: @_TI1H = linkonce_odr unnamed_addr constant %eh.ThrowInfo { i32 0, ptr null, ptr null, ptr @_CTA1H }, section ".xdata", comdat
 
 void external();
 
@@ -19,14 +19,13 @@ int main() {
     external(); // TRY: invoke void @"?external@@YAXXZ"
   } catch (int) {
     rv = 1;
-    // TRY: catchpad within {{.*}} [%rtti.TypeDescriptor2* @"??_R0H at 8", i32 0, i8* null]
+    // TRY: catchpad within {{.*}} [ptr @"??_R0H at 8", i32 0, ptr null]
     // TRY: catchret
   }
 #endif
 #ifdef THROW
-  // THROW: store i32 42, i32* %[[mem_for_throw:.*]], align 4
-  // THROW: %[[cast:.*]] = bitcast i32* %[[mem_for_throw]] to i8*
-  // THROW: call void @_CxxThrowException(i8* %[[cast]], %eh.ThrowInfo* @_TI1H)
+  // THROW: store i32 42, ptr %[[mem_for_throw:.*]], align 4
+  // THROW: call void @_CxxThrowException(ptr %[[mem_for_throw]], ptr @_TI1H)
   throw int(42);
 #endif
   return rv;
@@ -39,7 +38,7 @@ void qual_catch() {
     external();
   } catch (const int *) {
   }
-  // TRY: catchpad within {{.*}} [%rtti.TypeDescriptor4* @"??_R0PAH at 8", i32 1, i8* null]
+  // TRY: catchpad within {{.*}} [ptr @"??_R0PAH at 8", i32 1, ptr null]
   // TRY: catchret
 }
 #endif

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-unknown-arch.cpp b/clang/test/CodeGenCXX/microsoft-abi-unknown-arch.cpp
index 4b2c68e6e3436..3045e90777cbc 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-unknown-arch.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-unknown-arch.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=ppc64-windows-msvc | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=ppc64-windows-msvc | FileCheck %s
 
 // The purpose of this test is to see that we do something reasonable for
 // architectures where we haven't checked what MSVC does.
@@ -18,4 +18,4 @@ A B::foo(A x) {
   return x;
 }
 
-// CHECK-LABEL: define{{.*}} void @"?foo at B@@QEAA?AUA@@U2@@Z"(%struct.B* {{[^,]*}} %this, %struct.A* noalias sret(%struct.A) align 4 %agg.result, %struct.A* noundef %x)
+// CHECK-LABEL: define{{.*}} void @"?foo at B@@QEAA?AUA@@U2@@Z"(ptr {{[^,]*}} %this, ptr noalias sret(%struct.A) align 4 %agg.result, ptr noundef %x)

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-vbase-dtor.cpp b/clang/test/CodeGenCXX/microsoft-abi-vbase-dtor.cpp
index f924364ccf3c7..8fc3f715fc6c0 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-vbase-dtor.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-vbase-dtor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -emit-llvm %s -triple x86_64-windows-msvc -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -emit-llvm %s -triple x86_64-windows-msvc -o - | FileCheck %s
 
 // Make sure virtual base base destructors get referenced and emitted if
 // necessary when the complete ("vbase") destructor is emitted. In this case,
@@ -13,13 +13,13 @@ struct HasCompleteDtor : virtual DefaultedDtor {
 };
 void useCompleteDtor(HasCompleteDtor *p) { delete p; }
 
-// CHECK-LABEL: define dso_local void @"?useCompleteDtor@@YAXPEAUHasCompleteDtor@@@Z"(%struct.HasCompleteDtor* noundef %p)
+// CHECK-LABEL: define dso_local void @"?useCompleteDtor@@YAXPEAUHasCompleteDtor@@@Z"(ptr noundef %p)
 // CHECK: call void @"??_DHasCompleteDtor@@QEAAXXZ"({{.*}})
 
-// CHECK-LABEL: define linkonce_odr dso_local void @"??_DHasCompleteDtor@@QEAAXXZ"(%struct.HasCompleteDtor* {{[^,]*}} %this)
+// CHECK-LABEL: define linkonce_odr dso_local void @"??_DHasCompleteDtor@@QEAAXXZ"(ptr {{[^,]*}} %this)
 // CHECK: call void @"??1HasCompleteDtor@@QEAA at XZ"({{.*}})
 // CHECK: call void @"??1DefaultedDtor@@QEAA at XZ"({{.*}})
 
-// CHECK-LABEL: define linkonce_odr dso_local void @"??1DefaultedDtor@@QEAA at XZ"(%struct.DefaultedDtor* {{[^,]*}} %this)
-// CHECK: call void @"??1HasDtor@@QEAA at XZ"(%struct.HasDtor* {{[^,]*}} %{{.*}})
+// CHECK-LABEL: define linkonce_odr dso_local void @"??1DefaultedDtor@@QEAA at XZ"(ptr {{[^,]*}} %this)
+// CHECK: call void @"??1HasDtor@@QEAA at XZ"(ptr {{[^,]*}} %{{.*}})
 

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp b/clang/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp
index cbf4cad04b633..5d8a52c09f6d9 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fno-rtti -emit-llvm -triple=i386-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK32
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fno-rtti -emit-llvm -triple=x86_64-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK64
+// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm -triple=i386-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK32
+// RUN: %clang_cc1 -std=c++11 -fno-rtti -emit-llvm -triple=x86_64-pc-win32 %s -o - | FileCheck %s --check-prefix=CHECK64
 
 struct S {
   int x, y, z;
@@ -54,135 +54,135 @@ void f() {
 
 
 // CHECK32-LABEL: define dso_local void @"?f@@YAXXZ"()
-// CHECK32: store i8* bitcast (void (%struct.C*, ...)* @"??_9C@@$BA at AE" to i8*), i8** %ptr
-// CHECK32: store i8* bitcast (void (%struct.C*, ...)* @"??_9C@@$B3AE" to i8*), i8** %ptr2
-// CHECK32: store i8* bitcast (void (%struct.C*, ...)* @"??_9C@@$B7AE" to i8*), i8** %ptr3
-// CHECK32: store i8* bitcast (void (%"struct.(anonymous namespace)::D"*, ...)* @"??_9D@?A0x{{[^@]*}}@@$BA at AE" to i8*), i8** %ptr4
+// CHECK32: store ptr @"??_9C@@$BA at AE", ptr %ptr
+// CHECK32: store ptr @"??_9C@@$B3AE", ptr %ptr2
+// CHECK32: store ptr @"??_9C@@$B7AE", ptr %ptr3
+// CHECK32: store ptr @"??_9D@?A0x{{[^@]*}}@@$BA at AE", ptr %ptr4
 // CHECK32: }
 //
 // CHECK64-LABEL: define dso_local void @"?f@@YAXXZ"()
-// CHECK64: store i8* bitcast (void (%struct.C*, ...)* @"??_9C@@$BA at AA" to i8*), i8** %ptr
-// CHECK64: store i8* bitcast (void (%struct.C*, ...)* @"??_9C@@$B7AA" to i8*), i8** %ptr2
-// CHECK64: store i8* bitcast (void (%struct.C*, ...)* @"??_9C@@$BBA at AA" to i8*), i8** %ptr3
-// CHECK64: store i8* bitcast (void (%"struct.(anonymous namespace)::D"*, ...)* @"??_9D@?A0x{{[^@]*}}@@$BA at AA" to i8*), i8** %ptr
+// CHECK64: store ptr @"??_9C@@$BA at AA", ptr %ptr
+// CHECK64: store ptr @"??_9C@@$B7AA", ptr %ptr2
+// CHECK64: store ptr @"??_9C@@$BBA at AA", ptr %ptr3
+// CHECK64: store ptr @"??_9D@?A0x{{[^@]*}}@@$BA at AA", ptr %ptr
 // CHECK64: }
 }
 
 
 // Thunk for calling the 1st virtual function in C with no parameters.
-// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C@@$BA at AE"(%struct.C* noundef %this, ...)
+// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C@@$BA at AE"(ptr noundef %this, ...)
 // CHECK32: #[[ATTR:[0-9]+]]
 // CHECK32-NOT:             unnamed_addr
 // CHECK32:                 comdat
-// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 0
-// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK32: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 0
+// CHECK32: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK32: musttail call x86_thiscallcc void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK32-NEXT: ret void
 // CHECK32: }
 //
-// CHECK64-LABEL: define linkonce_odr void @"??_9C@@$BA at AA"(%struct.C* noundef %this, ...)
+// CHECK64-LABEL: define linkonce_odr void @"??_9C@@$BA at AA"(ptr noundef %this, ...)
 // CHECK64: #[[ATTR:[0-9]+]]
 // CHECK64-NOT:             unnamed_addr
 // CHECK64:                 comdat
-// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 0
-// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK64: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 0
+// CHECK64: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK64: musttail call void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK64-NEXT: ret void
 // CHECK64: }
 
 // Thunk for calling the 2nd virtual function in C, taking int and double as parameters, returning int.
-// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C@@$B3AE"(%struct.C* noundef %this, ...)
+// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C@@$B3AE"(ptr noundef %this, ...)
 // CHECK32: #[[ATTR]] comdat
-// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 1
-// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK32: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 1
+// CHECK32: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK32: musttail call x86_thiscallcc void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK32-NEXT: ret void
 // CHECK32: }
 //
-// CHECK64-LABEL: define linkonce_odr void @"??_9C@@$B7AA"(%struct.C* noundef %this, ...)
+// CHECK64-LABEL: define linkonce_odr void @"??_9C@@$B7AA"(ptr noundef %this, ...)
 // CHECK64: #[[ATTR]] comdat
-// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 1
-// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK64: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 1
+// CHECK64: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK64: musttail call void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK64-NEXT: ret void
 // CHECK64: }
 
 // Thunk for calling the 3rd virtual function in C, taking an int parameter, returning a struct.
-// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C@@$B7AE"(%struct.C* noundef %this, ...)
+// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C@@$B7AE"(ptr noundef %this, ...)
 // CHECK32: #[[ATTR]] comdat
-// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 2
-// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK32: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 2
+// CHECK32: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK32: musttail call x86_thiscallcc void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK32-NEXT: ret void
 // CHECK32: }
 //
-// CHECK64-LABEL: define linkonce_odr void @"??_9C@@$BBA at AA"(%struct.C* noundef %this, ...)
+// CHECK64-LABEL: define linkonce_odr void @"??_9C@@$BBA at AA"(ptr noundef %this, ...)
 // CHECK64: #[[ATTR]] comdat
-// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 2
-// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK64: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 2
+// CHECK64: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK64: musttail call void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK64-NEXT: ret void
 // CHECK64: }
 
 // Thunk for calling the virtual function in internal class D.
-// CHECK32-LABEL: define internal x86_thiscallcc void @"??_9D@?A0x{{[^@]*}}@@$BA at AE"(%"struct.(anonymous namespace)::D"* noundef %this, ...)
+// CHECK32-LABEL: define internal x86_thiscallcc void @"??_9D@?A0x{{[^@]*}}@@$BA at AE"(ptr noundef %this, ...)
 // CHECK32: #[[ATTR]]
-// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%"struct.(anonymous namespace)::D"*, ...)*, void (%"struct.(anonymous namespace)::D"*, ...)** %{{.*}}, i64 0
-// CHECK32: [[CALLEE:%.*]] = load void (%"struct.(anonymous namespace)::D"*, ...)*, void (%"struct.(anonymous namespace)::D"*, ...)** [[VPTR]]
-// CHECK32: musttail call x86_thiscallcc void (%"struct.(anonymous namespace)::D"*, ...) [[CALLEE]](%"struct.(anonymous namespace)::D"* noundef %{{.*}}, ...)
+// CHECK32: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 0
+// CHECK32: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK32: musttail call x86_thiscallcc void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK32-NEXT: ret void
 // CHECK32: }
 //
-// CHECK64-LABEL: define internal void @"??_9D@?A0x{{[^@]*}}@@$BA at AA"(%"struct.(anonymous namespace)::D"* noundef %this, ...)
+// CHECK64-LABEL: define internal void @"??_9D@?A0x{{[^@]*}}@@$BA at AA"(ptr noundef %this, ...)
 // CHECK64: #[[ATTR]]
-// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%"struct.(anonymous namespace)::D"*, ...)*, void (%"struct.(anonymous namespace)::D"*, ...)** %{{.*}}, i64 0
-// CHECK64: [[CALLEE:%.*]] = load void (%"struct.(anonymous namespace)::D"*, ...)*, void (%"struct.(anonymous namespace)::D"*, ...)** [[VPTR]]
-// CHECK64: musttail call void (%"struct.(anonymous namespace)::D"*, ...) [[CALLEE]](%"struct.(anonymous namespace)::D"* noundef %{{.*}}, ...)
+// CHECK64: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 0
+// CHECK64: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK64: musttail call void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK64-NEXT: ret void
 // CHECK64: }
 
 // Thunk for calling the fourth virtual function in C, taking a struct parameter
 // and returning a struct.
-// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C@@$BM at AE"(%struct.C* noundef %this, ...) {{.*}} comdat
-// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 3
-// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK32-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C@@$BM at AE"(ptr noundef %this, ...) {{.*}} comdat
+// CHECK32: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 3
+// CHECK32: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK32: musttail call x86_thiscallcc void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK32-NEXT: ret void
 // CHECK32: }
 //
-// CHECK64-LABEL: define linkonce_odr void @"??_9C@@$BBI at AA"(%struct.C* noundef %this, ...) {{.*}} comdat
-// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 3
-// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK64-LABEL: define linkonce_odr void @"??_9C@@$BBI at AA"(ptr noundef %this, ...) {{.*}} comdat
+// CHECK64: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 3
+// CHECK64: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK64: musttail call void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK64: ret void
 // CHECK64: }
 
 // Thunk for calling the fifth virtual function in C which uses the __cdecl calling convention.
-// CHECK32-LABEL: define linkonce_odr void @"??_9C@@$BBA at AA"(%struct.C* noundef %this, ...) {{.*}} comdat align 2 {
-// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 4
-// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK32: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK32-LABEL: define linkonce_odr void @"??_9C@@$BBA at AA"(ptr noundef %this, ...) {{.*}} comdat align 2 {
+// CHECK32: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 4
+// CHECK32: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK32: musttail call void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK32: ret void
 // CHECK32: }
 //
-// CHECK64-LABEL: define linkonce_odr void @"??_9C@@$BCA at AA"(%struct.C* noundef %this, ...) {{.*}} comdat align 2 {
-// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 4
-// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK64-LABEL: define linkonce_odr void @"??_9C@@$BCA at AA"(ptr noundef %this, ...) {{.*}} comdat align 2 {
+// CHECK64: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 4
+// CHECK64: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK64: musttail call void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK64: ret void
 // CHECK64: }
 
-// CHECK32: define linkonce_odr x86_thiscallcc void @"??_9C@@$BBE at AE"(%struct.C* noundef %this, ...) {{.*}} comdat align 2 {
-// CHECK32: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 5
-// CHECK32: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK32: musttail call x86_thiscallcc void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK32: define linkonce_odr x86_thiscallcc void @"??_9C@@$BBE at AE"(ptr noundef %this, ...) {{.*}} comdat align 2 {
+// CHECK32: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 5
+// CHECK32: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK32: musttail call x86_thiscallcc void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK32: ret void
 // CHECK32: }
 
-// CHECK64: define linkonce_odr void @"??_9C@@$BCI at AA"(%struct.C* noundef %this, ...) {{.*}} comdat align 2 {
-// CHECK64: [[VPTR:%.*]] = getelementptr inbounds void (%struct.C*, ...)*, void (%struct.C*, ...)** %{{.*}}, i64 5
-// CHECK64: [[CALLEE:%.*]] = load void (%struct.C*, ...)*, void (%struct.C*, ...)** [[VPTR]]
-// CHECK64: musttail call void (%struct.C*, ...) [[CALLEE]](%struct.C* noundef %{{.*}}, ...)
+// CHECK64: define linkonce_odr void @"??_9C@@$BCI at AA"(ptr noundef %this, ...) {{.*}} comdat align 2 {
+// CHECK64: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 5
+// CHECK64: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK64: musttail call void (ptr, ...) [[CALLEE]](ptr noundef %{{.*}}, ...)
 // CHECK64: ret void
 // CHECK64: }
 

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-vmemptr-conflicts.cpp b/clang/test/CodeGenCXX/microsoft-abi-vmemptr-conflicts.cpp
index 6768d258470a5..2a29a080d025a 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-vmemptr-conflicts.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-vmemptr-conflicts.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fno-rtti -emit-llvm -triple=i386-pc-win32 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -fno-rtti -emit-llvm -triple=i386-pc-win32 %s -o - | FileCheck %s
 
 // In each test case, we have two member pointers whose thunks have the same
 // vtable offset and same mangling, but their prototypes conflict.  The
@@ -19,12 +19,12 @@ void f(C *c) {
 }
 }
 
-// CHECK-LABEL: define dso_local void @"?f at num_params@@YAXPAUC at 1@@Z"(%"struct.num_params::C"* noundef %c)
-// CHECK: call x86_thiscallcc void bitcast (void (%"struct.num_params::C"*, ...)* @"??_9C at num_params@@$BA at AE" to void (%"struct.num_params::C"*, i32)*)(%"struct.num_params::C"* {{[^,]*}} %{{.*}}, i32 noundef 0)
-// CHECK: call x86_thiscallcc void bitcast (void (%"struct.num_params::C"*, ...)* @"??_9C at num_params@@$BA at AE" to void (%"struct.num_params::C"*, i32, i32)*)(%"struct.num_params::C"* {{[^,]*}} %{{.*}}, i32 noundef 0, i32 noundef 0)
+// CHECK-LABEL: define dso_local void @"?f at num_params@@YAXPAUC at 1@@Z"(ptr noundef %c)
+// CHECK: call x86_thiscallcc void @"??_9C at num_params@@$BA at AE"(ptr {{[^,]*}} %{{.*}}, i32 noundef 0)
+// CHECK: call x86_thiscallcc void @"??_9C at num_params@@$BA at AE"(ptr {{[^,]*}} %{{.*}}, i32 noundef 0, i32 noundef 0)
 
-// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C at num_params@@$BA at AE"(%"struct.num_params::C"* noundef %this, ...) {{.*}} comdat
-// CHECK: musttail call x86_thiscallcc void (%"struct.num_params::C"*, ...) %{{.*}}(%"struct.num_params::C"* noundef %{{.*}}, ...)
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C at num_params@@$BA at AE"(ptr noundef %this, ...) {{.*}} comdat
+// CHECK: musttail call x86_thiscallcc void (ptr, ...) %{{.*}}(ptr noundef %{{.*}}, ...)
 // CHECK-NEXT: ret void
 
 namespace i64_return {
@@ -41,12 +41,12 @@ long long f(C *c) {
 }
 }
 
-// CHECK-LABEL: define dso_local noundef i64 @"?f at i64_return@@YA_JPAUC at 1@@Z"(%"struct.i64_return::C"* noundef %c)
-// CHECK: call x86_thiscallcc noundef i32 bitcast (void (%"struct.i64_return::C"*, ...)* @"??_9C at i64_return@@$BA at AE" to i32 (%"struct.i64_return::C"*)*)(%"struct.i64_return::C"* {{[^,]*}} %{{.*}})
-// CHECK: call x86_thiscallcc noundef i64 bitcast (void (%"struct.i64_return::C"*, ...)* @"??_9C at i64_return@@$BA at AE" to i64 (%"struct.i64_return::C"*)*)(%"struct.i64_return::C"* {{[^,]*}} %{{.*}})
+// CHECK-LABEL: define dso_local noundef i64 @"?f at i64_return@@YA_JPAUC at 1@@Z"(ptr noundef %c)
+// CHECK: call x86_thiscallcc noundef i32 @"??_9C at i64_return@@$BA at AE"(ptr {{[^,]*}} %{{.*}})
+// CHECK: call x86_thiscallcc noundef i64 @"??_9C at i64_return@@$BA at AE"(ptr {{[^,]*}} %{{.*}})
 
-// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C at i64_return@@$BA at AE"(%"struct.i64_return::C"* noundef %this, ...) {{.*}} comdat
-// CHECK: musttail call x86_thiscallcc void (%"struct.i64_return::C"*, ...) %{{.*}}(%"struct.i64_return::C"* noundef %{{.*}}, ...)
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C at i64_return@@$BA at AE"(ptr noundef %this, ...) {{.*}} comdat
+// CHECK: musttail call x86_thiscallcc void (ptr, ...) %{{.*}}(ptr noundef %{{.*}}, ...)
 // CHECK-NEXT: ret void
 
 namespace sret {
@@ -63,12 +63,12 @@ void f(C *c) {
 }
 }
 
-// CHECK-LABEL: define dso_local void @"?f at sret@@YAXPAUC at 1@@Z"(%"struct.sret::C"* noundef %c)
-// CHECK: call x86_thiscallcc noundef i32 bitcast (void (%"struct.sret::C"*, ...)* @"??_9C at sret@@$BA at AE" to i32 (%"struct.sret::C"*)*)(%"struct.sret::C"* {{[^,]*}} %{{.*}})
-// CHECK: call x86_thiscallcc void bitcast (void (%"struct.sret::C"*, ...)* @"??_9C at sret@@$BA at AE" to void (%"struct.sret::C"*, %"struct.sret::Big"*)*)(%"struct.sret::C"* {{[^,]*}} %{{.*}}, %"struct.sret::Big"* sret(%"struct.sret::Big") align 4 %{{.*}})
+// CHECK-LABEL: define dso_local void @"?f at sret@@YAXPAUC at 1@@Z"(ptr noundef %c)
+// CHECK: call x86_thiscallcc noundef i32 @"??_9C at sret@@$BA at AE"(ptr {{[^,]*}} %{{.*}})
+// CHECK: call x86_thiscallcc void @"??_9C at sret@@$BA at AE"(ptr {{[^,]*}} %{{.*}}, ptr sret(%"struct.sret::Big") align 4 %{{.*}})
 
-// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C at sret@@$BA at AE"(%"struct.sret::C"* noundef %this, ...) {{.*}} comdat
-// CHECK: musttail call x86_thiscallcc void (%"struct.sret::C"*, ...) %{{.*}}(%"struct.sret::C"* noundef %{{.*}}, ...)
+// CHECK-LABEL: define linkonce_odr x86_thiscallcc void @"??_9C at sret@@$BA at AE"(ptr noundef %this, ...) {{.*}} comdat
+// CHECK: musttail call x86_thiscallcc void (ptr, ...) %{{.*}}(ptr noundef %{{.*}}, ...)
 // CHECK-NEXT: ret void
 
 namespace cdecl_inalloca {
@@ -92,10 +92,10 @@ void f(C *c) {
 }
 }
 
-// CHECK-LABEL: define dso_local void @"?f at cdecl_inalloca@@YAXPAUC at 1@@Z"(%"struct.cdecl_inalloca::C"* noundef %c)
-// CHECK: call void bitcast (void (%"struct.cdecl_inalloca::C"*, ...)* @"??_9C at cdecl_inalloca@@$BA at AA" to void (%"struct.cdecl_inalloca::C"*)*)(%"struct.cdecl_inalloca::C"* {{[^,]*}} %{{.*}})
-// CHECK: call void bitcast (void (%"struct.cdecl_inalloca::C"*, ...)* @"??_9C at cdecl_inalloca@@$BA at AA" to void (<{ %"struct.cdecl_inalloca::C"*, %"struct.cdecl_inalloca::Big" }>*)*)(<{ %"struct.cdecl_inalloca::C"*, %"struct.cdecl_inalloca::Big" }>* inalloca(<{ %"struct.cdecl_inalloca::C"*, %"struct.cdecl_inalloca::Big" }>) %{{.*}})
+// CHECK-LABEL: define dso_local void @"?f at cdecl_inalloca@@YAXPAUC at 1@@Z"(ptr noundef %c)
+// CHECK: call void @"??_9C at cdecl_inalloca@@$BA at AA"(ptr {{[^,]*}} %{{.*}})
+// CHECK: call void @"??_9C at cdecl_inalloca@@$BA at AA"(ptr inalloca(<{ ptr, %"struct.cdecl_inalloca::Big" }>) %{{.*}})
 
-// CHECK-LABEL: define linkonce_odr void @"??_9C at cdecl_inalloca@@$BA at AA"(%"struct.cdecl_inalloca::C"* noundef %this, ...) {{.*}} comdat
-// CHECK: musttail call void (%"struct.cdecl_inalloca::C"*, ...) %{{.*}}(%"struct.cdecl_inalloca::C"* noundef %{{.*}}, ...)
+// CHECK-LABEL: define linkonce_odr void @"??_9C at cdecl_inalloca@@$BA at AA"(ptr noundef %this, ...) {{.*}} comdat
+// CHECK: musttail call void (ptr, ...) %{{.*}}(ptr noundef %{{.*}}, ...)
 // CHECK-NEXT: ret void

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp b/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
index 1c92ed361bd89..72c73128a97bd 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fms-extensions -triple i686-pc-windows-msvc %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -fms-extensions -triple i686-pc-windows-msvc %s -emit-llvm -o - | FileCheck %s
 
 struct A {
   virtual void __fastcall f(int a, int b);
@@ -7,9 +7,9 @@ void (__fastcall A::*doit())(int, int) {
   return &A::f;
 }
 
-// CHECK: define linkonce_odr x86_fastcallcc void @"??_9A@@$BA at AI"(%struct.A* inreg noundef %this, ...) {{.*}} comdat align 2 {
-// CHECK: [[VPTR:%.*]] = getelementptr inbounds void (%struct.A*, ...)*, void (%struct.A*, ...)** %{{.*}}, i64 0
-// CHECK: [[CALLEE:%.*]] = load void (%struct.A*, ...)*, void (%struct.A*, ...)** [[VPTR]]
-// CHECK: musttail call x86_fastcallcc void (%struct.A*, ...) [[CALLEE]](%struct.A* inreg noundef %{{.*}}, ...)
+// CHECK: define linkonce_odr x86_fastcallcc void @"??_9A@@$BA at AI"(ptr inreg noundef %this, ...) {{.*}} comdat align 2 {
+// CHECK: [[VPTR:%.*]] = getelementptr inbounds ptr, ptr %{{.*}}, i64 0
+// CHECK: [[CALLEE:%.*]] = load ptr, ptr [[VPTR]]
+// CHECK: musttail call x86_fastcallcc void (ptr, ...) [[CALLEE]](ptr inreg noundef %{{.*}}, ...)
 // CHECK: ret void
 // CHECK: }

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp b/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
index 71eadf3bd588c..5030a5dcd2a50 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fno-rtti %s -emit-llvm -o %t -triple=i386-pc-win32 -fdump-vtable-layouts 2>&1 | FileCheck --check-prefix=VFTABLES %s
+// RUN: %clang_cc1 -fno-rtti %s -emit-llvm -o %t -triple=i386-pc-win32 -fdump-vtable-layouts 2>&1 | FileCheck --check-prefix=VFTABLES %s
 // RUN: FileCheck --check-prefix=GLOBALS %s < %t
 // RUN: FileCheck --check-prefix=CODEGEN %s < %t
 
@@ -26,7 +26,7 @@ J::J() {}
 // VFTABLES-NEXT:       [return adjustment (to type 'struct test1::C *'): 0 non-virtual]
 // VFTABLES-NEXT:   2 | D *test1::J::foo()
 
-// GLOBALS-LABEL: @"??_7J at test1@@6B@" = linkonce_odr unnamed_addr constant { [3 x i8*] }
+// GLOBALS-LABEL: @"??_7J at test1@@6B@" = linkonce_odr unnamed_addr constant { [3 x ptr] }
 // GLOBALS: @"?foo at J@test1@@QAEPAUB at 2@XZ"
 // GLOBALS: @"?foo at J@test1@@QAEPAUC at 2@XZ"
 // GLOBALS: @"?foo at J@test1@@UAEPAUD at 2@XZ"
@@ -44,7 +44,7 @@ K::K() {}
 
 // Only B to C requires adjustment, but we get 3 thunks in K's vftable, two of
 // which are trivial.
-// GLOBALS-LABEL: @"??_7K at test1@@6B@" = linkonce_odr unnamed_addr constant { [4 x i8*] }
+// GLOBALS-LABEL: @"??_7K at test1@@6B@" = linkonce_odr unnamed_addr constant { [4 x ptr] }
 // GLOBALS: @"?foo at K@test1@@QAEPAUB at 2@XZ"
 // GLOBALS: @"?foo at K@test1@@QAEPAUC at 2@XZ"
 // GLOBALS: @"?foo at K@test1@@QAEPAUD at 2@XZ"
@@ -90,7 +90,7 @@ J::J() {}
 // VFTABLES-NEXT:         [return adjustment (to type 'struct test2::B *'): 4 non-virtual]
 // VFTABLES-NEXT:    1 | D *test2::J::foo()
 
-// GLOBALS-LABEL: @"??_7J at test2@@6B@" = linkonce_odr unnamed_addr constant { [2 x i8*] }
+// GLOBALS-LABEL: @"??_7J at test2@@6B@" = linkonce_odr unnamed_addr constant { [2 x ptr] }
 
 K::K() {}
 
@@ -101,7 +101,7 @@ K::K() {}
 // VFTABLES-NEXT:         [return adjustment (to type 'struct test2::D *'): 0 non-virtual]
 // VFTABLES-NEXT:    2 | E *test2::K::foo()
 
-// GLOBALS-LABEL: @"??_7K at test2@@6B@" = linkonce_odr unnamed_addr constant { [3 x i8*] }
+// GLOBALS-LABEL: @"??_7K at test2@@6B@" = linkonce_odr unnamed_addr constant { [3 x ptr] }
 
 }
 
@@ -124,7 +124,7 @@ struct C : virtual A, B {
 
 C::C() {}
 
-// GLOBALS-LABEL: @"??_7C at pr20479@@6B@" = linkonce_odr unnamed_addr constant { [2 x i8*] }
+// GLOBALS-LABEL: @"??_7C at pr20479@@6B@" = linkonce_odr unnamed_addr constant { [2 x ptr] }
 // GLOBALS: @"?f at B@pr20479@@QAEPAUA at 2@XZ"
 // GLOBALS: @"?f at B@pr20479@@UAEPAU12 at XZ"
 }
@@ -151,7 +151,7 @@ struct C : virtual A, virtual B {
 
 C::C() {}
 
-// GLOBALS-LABEL: @"??_7C at pr21073@@6B@" = linkonce_odr unnamed_addr constant { [2 x i8*] }
+// GLOBALS-LABEL: @"??_7C at pr21073@@6B@" = linkonce_odr unnamed_addr constant { [2 x ptr] }
 // GLOBALS: @"?f at B@pr21073@@WPPPPPPPI at AEPAUA@2 at XZ"
 // GLOBALS: @"?f at B@pr21073@@WPPPPPPPI at AEPAU12@XZ"
 }
@@ -168,7 +168,7 @@ D::D() {}
 // VFTABLES-NEXT:       [return adjustment (to type 'struct pr21073_2::A *'): vbase #1, 0 non-virtual]
 // VFTABLES-NEXT:   1 | C *pr21073_2::C::foo()
 
-// GLOBALS-LABEL: @"??_7D at pr21073_2@@6B@" = {{.*}} constant { [2 x i8*] }
+// GLOBALS-LABEL: @"??_7D at pr21073_2@@6B@" = {{.*}} constant { [2 x ptr] }
 // GLOBALS: @"?foo at C@pr21073_2@@QAEPAUA at 2@XZ"
 // GLOBALS: @"?foo at C@pr21073_2@@UAEPAU12 at XZ"
 }
@@ -196,7 +196,7 @@ D::D() {}
 // VFTABLES-NEXT:       [return adjustment (to type 'struct test3::D *'): 0 non-virtual]
 // VFTABLES-NEXT:       [this adjustment: vtordisp at -4, 0 non-virtual]
 
-// GLOBALS-LABEL: @"??_7D at test3@@6B@" = {{.*}} constant { [3 x i8*] }
+// GLOBALS-LABEL: @"??_7D at test3@@6B@" = {{.*}} constant { [3 x ptr] }
 // GLOBALS: @"?fn at D@test3@@$4PPPPPPPM at A@AEPAUA at 2@XZ"
 // GLOBALS: @"?fn at D@test3@@$4PPPPPPPM at A@AEPAUB at 2@XZ"
 // GLOBALS: @"?fn at D@test3@@$4PPPPPPPM at A@AEPAU12 at XZ"

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp b/clang/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp
index 145a705891674..b0bf927d38f7c 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -fdump-vtable-layouts -o %t.ll > %t
+// RUN: %clang_cc1 %s -fno-rtti -triple=i386-pc-win32 -emit-llvm -fdump-vtable-layouts -o %t.ll > %t
 // RUN: FileCheck --check-prefix=EMITS-VFTABLE %s < %t.ll
 // RUN: FileCheck --check-prefix=NO-VFTABLE %s < %t.ll
 // RUN: FileCheck %s < %t
@@ -19,7 +19,7 @@ struct A {
   int ia;
 };
 A a;
-// EMITS-VFTABLE-DAG: @"??_7A@@6B@" = linkonce_odr unnamed_addr constant { [3 x i8*] }
+// EMITS-VFTABLE-DAG: @"??_7A@@6B@" = linkonce_odr unnamed_addr constant { [3 x ptr] }
 void use(A *obj) { obj->f(); }
 
 struct B : A {
@@ -39,7 +39,7 @@ struct B : A {
   virtual void j();
 };
 B b;
-// EMITS-VFTABLE-DAG: @"??_7B@@6B@" = linkonce_odr unnamed_addr constant { [5 x i8*] }
+// EMITS-VFTABLE-DAG: @"??_7B@@6B@" = linkonce_odr unnamed_addr constant { [5 x ptr] }
 void use(B *obj) { obj->f(); }
 
 struct C {
@@ -69,7 +69,7 @@ struct D {
   virtual ~D();
 };
 D d;
-// EMITS-VFTABLE-DAG: @"??_7D@@6B@" = linkonce_odr unnamed_addr constant { [2 x i8*] }
+// EMITS-VFTABLE-DAG: @"??_7D@@6B@" = linkonce_odr unnamed_addr constant { [2 x ptr] }
 void use(D *obj) { obj->f(); }
 
 struct E : A {
@@ -107,7 +107,7 @@ struct F : A {
   virtual ~F();
 };
 F f;
-// EMITS-VFTABLE-DAG: @"??_7F@@6B@" = linkonce_odr unnamed_addr constant { [5 x i8*] }
+// EMITS-VFTABLE-DAG: @"??_7F@@6B@" = linkonce_odr unnamed_addr constant { [5 x ptr] }
 void use(F *obj) { obj->i(); }
 
 struct G : E {
@@ -295,7 +295,7 @@ struct S {
   // CHECK-NEXT:   0 | void S::f() [deleted]
   virtual void f() = delete;
   S();
-  // EMITS-VFTABLE-DAG: @"??_7S@@6B@" = linkonce_odr unnamed_addr constant { [1 x i8*] } { [1 x i8*] [i8* bitcast (void ()* @_purecall to i8*)] }
+  // EMITS-VFTABLE-DAG: @"??_7S@@6B@" = linkonce_odr unnamed_addr constant { [1 x ptr] } { [1 x ptr] [ptr @_purecall] }
 };
 
 S::S() {}

diff  --git a/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp b/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
index 76db88d0d4863..257ba270291c8 100644
--- a/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
+++ b/clang/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fms-extensions -fno-rtti -emit-llvm -o %t.ll -fdump-vtable-layouts %s -triple=i386-pc-win32 >%t
+// RUN: %clang_cc1 -std=c++11 -fms-extensions -fno-rtti -emit-llvm -o %t.ll -fdump-vtable-layouts %s -triple=i386-pc-win32 >%t
 // RUN: FileCheck %s < %t
 // RUN: FileCheck --check-prefix=MANGLING %s < %t.ll
 
@@ -771,7 +771,7 @@ struct A {
 };
 struct __declspec(dllexport) B : virtual A {
   virtual void f() = 0;
-  // MANGLING-DAG: @"??_7B at Test13@@6B@" = weak_odr dllexport unnamed_addr constant { [1 x i8*] } { [1 x i8*] [i8* bitcast (void ()* @_purecall to i8*)] }
+  // MANGLING-DAG: @"??_7B at Test13@@6B@" = weak_odr dllexport unnamed_addr constant { [1 x ptr] } { [1 x ptr] [ptr @_purecall] }
 };
 }
 
@@ -788,8 +788,8 @@ C::C() {}
 // CHECK-LABEL: VFTable for 'pr21031_1::B' in 'pr21031_1::C' (1 entry)
 // CHECK-NEXT:   0 | void pr21031_1::B::g()
 
-// MANGLING-DAG: @"??_7C at pr21031_1@@6BB at 1@@" = {{.*}} constant { [1 x i8*] }
-// MANGLING-DAG: @"??_7C at pr21031_1@@6B@" = {{.*}} constant { [1 x i8*] }
+// MANGLING-DAG: @"??_7C at pr21031_1@@6BB at 1@@" = {{.*}} constant { [1 x ptr] }
+// MANGLING-DAG: @"??_7C at pr21031_1@@6B@" = {{.*}} constant { [1 x ptr] }
 }
 
 namespace pr21031_2 {
@@ -804,8 +804,8 @@ C::C() {}
 // CHECK-LABEL: VFTable for 'pr21031_2::A' in 'pr21031_2::B' in 'pr21031_2::C' (1 entry)
 // CHECK-NEXT:   0 | void pr21031_2::A::f()
 
-// MANGLING-DAG: @"??_7C at pr21031_2@@6BA at 1@@" = {{.*}} constant { [1 x i8*] }
-// MANGLING-DAG: @"??_7C at pr21031_2@@6BB at 1@@" = {{.*}} constant { [1 x i8*] }
+// MANGLING-DAG: @"??_7C at pr21031_2@@6BA at 1@@" = {{.*}} constant { [1 x ptr] }
+// MANGLING-DAG: @"??_7C at pr21031_2@@6BB at 1@@" = {{.*}} constant { [1 x ptr] }
 }
 
 namespace pr21062_1 {
@@ -818,7 +818,7 @@ D::D() {}
 // CHECK-LABEL: VFTable for 'pr21062_1::A' in 'pr21062_1::D' (1 entry)
 // CHECK-NEXT:   0 | void pr21062_1::A::f()
 
-// MANGLING-DAG: @"??_7D at pr21062_1@@6B@" = {{.*}} constant { [1 x i8*] }
+// MANGLING-DAG: @"??_7D at pr21062_1@@6B@" = {{.*}} constant { [1 x ptr] }
 }
 
 namespace pr21062_2 {
@@ -831,7 +831,7 @@ D::D() {}
 // CHECK-LABEL: VFTable for 'pr21062_2::A' in 'pr21062_2::D' (1 entry)
 // CHECK-NEXT:   0 | void pr21062_2::A::f()
 
-// MANGLING-DAG: @"??_7D at pr21062_2@@6B@" = {{.*}} constant { [1 x i8*] }
+// MANGLING-DAG: @"??_7D at pr21062_2@@6B@" = {{.*}} constant { [1 x ptr] }
 }
 
 namespace pr21064 {
@@ -843,5 +843,5 @@ D::D() {}
 // CHECK-LABEL: VFTable for 'pr21064::B' in 'pr21064::C' in 'pr21064::D' (1 entry)
 // CHECK-NEXT:   0 | void pr21064::B::f()
 
-// MANGLING-DAG: @"??_7D at pr21064@@6B@" = {{.*}} constant { [1 x i8*] }
+// MANGLING-DAG: @"??_7D at pr21064@@6B@" = {{.*}} constant { [1 x ptr] }
 }

diff  --git a/clang/test/CodeGenCXX/microsoft-compatibility.cpp b/clang/test/CodeGenCXX/microsoft-compatibility.cpp
index 6432182c47503..81e4ad8db8270 100644
--- a/clang/test/CodeGenCXX/microsoft-compatibility.cpp
+++ b/clang/test/CodeGenCXX/microsoft-compatibility.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple i686-pc-win32 -std=c++11 -fms-compatibility -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i686-pc-win32 -std=c++11 -fms-compatibility -emit-llvm -o - | FileCheck %s
 
 template <typename>
 struct S {
@@ -24,7 +24,7 @@ extern "C" void f() {
 // CHECK: call void @"??$destroy at X@@YAXPAX at Z"
 // CHECK: ret void
 
-// CHECK-LABEL: define linkonce_odr dso_local void @"??$destroy at X@@YAXPAX at Z"(i8* noundef %p)
+// CHECK-LABEL: define linkonce_odr dso_local void @"??$destroy at X@@YAXPAX at Z"(ptr noundef %p)
 //    The pseudo-dtor expr should not generate calls to anything.
 // CHECK-NOT: call
 // CHECK-NOT: invoke

diff  --git a/clang/test/CodeGenCXX/microsoft-interface.cpp b/clang/test/CodeGenCXX/microsoft-interface.cpp
index c68656d6a1d09..d70caa15ed3c1 100644
--- a/clang/test/CodeGenCXX/microsoft-interface.cpp
+++ b/clang/test/CodeGenCXX/microsoft-interface.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -fms-extensions -Wno-microsoft -triple=i386-pc-windows-gnu -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -fms-extensions -Wno-microsoft -triple=i386-pc-windows-gnu -emit-llvm %s -o - | FileCheck %s
 
 __interface I {
   int test() {
@@ -17,24 +17,24 @@ int fn() {
   return s.test();
 }
 
-// CHECK: @_ZTV1S = linkonce_odr dso_local unnamed_addr constant { [3 x i8*] } { [3 x i8*] [i8* null, i8* bitcast ({ i8*, i8*, i8* }* @_ZTI1S to i8*), i8* bitcast (i32 (%struct.S*)* @_ZN1S4testEv to i8*)] }
+// CHECK: @_ZTV1S = linkonce_odr dso_local unnamed_addr constant { [3 x ptr] } { [3 x ptr] [ptr null, ptr @_ZTI1S, ptr @_ZN1S4testEv] }
 
 // CHECK-LABEL: define dso_local noundef i32 @_Z2fnv()
-// CHECK:   call x86_thiscallcc void @_ZN1SC1Ev(%struct.S* {{[^,]*}} %s)
-// CHECK:   %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc noundef i32 @_ZN1S4testEv(%struct.S* {{[^,]*}} %s)
+// CHECK:   call x86_thiscallcc void @_ZN1SC1Ev(ptr {{[^,]*}} %s)
+// CHECK:   %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc noundef i32 @_ZN1S4testEv(ptr {{[^,]*}} %s)
 
-// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @_ZN1SC1Ev(%struct.S* {{[^,]*}} %this)
-// CHECK:   call x86_thiscallcc void @_ZN1SC2Ev(%struct.S* {{[^,]*}} %{{[.0-9A-Z_a-z]+}})
+// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @_ZN1SC1Ev(ptr {{[^,]*}} %this)
+// CHECK:   call x86_thiscallcc void @_ZN1SC2Ev(ptr {{[^,]*}} %{{[.0-9A-Z_a-z]+}})
 
-// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc noundef i32 @_ZN1S4testEv(%struct.S* {{[^,]*}} %this)
-// CHECK:   %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc noundef i32 @_ZN1I4testEv(%__interface.I* {{[^,]*}} %{{[.0-9A-Z_a-z]+}})
+// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc noundef i32 @_ZN1S4testEv(ptr {{[^,]*}} %this)
+// CHECK:   %{{[.0-9A-Z_a-z]+}} = call x86_thiscallcc noundef i32 @_ZN1I4testEv(ptr {{[^,]*}} %{{[.0-9A-Z_a-z]+}})
 
-// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @_ZN1SC2Ev(%struct.S* {{[^,]*}} %this)
-// CHECK:   call x86_thiscallcc void @_ZN1IC2Ev(%__interface.I* {{[^,]*}} %{{[.0-9A-Z_a-z]+}})
-// CHECK:   store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1S, i32 0, inrange i32 0, i32 2) to i32 (...)**), i32 (...)*** %{{[.0-9A-Z_a-z]+}}
+// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @_ZN1SC2Ev(ptr {{[^,]*}} %this)
+// CHECK:   call x86_thiscallcc void @_ZN1IC2Ev(ptr {{[^,]*}} %{{[.0-9A-Z_a-z]+}})
+// CHECK:   store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTV1S, i32 0, inrange i32 0, i32 2), ptr %{{[.0-9A-Z_a-z]+}}
 
-// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @_ZN1IC2Ev(%__interface.I* {{[^,]*}} %this)
-// CHECK:   store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1I, i32 0, inrange i32 0, i32 2) to i32 (...)**), i32 (...)*** %{{[.0-9A-Z_a-z]+}}
+// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @_ZN1IC2Ev(ptr {{[^,]*}} %this)
+// CHECK:   store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTV1I, i32 0, inrange i32 0, i32 2), ptr %{{[.0-9A-Z_a-z]+}}
 
-// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc noundef i32 @_ZN1I4testEv(%__interface.I* {{[^,]*}} %this)
+// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc noundef i32 @_ZN1I4testEv(ptr {{[^,]*}} %this)
 // CHECK:   ret i32 1

diff  --git a/clang/test/CodeGenCXX/microsoft-new.cpp b/clang/test/CodeGenCXX/microsoft-new.cpp
index d3855c4d33162..0a514ffcc8922 100644
--- a/clang/test/CodeGenCXX/microsoft-new.cpp
+++ b/clang/test/CodeGenCXX/microsoft-new.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-pc-win32 -fms-compatibility %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i686-pc-win32 -fms-compatibility %s -emit-llvm -o - | FileCheck %s
 
 #include <stddef.h>
 
@@ -13,7 +13,7 @@ namespace PR13164 {
 	// MSVC will fall back on the non-array operator new.
     void *a;
     int *p = new(arbitrary) int[4];
-    // CHECK: call noundef i8* @"??2 at YAPAXIUarbitrary_t@@@Z"(i32 noundef 16, %struct.arbitrary_t*
+    // CHECK: call noundef ptr @"??2 at YAPAXIUarbitrary_t@@@Z"(i32 noundef 16, ptr
   }
 
   struct S {
@@ -22,9 +22,9 @@ namespace PR13164 {
 
   void g() {
     S *s = new(arbitrary) S[2];
-    // CHECK: call noundef i8* @"??_US at PR13164@@SAPAXIUarbitrary_t@@@Z"(i32 noundef 2, %struct.arbitrary_t*
+    // CHECK: call noundef ptr @"??_US at PR13164@@SAPAXIUarbitrary_t@@@Z"(i32 noundef 2, ptr
     S *s1 = new(arbitrary) S;
-    // CHECK: call noundef i8* @"??2 at YAPAXIUarbitrary_t@@@Z"(i32 noundef 1, %struct.arbitrary_t*
+    // CHECK: call noundef ptr @"??2 at YAPAXIUarbitrary_t@@@Z"(i32 noundef 1, ptr
   }
 
   struct T {
@@ -34,6 +34,6 @@ namespace PR13164 {
   void h() {
     // This should still call the global operator new[].
     T *t = new(arbitrary2) T[2];
-    // CHECK: call noundef i8* @"??_U at YAPAXIUarbitrary2_t@@@Z"(i32 noundef 2, %struct.arbitrary2_t*
+    // CHECK: call noundef ptr @"??_U at YAPAXIUarbitrary2_t@@@Z"(i32 noundef 2, ptr
   }
 }

diff  --git a/clang/test/CodeGenCXX/microsoft-uuidof.cpp b/clang/test/CodeGenCXX/microsoft-uuidof.cpp
index 4a4f61a5a51eb..35b4f027e54d1 100644
--- a/clang/test/CodeGenCXX/microsoft-uuidof.cpp
+++ b/clang/test/CodeGenCXX/microsoft-uuidof.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -DDEFINE_GUID -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-GUID
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -DDEFINE_GUID -DBRACKET_ATTRIB -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-GUID
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=i386-pc-linux -fms-extensions | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=x86_64-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-64
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -DDEFINE_GUID -DWRONG_GUID -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-WRONG-GUID
+// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-GUID
+// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -DBRACKET_ATTRIB -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-GUID
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=i386-pc-linux -fms-extensions | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=x86_64-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-64
+// RUN: %clang_cc1 -emit-llvm %s -o - -DDEFINE_GUID -DWRONG_GUID -triple=i386-pc-linux -fms-extensions | FileCheck %s --check-prefix=CHECK-DEFINE-WRONG-GUID
 
 #ifdef DEFINE_GUID
 struct _GUID {
@@ -50,18 +50,18 @@ GUID const_init = __uuidof(Curly);
 
 // First global use of __uuidof(S1) forces the creation of the global.
 // CHECK: @_GUID_12345678_1234_1234_1234_1234567890ab = linkonce_odr constant { i32, i16, i16, [8 x i8] } { i32 305419896, i16 4660, i16 4660, [8 x i8] c"\124\124Vx\90\AB" }, comdat
-// CHECK: @gr ={{.*}} constant %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to %struct._GUID*), align 4
-// CHECK-64: @gr ={{.*}} constant %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to %struct._GUID*), align 8
+// CHECK: @gr ={{.*}} constant ptr @_GUID_12345678_1234_1234_1234_1234567890ab, align 4
+// CHECK-64: @gr ={{.*}} constant ptr @_GUID_12345678_1234_1234_1234_1234567890ab, align 8
 const GUID& gr = __uuidof(S1);
 
-// CHECK: @gp ={{.*}} global %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to %struct._GUID*), align 4
+// CHECK: @gp ={{.*}} global ptr @_GUID_12345678_1234_1234_1234_1234567890ab, align 4
 const GUID* gp = &__uuidof(S1);
 
-// CHECK: @cp ={{.*}} global %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ac to %struct._GUID*), align 4
+// CHECK: @cp ={{.*}} global ptr @_GUID_12345678_1234_1234_1234_1234567890ac, align 4
 const GUID* cp = &__uuidof(Curly);
 
 // Special case: _uuidof(0)
-// CHECK: @zeroiid ={{.*}} constant %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_00000000_0000_0000_0000_000000000000 to %struct._GUID*), align 4
+// CHECK: @zeroiid ={{.*}} constant ptr @_GUID_00000000_0000_0000_0000_000000000000, align 4
 const GUID& zeroiid = __uuidof(0);
 
 // __uuidof(S2) hasn't been used globally yet, so it's emitted when it's used
@@ -69,16 +69,16 @@ const GUID& zeroiid = __uuidof(0);
 // CHECK: @_GUID_87654321_4321_4321_4321_ba0987654321 = linkonce_odr constant { i32, i16, i16, [8 x i8] } { i32 -2023406815, i16 17185, i16 17185, [8 x i8] c"C!\BA\09\87eC!" }, comdat
 
 // The static initializer for thing.
-// CHECK-DEFINE-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 bitcast (%struct._GUID* @thing to i8*), i8* align 4 bitcast (%struct._GUID* @_GUID_12345678_1234_1234_1234_1234567890ac to i8*), i32 16, i1 false)
-// CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 bitcast (%struct._GUID* @thing to i8*), i8* align 4 bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ac to i8*), i32 4, i1 false)
+// CHECK-DEFINE-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 @thing, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ac, i32 16, i1 false)
+// CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 @thing, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ac, i32 4, i1 false)
 
 // The static initializer for g.
-// CHECK-DEFINE-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 bitcast (%struct._GUID* @g to i8*), i8* align 4 bitcast (%struct._GUID* @_GUID_12345678_1234_1234_1234_1234567890ab to i8*), i32 16, i1 false)
-// CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 bitcast (%struct._GUID* @g to i8*), i8* align 4 bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to i8*), i32 4, i1 false)
+// CHECK-DEFINE-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 @g, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ab, i32 16, i1 false)
+// CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 @g, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ab, i32 4, i1 false)
 
 // We don't constant-initialize const_init if the definition of _GUID is dodgy.
 // CHECK-DEFINE-GUID-NOT: @const_init
-// CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 bitcast (%struct._GUID* @const_init to i8*), i8* align 4 bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ac to i8*), i32 4, i1 false)
+// CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 @const_init, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ac, i32 4, i1 false)
 
 #ifdef DEFINE_GUID
 void fun() {
@@ -89,22 +89,16 @@ void fun() {
   // CHECK-DEFINE-GUID: %s1_3 = alloca %struct._GUID, align 4
   // CHECK-DEFINE-WRONG-GUID: %s1_3 = alloca %struct._GUID, align 4
 
-  // CHECK-DEFINE-GUID: [[U1:%.+]] = bitcast %struct._GUID* %s1_1 to i8*
-  // CHECK-DEFINE-WRONG-GUID: [[U1:%.+]] = bitcast %struct._GUID* %s1_1 to i8*
-  // CHECK-DEFINE-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[U1]], i8* align 4 bitcast (%struct._GUID* @_GUID_12345678_1234_1234_1234_1234567890ab to i8*), i32 16, i1 false)
-  // CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[U1]], i8* align 4 bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to i8*), i32 4, i1 false)
+  // CHECK-DEFINE-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %s1_1, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ab, i32 16, i1 false)
+  // CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %s1_1, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ab, i32 4, i1 false)
   GUID s1_1 = (side_effect(), __uuidof(S1));
 
-  // CHECK-DEFINE-GUID: [[U2:%.+]] = bitcast %struct._GUID* %s1_2 to i8*
-  // CHECK-DEFINE-WRONG-GUID: [[U2:%.+]] = bitcast %struct._GUID* %s1_2 to i8*
-  // CHECK-DEFINE-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[U2]], i8* align 4 bitcast (%struct._GUID* @_GUID_12345678_1234_1234_1234_1234567890ab to i8*), i32 16, i1 false)
-  // CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[U2]], i8* align 4 bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to i8*), i32 4, i1 false)
+  // CHECK-DEFINE-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %s1_2, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ab, i32 16, i1 false)
+  // CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %s1_2, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ab, i32 4, i1 false)
   GUID s1_2 = (side_effect(), __uuidof(S1));
 
-  // CHECK-DEFINE-GUID: [[U3:%.+]] = bitcast %struct._GUID* %s1_3 to i8*
-  // CHECK-DEFINE-WRONG-GUID: [[U3:%.+]] = bitcast %struct._GUID* %s1_3 to i8*
-  // CHECK-DEFINE-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[U3]], i8* align 4 bitcast (%struct._GUID* @_GUID_12345678_1234_1234_1234_1234567890ab to i8*), i32 16, i1 false)
-  // CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 [[U3]], i8* align 4 bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_12345678_1234_1234_1234_1234567890ab to i8*), i32 4, i1 false)
+  // CHECK-DEFINE-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %s1_3, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ab, i32 16, i1 false)
+  // CHECK-DEFINE-WRONG-GUID: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %s1_3, ptr align 4 @_GUID_12345678_1234_1234_1234_1234567890ab, i32 4, i1 false)
   GUID s1_3 = (side_effect(), __uuidof(s1));
 }
 #endif
@@ -118,17 +112,17 @@ void gun() {
   GUID s2_1 = __uuidof(S2);
   GUID s2_2 = __uuidof(S2);
 #endif
-  // CHECK: %r = alloca %struct._GUID*, align 4
-  // CHECK: %p = alloca %struct._GUID*, align 4
-  // CHECK: %zeroiid = alloca %struct._GUID*, align 4
+  // CHECK: %r = alloca ptr, align 4
+  // CHECK: %p = alloca ptr, align 4
+  // CHECK: %zeroiid = alloca ptr, align 4
 
-  // CHECK: store %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_87654321_4321_4321_4321_ba0987654321 to %struct._GUID*), %struct._GUID** %r, align 4
+  // CHECK: store ptr @_GUID_87654321_4321_4321_4321_ba0987654321, ptr %r, align 4
   const GUID& r = __uuidof(S2);
-  // CHECK: store %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_87654321_4321_4321_4321_ba0987654321 to %struct._GUID*), %struct._GUID** %p, align 4
+  // CHECK: store ptr @_GUID_87654321_4321_4321_4321_ba0987654321, ptr %p, align 4
   const GUID* p = &__uuidof(S2);
 
   // Special case _uuidof(0), local scope version.
-  // CHECK: store %struct._GUID* bitcast ({ i32, i16, i16, [8 x i8] }* @_GUID_00000000_0000_0000_0000_000000000000 to %struct._GUID*), %struct._GUID** %zeroiid, align 4
+  // CHECK: store ptr @_GUID_00000000_0000_0000_0000_000000000000, ptr %zeroiid, align 4
   const GUID& zeroiid = __uuidof(0);
 }
 

diff  --git a/clang/test/CodeGenCXX/mingw-w64-seh-exceptions.cpp b/clang/test/CodeGenCXX/mingw-w64-seh-exceptions.cpp
index df31ac5a59a2c..5134a2d887e8d 100644
--- a/clang/test/CodeGenCXX/mingw-w64-seh-exceptions.cpp
+++ b/clang/test/CodeGenCXX/mingw-w64-seh-exceptions.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -fexceptions -exception-model=seh -emit-llvm -triple x86_64-w64-windows-gnu -o - | FileCheck %s --check-prefix=X64
-// RUN: %clang_cc1 -no-opaque-pointers %s -fexceptions -exception-model=dwarf -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
-// RUN: %clang_cc1 -no-opaque-pointers %s -fexceptions -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
+// RUN: %clang_cc1 %s -fexceptions -exception-model=seh -emit-llvm -triple x86_64-w64-windows-gnu -o - | FileCheck %s --check-prefix=X64
+// RUN: %clang_cc1 %s -fexceptions -exception-model=dwarf -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
+// RUN: %clang_cc1 %s -fexceptions -emit-llvm -triple i686-w64-windows-gnu -o - | FileCheck %s --check-prefix=X86
 
 extern "C" void foo();
 extern "C" void bar();
@@ -17,11 +17,11 @@ extern "C" void test() {
 }
 
 // X64: define dso_local void @test()
-// X64-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_seh0 to i8*)
+// X64-SAME: personality ptr @__gxx_personality_seh0
 // X64: invoke void @foo()
-// X64: landingpad { i8*, i32 }
+// X64: landingpad { ptr, i32 }
 
 // X86: define dso_local void @test()
-// X86-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+// X86-SAME: personality ptr @__gxx_personality_v0
 // X86: invoke void @foo()
-// X86: landingpad { i8*, i32 }
+// X86: landingpad { ptr, i32 }

diff  --git a/clang/test/CodeGenCXX/mips-size_t-ptr
diff _t.cpp b/clang/test/CodeGenCXX/mips-size_t-ptr
diff _t.cpp
index d677d9f9713a2..6757180684bf5 100644
--- a/clang/test/CodeGenCXX/mips-size_t-ptr
diff _t.cpp
+++ b/clang/test/CodeGenCXX/mips-size_t-ptr
diff _t.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ -emit-llvm -triple=mips-unknown-linux-gnu < %s | FileCheck --check-prefix=O32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ -emit-llvm -triple=mips64-unknown-linux-gnu -target-abi n32 < %s | FileCheck --check-prefix=N32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ -emit-llvm -triple=mips64-unknown-linux-gnu -target-abi n64 < %s | FileCheck --check-prefix=N64 %s
+// RUN: %clang_cc1 -x c++ -emit-llvm -triple=mips-unknown-linux-gnu < %s | FileCheck --check-prefix=O32 %s
+// RUN: %clang_cc1 -x c++ -emit-llvm -triple=mips64-unknown-linux-gnu -target-abi n32 < %s | FileCheck --check-prefix=N32 %s
+// RUN: %clang_cc1 -x c++ -emit-llvm -triple=mips64-unknown-linux-gnu -target-abi n64 < %s | FileCheck --check-prefix=N64 %s
 
 // Test that the size_t is correct for the ABI. It's not sufficient to be the
 // correct size, it must be the same type for correct name mangling.
@@ -9,28 +9,28 @@ long *alloc_long() {
   long *rv = new long; // size_t is implicit in the new operator
   return rv;
 }
-// O32-LABEL: define{{.*}} i32* @_Z10alloc_longv()
-// O32: call noalias noundef nonnull i8* @_Znwj(i32 noundef signext 4)
+// O32-LABEL: define{{.*}} ptr @_Z10alloc_longv()
+// O32: call noalias noundef nonnull ptr @_Znwj(i32 noundef signext 4)
 
-// N32-LABEL: define{{.*}} i32* @_Z10alloc_longv()
-// N32: call noalias noundef nonnull i8* @_Znwj(i32 noundef signext 4)
+// N32-LABEL: define{{.*}} ptr @_Z10alloc_longv()
+// N32: call noalias noundef nonnull ptr @_Znwj(i32 noundef signext 4)
 
-// N64-LABEL: define{{.*}} i64* @_Z10alloc_longv()
-// N64: call noalias noundef nonnull i8* @_Znwm(i64 noundef zeroext 8)
+// N64-LABEL: define{{.*}} ptr @_Z10alloc_longv()
+// N64: call noalias noundef nonnull ptr @_Znwm(i64 noundef zeroext 8)
 
 long *alloc_long_array() {
   long *rv = new long[2];
   return rv;
 }
 
-// O32-LABEL: define{{.*}} i32* @_Z16alloc_long_arrayv()
-// O32: call noalias noundef nonnull i8* @_Znaj(i32 noundef signext 8)
+// O32-LABEL: define{{.*}} ptr @_Z16alloc_long_arrayv()
+// O32: call noalias noundef nonnull ptr @_Znaj(i32 noundef signext 8)
 
-// N32-LABEL: define{{.*}} i32* @_Z16alloc_long_arrayv()
-// N32: call noalias noundef nonnull i8* @_Znaj(i32 noundef signext 8)
+// N32-LABEL: define{{.*}} ptr @_Z16alloc_long_arrayv()
+// N32: call noalias noundef nonnull ptr @_Znaj(i32 noundef signext 8)
 
-// N64-LABEL: define{{.*}} i64* @_Z16alloc_long_arrayv()
-// N64: call noalias noundef nonnull i8* @_Znam(i64 noundef zeroext 16)
+// N64-LABEL: define{{.*}} ptr @_Z16alloc_long_arrayv()
+// N64: call noalias noundef nonnull ptr @_Znam(i64 noundef zeroext 16)
 
 #include <stddef.h>
 

diff  --git a/clang/test/CodeGenCXX/ms-constexpr-static-data-member.cpp b/clang/test/CodeGenCXX/ms-constexpr-static-data-member.cpp
index 93c61947b9234..604a49fefbacb 100644
--- a/clang/test/CodeGenCXX/ms-constexpr-static-data-member.cpp
+++ b/clang/test/CodeGenCXX/ms-constexpr-static-data-member.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple=x86_64-windows-msvc %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple=x86_64-windows-msvc %s -o - | FileCheck %s
 
 struct Foo { int x, y; };
 
@@ -21,6 +21,6 @@ void usethem() {
 
 // CHECK-DAG: @"?sdm_char_array at S@@2QBDB" = linkonce_odr dso_local constant [5 x i8] c"asdf\00", comdat, align 1
 
-// CHECK-DAG: @"?sdm_char_ptr at S@@2QEBDEB" = linkonce_odr dso_local constant i8* getelementptr inbounds ([5 x i8], [5 x i8]* @"??_C at _04JIHMPGLA@asdf?$AA@", i32 0, i32 0), comdat, align 8
+// CHECK-DAG: @"?sdm_char_ptr at S@@2QEBDEB" = linkonce_odr dso_local constant ptr @"??_C at _04JIHMPGLA@asdf?$AA@", comdat, align 8
 
 // CHECK-DAG: @"?sdm_udt at S@@2UFoo@@B" = linkonce_odr dso_local constant %struct.Foo { i32 1, i32 2 }, comdat, align 4

diff  --git a/clang/test/CodeGenCXX/ms-inline-asm-fields.cpp b/clang/test/CodeGenCXX/ms-inline-asm-fields.cpp
index 3fb6193098604..9f79fd6e2a17b 100644
--- a/clang/test/CodeGenCXX/ms-inline-asm-fields.cpp
+++ b/clang/test/CodeGenCXX/ms-inline-asm-fields.cpp
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s
 
 struct A {
   int a1;
@@ -15,8 +15,8 @@ A a_global;
 }
 
 extern "C" int test_param_field(A p) {
-// CHECK: define{{.*}} i32 @test_param_field(%struct.A* noundef byval(%struct.A) align 4 %p)
-// CHECK: getelementptr inbounds %struct.A, %struct.A* %p, i32 0, i32 0
+// CHECK: define{{.*}} i32 @test_param_field(ptr noundef byval(%struct.A) align 4 %p)
+// CHECK: getelementptr inbounds %struct.A, ptr %p, i32 0, i32 0
 // CHECK: call i32 asm sideeffect inteldialect "mov eax, $1"
 // CHECK: ret i32
   __asm mov eax, p.a1
@@ -24,7 +24,7 @@ extern "C" int test_param_field(A p) {
 
 extern "C" int test_namespace_global() {
 // CHECK: define{{.*}} i32 @test_namespace_global()
-// CHECK: call i32 asm sideeffect inteldialect "mov eax, $1", "{{.*}}"(i32* elementtype(i32) getelementptr inbounds (%struct.A, %struct.A* @_ZN4asdf8a_globalE, i32 0, i32 2, i32 1))
+// CHECK: call i32 asm sideeffect inteldialect "mov eax, $1", "{{.*}}"(ptr elementtype(i32) getelementptr inbounds (%struct.A, ptr @_ZN4asdf8a_globalE, i32 0, i32 2, i32 1))
 // CHECK: ret i32
   __asm mov eax, asdf::a_global.a3.b2
 }
@@ -51,6 +51,6 @@ struct msvc_dcas_x86 {
 template void msvc_dcas_x86<false>::store();
 // CHECK: define weak_odr void @"\01PR26001"(
 // CHECK: %[[P:.*]] = alloca %"struct.make_storage_type<false>::type", align 4
-// CHECK: %[[B:.*]] = getelementptr inbounds %"struct.make_storage_type<false>::type", %"struct.make_storage_type<false>::type"* %[[P]], i32 0, i32 0
-// CHECK: %[[X:.*]] = getelementptr inbounds %"struct.make_storage_type<false>::type::B", %"struct.make_storage_type<false>::type::B"* %[[B]], i32 0, i32 1
-// CHECK: call void asm sideeffect inteldialect "mov edx, dword ptr $0", "*m,~{edx},~{dirflag},~{fpsr},~{flags}"(i32* elementtype(i32) %[[X]])
+// CHECK: %[[B:.*]] = getelementptr inbounds %"struct.make_storage_type<false>::type", ptr %[[P]], i32 0, i32 0
+// CHECK: %[[X:.*]] = getelementptr inbounds %"struct.make_storage_type<false>::type::B", ptr %[[B]], i32 0, i32 1
+// CHECK: call void asm sideeffect inteldialect "mov edx, dword ptr $0", "*m,~{edx},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(i32) %[[X]])

diff  --git a/clang/test/CodeGenCXX/ms-inline-asm-return.cpp b/clang/test/CodeGenCXX/ms-inline-asm-return.cpp
index 5407c773a6dd6..30167b000abe7 100644
--- a/clang/test/CodeGenCXX/ms-inline-asm-return.cpp
+++ b/clang/test/CodeGenCXX/ms-inline-asm-return.cpp
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple i686-pc-windows-msvc -emit-llvm -o - -fasm-blocks | FileCheck %s
+// RUN: %clang_cc1 %s -triple i686-pc-windows-msvc -emit-llvm -o - -fasm-blocks | FileCheck %s
 
 // Check that we take EAX or EAX:EDX and return it from these functions for MSVC
 // compatibility.
@@ -86,8 +86,8 @@ bool f_i1() {
 // CHECK-LABEL: define dso_local zeroext i1 @f_i1()
 // CHECK: %[[r:[^ ]*]] = call i32 asm sideeffect inteldialect "mov eax, $$1\0A\09mov edx, $$1", "=&{eax},~{edx},{{.*}}"
 // CHECK: %[[r_i8:[^ ]*]] = trunc i32 %[[r]] to i8
-// CHECK: store i8 %[[r_i8]], i8* %{{.*}}
-// CHECK: %[[r_i1:[^ ]*]] = load i1, i1* %{{.*}}
+// CHECK: store i8 %[[r_i8]], ptr %{{.*}}
+// CHECK: %[[r_i1:[^ ]*]] = load i1, ptr %{{.*}}
 // CHECK: ret i1 %[[r_i1]]
 
 struct FourChars {
@@ -100,8 +100,8 @@ FourChars f_s4() {
 }
 // CHECK-LABEL: define dso_local i32 @f_s4()
 // CHECK: %[[r:[^ ]*]] = call i32 asm sideeffect inteldialect "mov eax, $$16843009", "=&{eax},{{.*}}"
-// CHECK: store i32 %[[r]], i32* %{{.*}}
-// CHECK: %[[r_i32:[^ ]*]] = load i32, i32* %{{.*}}
+// CHECK: store i32 %[[r]], ptr %{{.*}}
+// CHECK: %[[r_i32:[^ ]*]] = load i32, ptr %{{.*}}
 // CHECK: ret i32 %[[r_i32]]
 
 struct EightChars {
@@ -115,8 +115,8 @@ EightChars f_s8() {
 }
 // CHECK-LABEL: define dso_local i64 @f_s8()
 // CHECK: %[[r:[^ ]*]] = call i64 asm sideeffect inteldialect "mov eax, $$16843009\0A\09mov edx, $$85", "=&A,{{.*}}"
-// CHECK: store i64 %[[r]], i64* %{{.*}}
-// CHECK: %[[r_i64:[^ ]*]] = load i64, i64* %{{.*}}
+// CHECK: store i64 %[[r]], ptr %{{.*}}
+// CHECK: %[[r_i64:[^ ]*]] = load i64, ptr %{{.*}}
 // CHECK: ret i64 %[[r_i64]]
 
 } // extern "C"

diff  --git a/clang/test/CodeGenCXX/ms-thread_local.cpp b/clang/test/CodeGenCXX/ms-thread_local.cpp
index f189028b36880..a6c62967f23de 100644
--- a/clang/test/CodeGenCXX/ms-thread_local.cpp
+++ b/clang/test/CodeGenCXX/ms-thread_local.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++1y -triple=i686-pc-win32 -fms-compatibility-version=19.25 -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++1y -triple=i686-pc-win32 -fms-compatibility-version=19.20 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LEGACY
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++1y -triple=i686-pc-win32 -fms-compatibility-version=19.25 -ftls-model=local-dynamic -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LD
+// RUN: %clang_cc1 %s -std=c++1y -triple=i686-pc-win32 -fms-compatibility-version=19.25 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -std=c++1y -triple=i686-pc-win32 -fms-compatibility-version=19.20 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LEGACY
+// RUN: %clang_cc1 %s -std=c++1y -triple=i686-pc-win32 -fms-compatibility-version=19.25 -ftls-model=local-dynamic -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-LD
 
 struct A {
   A();
@@ -9,18 +9,18 @@ struct A {
 
 // CHECK-DAG: $"??$a at X@@3UA@@A" = comdat any
 // CHECK-DAG: @"??$a at X@@3UA@@A" = linkonce_odr dso_local thread_local global %struct.A zeroinitializer, comdat, align 1
-// CHECK-DAG: @"??__E?$a at X@@YAXXZ$initializer$" = internal constant void ()* @"??__E?$a at X@@YAXXZ", section ".CRT$XDU", comdat($"??$a at X@@3UA@@A")
+// CHECK-DAG: @"??__E?$a at X@@YAXXZ$initializer$" = internal constant ptr @"??__E?$a at X@@YAXXZ", section ".CRT$XDU", comdat($"??$a at X@@3UA@@A")
 // CHECK-LD-DAG: $"??$a at X@@3UA@@A" = comdat any
 // CHECK-LD-DAG: @"??$a at X@@3UA@@A" = linkonce_odr dso_local thread_local(localdynamic) global %struct.A zeroinitializer, comdat, align 1
-// CHECK-LD-DAG: @"??__E?$a at X@@YAXXZ$initializer$" = internal constant void ()* @"??__E?$a at X@@YAXXZ", section ".CRT$XDU", comdat($"??$a at X@@3UA@@A")
+// CHECK-LD-DAG: @"??__E?$a at X@@YAXXZ$initializer$" = internal constant ptr @"??__E?$a at X@@YAXXZ", section ".CRT$XDU", comdat($"??$a at X@@3UA@@A")
 template <typename T>
 thread_local A a = A();
 
 // CHECK-DAG: @"?b@@3UA@@A" = dso_local thread_local global %struct.A zeroinitializer, align 1
-// CHECK-DAG: @"__tls_init$initializer$" = internal constant void ()* @__tls_init, section ".CRT$XDU"
+// CHECK-DAG: @"__tls_init$initializer$" = internal constant ptr @__tls_init, section ".CRT$XDU"
 // CHECK-DAG: @__tls_guard = external dso_local thread_local global i8
 // CHECK-LD-DAG: @"?b@@3UA@@A" = dso_local thread_local(localdynamic) global %struct.A zeroinitializer, align 1
-// CHECK-LD-DAG: @"__tls_init$initializer$" = internal constant void ()* @__tls_init, section ".CRT$XDU"
+// CHECK-LD-DAG: @"__tls_init$initializer$" = internal constant ptr @__tls_init, section ".CRT$XDU"
 // CHECK-LD-DAG: @__tls_guard = external dso_local thread_local global i8
 // CHECK-LEGACY-NOT: @__tls_guard = external dso_local thread_local global i8
 thread_local A b;
@@ -29,9 +29,9 @@ thread_local A b;
 // CHECK-LD-LABEL: declare dso_local void @__dyn_tls_on_demand_init()
 // CHECK-LEGACY-NOT: declare dso_local void @__dyn_tls_on_demand_init()
 
-// CHECK-LABEL: define dso_local void @"?f@@YA?AUA@@XZ"(%struct.A* noalias sret(%struct.A) align 1 %agg.result)
+// CHECK-LABEL: define dso_local void @"?f@@YA?AUA@@XZ"(ptr noalias sret(%struct.A) align 1 %agg.result)
 // CHECK: call void @__dyn_tls_on_demand_init()
-// CHECK-LD-LABEL: define dso_local void @"?f@@YA?AUA@@XZ"(%struct.A* noalias sret(%struct.A) align 1 %agg.result)
+// CHECK-LD-LABEL: define dso_local void @"?f@@YA?AUA@@XZ"(ptr noalias sret(%struct.A) align 1 %agg.result)
 // CHECK-LD: call void @__dyn_tls_on_demand_init()
 // CHECK-LEGACY-NOT: call void @__dyn_tls_on_demand_init()
 

diff  --git a/clang/test/CodeGenCXX/ms-thunks-ehspec.cpp b/clang/test/CodeGenCXX/ms-thunks-ehspec.cpp
index ec870ab3b476d..c988e24e94cc5 100644
--- a/clang/test/CodeGenCXX/ms-thunks-ehspec.cpp
+++ b/clang/test/CodeGenCXX/ms-thunks-ehspec.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fexceptions -fcxx-exceptions %s -triple=i686-windows-msvc -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -fexceptions -fcxx-exceptions %s -triple=i686-windows-msvc -emit-llvm -o - | FileCheck %s
 
 // When generating thunks using musttail due to inalloca parameters, don't push
 // and pop terminate scopes. PR44987
@@ -20,8 +20,8 @@ class C : A, B {
 };
 C c;
 
-// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @"?f at C@@G3AEXUNonTrivial@@@Z"(%class.C* noundef %this, <{ %struct.NonTrivial }>* inalloca(<{ %struct.NonTrivial }>) %0)
+// CHECK-LABEL: define linkonce_odr dso_local x86_thiscallcc void @"?f at C@@G3AEXUNonTrivial@@@Z"(ptr noundef %this, ptr inalloca(<{ %struct.NonTrivial }>) %0)
 // CHECK-NOT: invoke
-// CHECK: musttail call x86_thiscallcc void @"?f at C@@EAEXUNonTrivial@@@Z"(%class.C* noundef %{{.*}}, <{ %struct.NonTrivial }>* inalloca(<{ %struct.NonTrivial }>) %0)
+// CHECK: musttail call x86_thiscallcc void @"?f at C@@EAEXUNonTrivial@@@Z"(ptr noundef %{{.*}}, ptr inalloca(<{ %struct.NonTrivial }>) %0)
 // CHECK-NEXT:  ret void
 

diff  --git a/clang/test/CodeGenCXX/ms_struct.cpp b/clang/test/CodeGenCXX/ms_struct.cpp
index 0a769d79bb7eb..eec50ddd40f8a 100644
--- a/clang/test/CodeGenCXX/ms_struct.cpp
+++ b/clang/test/CodeGenCXX/ms_struct.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
 
 // rdar://20636558
 
@@ -22,12 +22,11 @@ struct ATTR Derived : Base {
 
 // CHECK: [[DERIVED:%.*]] = type <{ [[BASE:%.*]], i32, [4 x i8] }>
 // CHECK: [[BASE]] = type { [[VBASE:%.*]] }
-// CHECK: [[VBASE]] = type { i32 (...)** }
+// CHECK: [[VBASE]] = type { ptr }
 
 // CHECK: define{{.*}} void @_ZN7DerivedC2Ev
-// CHECK:   [[SELF:%.*]] = load [[DERIVED]]*
-// CHECK:   [[T0:%.*]] = bitcast [[DERIVED]]* [[SELF]] to [[BASE]]*
-// CHECK:   call void @_ZN4BaseC2Ev([[BASE]]* {{[^,]*}} [[T0]], i8**
+// CHECK:   [[SELF:%.*]] = load ptr
+// CHECK:   call void @_ZN4BaseC2Ev(ptr {{[^,]*}} [[SELF]], ptr
 // CHECK:   [[T0:%.*]] = getelementptr inbounds {{.*}} [[SELF]], i32 0, i32 1
-// CHECK:   store i32 20, i32* [[T0]],
+// CHECK:   store i32 20, ptr [[T0]],
 Derived::Derived() : value(20) {}

diff  --git a/clang/test/CodeGenCXX/msabi-ctor-abstract-vbase.cpp b/clang/test/CodeGenCXX/msabi-ctor-abstract-vbase.cpp
index 3762ad0ec264a..71aea616f5d8e 100644
--- a/clang/test/CodeGenCXX/msabi-ctor-abstract-vbase.cpp
+++ b/clang/test/CodeGenCXX/msabi-ctor-abstract-vbase.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-msvc %s -emit-llvm -fexceptions -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc %s -emit-llvm -fexceptions -o - | FileCheck %s
 
 // PR41065: As background, when constructing a complete object, virtual bases
 // are constructed first. If an exception is thrown while constructing a
@@ -52,7 +52,7 @@ C::C(int n) : B(n) { may_throw(); }
 
 // No branches, no constructor calls before may_throw();
 //
-// CHECK-LABEL: define dso_local noundef %struct.C* @"??0C@@QEAA at H@Z"(%struct.C* {{[^,]*}} returned align 8 dereferenceable(8) %this, i32 noundef %n, i32 noundef %is_most_derived)
+// CHECK-LABEL: define dso_local noundef ptr @"??0C@@QEAA at H@Z"(ptr {{[^,]*}} returned align 8 dereferenceable(8) %this, i32 noundef %n, i32 noundef %is_most_derived)
 // CHECK-NOT: br i1
 // CHECK-NOT: {{call.*@"\?0}}
 // CHECK: call void @"?may_throw@@YAXXZ"()
@@ -63,12 +63,12 @@ D::D(int n) : C(n), B(n) { may_throw(); }
 
 // Conditionally construct (and destroy) vbase B, unconditionally C.
 //
-// CHECK-LABEL: define dso_local noundef %struct.D* @"??0D@@QEAA at H@Z"(%struct.D* {{[^,]*}} returned align 8 dereferenceable(8) %this, i32 noundef %n, i32 noundef %is_most_derived)
+// CHECK-LABEL: define dso_local noundef ptr @"??0D@@QEAA at H@Z"(ptr {{[^,]*}} returned align 8 dereferenceable(8) %this, i32 noundef %n, i32 noundef %is_most_derived)
 // CHECK: icmp ne i32 {{.*}}, 0
 // CHECK: br i1
-// CHECK: call noundef %struct.B* @"??0B@@QEAA at H@Z"
+// CHECK: call noundef ptr @"??0B@@QEAA at H@Z"
 // CHECK: br label
-// CHECK: invoke noundef %struct.C* @"??0C@@QEAA at H@Z"
+// CHECK: invoke noundef ptr @"??0C@@QEAA at H@Z"
 // CHECK: invoke void @"?may_throw@@YAXXZ"()
 // CHECK: cleanuppad
 // CHECK: call void @"??1C@@UEAA at XZ"

diff  --git a/clang/test/CodeGenCXX/multi-dim-operator-new.cpp b/clang/test/CodeGenCXX/multi-dim-operator-new.cpp
index 3c2659d7ad7de..f1eeb38371a6a 100644
--- a/clang/test/CodeGenCXX/multi-dim-operator-new.cpp
+++ b/clang/test/CodeGenCXX/multi-dim-operator-new.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple x86_64-unknown-unknown -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple x86_64-unknown-unknown -emit-llvm -o - | FileCheck %s
 // PR6641
 
 extern "C" int printf(const char *, ...);
@@ -43,6 +43,6 @@ int main() {
  return 0;
 }
 
-// CHECK: call noalias noundef nonnull i8* @_Znam
-// CHECK: call noalias noundef nonnull i8* @_Znam
-// CHECK: call noalias noundef nonnull i8* @_Znam
+// CHECK: call noalias noundef nonnull ptr @_Znam
+// CHECK: call noalias noundef nonnull ptr @_Znam
+// CHECK: call noalias noundef nonnull ptr @_Znam

diff  --git a/clang/test/CodeGenCXX/multi-versioning-internal-linkage.cpp b/clang/test/CodeGenCXX/multi-versioning-internal-linkage.cpp
index 97b71e6323938..3d42c30e89074 100644
--- a/clang/test/CodeGenCXX/multi-versioning-internal-linkage.cpp
+++ b/clang/test/CodeGenCXX/multi-versioning-internal-linkage.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-linux-gnu -emit-llvm %s -o - | FileCheck %s --check-prefix=LINUX
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-pc -emit-llvm %s -o - | FileCheck %s --check-prefix=WINDOWS
 
 __attribute__((target("default"))) static int static_target() {
   return 0;
@@ -29,21 +29,21 @@ int usage() {
 // Ensure that these are all 'internal'. Windows doesn't have ifuncs or aliases,
 // since Windows doesn't support ifuncs.
 // aliases:
-// LINUX: @_ZL15static_dispatchv = internal alias i32 (), i32 ()* @_ZL15static_dispatchv.ifunc
-// LINUX: @_ZN12_GLOBAL__N_113anon_dispatchEv = internal alias i32 (), i32 ()* @_ZN12_GLOBAL__N_113anon_dispatchEv.ifunc
+// LINUX: @_ZL15static_dispatchv = internal alias i32 (), ptr @_ZL15static_dispatchv.ifunc
+// LINUX: @_ZN12_GLOBAL__N_113anon_dispatchEv = internal alias i32 (), ptr @_ZN12_GLOBAL__N_113anon_dispatchEv.ifunc
 
 // ifuncs:
-// LINUX: @_ZL15static_dispatchv.ifunc = internal ifunc i32 (), i32 ()* ()* @_ZL15static_dispatchv.resolver
-// LINUX: @_ZN12_GLOBAL__N_113anon_dispatchEv.ifunc = internal ifunc i32 (), i32 ()* ()* @_ZN12_GLOBAL__N_113anon_dispatchEv.resolver
-// LINUX: @_ZL13static_targetv.ifunc = internal ifunc i32 (), i32 ()* ()* @_ZL13static_targetv.resolver
-// LINUX: @_ZN12_GLOBAL__N_111anon_targetEv.ifunc = internal ifunc i32 (), i32 ()* ()* @_ZN12_GLOBAL__N_111anon_targetEv.resolver
+// LINUX: @_ZL15static_dispatchv.ifunc = internal ifunc i32 (), ptr @_ZL15static_dispatchv.resolver
+// LINUX: @_ZN12_GLOBAL__N_113anon_dispatchEv.ifunc = internal ifunc i32 (), ptr @_ZN12_GLOBAL__N_113anon_dispatchEv.resolver
+// LINUX: @_ZL13static_targetv.ifunc = internal ifunc i32 (), ptr @_ZL13static_targetv.resolver
+// LINUX: @_ZN12_GLOBAL__N_111anon_targetEv.ifunc = internal ifunc i32 (), ptr @_ZN12_GLOBAL__N_111anon_targetEv.resolver
 
 // resolvers:
-// LINUX: define internal i32 ()* @_ZL15static_dispatchv.resolver()
+// LINUX: define internal ptr @_ZL15static_dispatchv.resolver()
 // WINDOWS: define internal i32 @"?static_dispatch@@YAHXZ"()
-// LINUX: define internal i32 ()* @_ZN12_GLOBAL__N_113anon_dispatchEv.resolver()
+// LINUX: define internal ptr @_ZN12_GLOBAL__N_113anon_dispatchEv.resolver()
 // WINDOWS: define internal i32 @"?anon_dispatch{{.*}}@@YAHXZ"()
-// LINUX: define internal i32 ()* @_ZL13static_targetv.resolver()
+// LINUX: define internal ptr @_ZL13static_targetv.resolver()
 // WINDOWS: define internal i32 @"?static_target@@YAHXZ.resolver"()
-// LINUX: define internal i32 ()* @_ZN12_GLOBAL__N_111anon_targetEv.resolver()
+// LINUX: define internal ptr @_ZN12_GLOBAL__N_111anon_targetEv.resolver()
 // WINDOWS: define internal i32 @"?anon_target{{.*}}@@YAHXZ.resolver"()

diff  --git a/clang/test/CodeGenCXX/new-alias.cpp b/clang/test/CodeGenCXX/new-alias.cpp
index 4931c1355aed9..5310d47297bbd 100644
--- a/clang/test/CodeGenCXX/new-alias.cpp
+++ b/clang/test/CodeGenCXX/new-alias.cpp
@@ -1,13 +1,13 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-linux-gnu -std=c++11 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -std=c++11 -o - %s | FileCheck %s
 
 using size_t = decltype(sizeof(0));
 
 extern "C" char *something(long long x) {
 }
 
-// CHECK: @_Znwm ={{.*}} alias i8* (i64), i8* (i64)* @something
+// CHECK: @_Znwm ={{.*}} alias ptr (i64), ptr @something
 void *operator new(size_t) __attribute__((alias("something")));
 
 // PR16715: don't assert here.
-// CHECK: call noalias noundef nonnull i8* @_Znwm(i64 noundef 4) #3{{$}}
+// CHECK: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4) #3{{$}}
 int *pr16715 = new int;

diff  --git a/clang/test/CodeGenCXX/new-infallible.cpp b/clang/test/CodeGenCXX/new-infallible.cpp
index c64d16157c3d5..226cb20c9c556 100644
--- a/clang/test/CodeGenCXX/new-infallible.cpp
+++ b/clang/test/CodeGenCXX/new-infallible.cpp
@@ -1,16 +1,16 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-linux-gnu -fnew-infallible -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-linux-gnu -fno-new-infallible -fnew-infallible -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-linux-gnu -fno-new-infallible -o - %s | FileCheck %s --check-prefix=NO-NEW-INFALLIBLE
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-linux-gnu -fnew-infallible -fno-new-infallible -o - %s | FileCheck %s --check-prefix=NO-NEW-INFALLIBLE
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -fnew-infallible -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -fno-new-infallible -fnew-infallible -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -fno-new-infallible -o - %s | FileCheck %s --check-prefix=NO-NEW-INFALLIBLE
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-linux-gnu -fnew-infallible -fno-new-infallible -o - %s | FileCheck %s --check-prefix=NO-NEW-INFALLIBLE
 
-// CHECK: call noalias noundef nonnull i8* @_Znwm(i64 noundef 4)
+// CHECK: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4)
 
 // CHECK: ; Function Attrs: nobuiltin nounwind allocsize(0)
-// CHECK-NEXT: declare noundef nonnull i8* @_Znwm(i64 noundef)
+// CHECK-NEXT: declare noundef nonnull ptr @_Znwm(i64 noundef)
 
-// NO-NEW-INFALLIBLE: call noalias noundef nonnull i8* @_Znwm(i64 noundef 4)
+// NO-NEW-INFALLIBLE: call noalias noundef nonnull ptr @_Znwm(i64 noundef 4)
 
 // NO-NEW-INFALLIBLE: ; Function Attrs: nobuiltin allocsize(0)
-// NO-NEW-INFALLIBLE-NEXT: declare noundef nonnull i8* @_Znwm(i64 noundef)
+// NO-NEW-INFALLIBLE-NEXT: declare noundef nonnull ptr @_Znwm(i64 noundef)
 
 int *new_infallible = new int;

diff  --git a/clang/test/CodeGenCXX/no-opt-volatile-memcpy.cpp b/clang/test/CodeGenCXX/no-opt-volatile-memcpy.cpp
index ff99c3a99cbf6..eee9c9bd33bb0 100644
--- a/clang/test/CodeGenCXX/no-opt-volatile-memcpy.cpp
+++ b/clang/test/CodeGenCXX/no-opt-volatile-memcpy.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple=x86_64-apple-darwin  -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple=x86_64-apple-darwin  -emit-llvm -o - %s | FileCheck %s
 // rdar://11861085
 
 struct s {
@@ -16,12 +16,9 @@ void foo (void) {
 }
 // CHECK-LABEL: define{{.*}} void @_Z3foov()
 // CHECK: %[[LS:.*]] = alloca %struct.s, align 4
-// CHECK-NEXT: %[[ZERO:.*]] = bitcast %struct.s* %[[LS]] to i8*
-// CHECK-NEXT:  %[[ONE:.*]] = bitcast %struct.s* %[[LS]] to i8*
-// CHECK-NEXT:  call void @llvm.memcpy.{{.*}}(i8* align 4 %[[ZERO]], i8* align 4 %[[ONE]], i64 132, i1 true)
-// CHECK-NEXT:  call void @llvm.memcpy.{{.*}}(i8* align 4 getelementptr inbounds (%struct.s, %struct.s* @gs, i32 0, i32 0, i32 0), i8* align 4 getelementptr inbounds (%struct.s, %struct.s* @gs, i32 0, i32 0, i32 0), i64 132, i1 true)
-// CHECK-NEXT:  %[[TWO:.*]] = bitcast %struct.s* %[[LS]] to i8*
-// CHECK-NEXT:  call void @llvm.memcpy.{{.*}}(i8* align 4 %[[TWO]], i8* align 4 getelementptr inbounds (%struct.s, %struct.s* @gs, i32 0, i32 0, i32 0), i64 132, i1 true)
+// CHECK-NEXT:  call void @llvm.memcpy.{{.*}}(ptr align 4 %[[LS]], ptr align 4 %[[LS]], i64 132, i1 true)
+// CHECK-NEXT:  call void @llvm.memcpy.{{.*}}(ptr align 4 @gs, ptr align 4 @gs, i64 132, i1 true)
+// CHECK-NEXT:  call void @llvm.memcpy.{{.*}}(ptr align 4 %[[LS]], ptr align 4 @gs, i64 132, i1 true)
 
 
 struct s1 {
@@ -35,8 +32,8 @@ void fee (void) {
   s.y = gs;
 }
 // CHECK-LABEL: define{{.*}} void @_Z3feev()
-// CHECK: call void @llvm.memcpy.{{.*}}(i8* align 4 getelementptr inbounds (%struct.s1, %struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* align 4 getelementptr inbounds (%struct.s1, %struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i64 132, i1 true)
-// CHECK-NEXT: call void @llvm.memcpy.{{.*}}(i8* align 4 getelementptr inbounds (%struct.s1, %struct.s1* @s, i32 0, i32 0, i32 0, i32 0), i8* align 4 getelementptr inbounds (%struct.s, %struct.s* @gs, i32 0, i32 0, i32 0), i64 132, i1 true)
+// CHECK: call void @llvm.memcpy.{{.*}}(ptr align 4 @s, ptr align 4 @s, i64 132, i1 true)
+// CHECK-NEXT: call void @llvm.memcpy.{{.*}}(ptr align 4 @s, ptr align 4 @gs, i64 132, i1 true)
 
 struct d : s1 {
 };
@@ -47,4 +44,4 @@ void gorf(void) {
   gd = gd;
 }
 // CHECK-LABEL: define{{.*}} void @_Z4gorfv()
-// CHECK:   call void @llvm.memcpy.{{.*}}(i8* align 4 getelementptr inbounds (%struct.d, %struct.d* @gd, i32 0, i32 0, i32 0, i32 0, i32 0), i8* align 4 getelementptr inbounds (%struct.d, %struct.d* @gd, i32 0, i32 0, i32 0, i32 0, i32 0), i64 132, i1 true)
+// CHECK:   call void @llvm.memcpy.{{.*}}(ptr align 4 @gd, ptr align 4 @gd, i64 132, i1 true)

diff  --git a/clang/test/CodeGenCXX/no-unique-address-2.cpp b/clang/test/CodeGenCXX/no-unique-address-2.cpp
index 9a19c2f2d81b0..c524a70b5a435 100644
--- a/clang/test/CodeGenCXX/no-unique-address-2.cpp
+++ b/clang/test/CodeGenCXX/no-unique-address-2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++2a %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -std=c++2a %s -emit-llvm -o - -triple x86_64-linux-gnu | FileCheck %s
 
 struct TriviallyCopyable {};
 
@@ -21,5 +21,5 @@ void call() {
 
 // The memcpy call should copy exact 4 bytes for member 'int i'
 // CHECK: define {{.*}} void @_ZN3FooC2EOS_
-// CHECK:  call void @llvm.memcpy.p0i8.p0i8.i64(i8* {{.+}}, i8* {{.+}}, i64 4, i1 false)
+// CHECK:  call void @llvm.memcpy.p0.p0.i64(ptr {{.+}}, ptr {{.+}}, i64 4, i1 false)
 // CHECK:  call void @_ZN20NonTriviallyCopyableC2EOS_

diff  --git a/clang/test/CodeGenCXX/noexcept.cpp b/clang/test/CodeGenCXX/noexcept.cpp
index cee5727b49ee9..cb7a5e80b504a 100644
--- a/clang/test/CodeGenCXX/noexcept.cpp
+++ b/clang/test/CodeGenCXX/noexcept.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - -fcxx-exceptions -fexceptions -std=c++11 | FileCheck %s
 
 // rdar://11904428
 //   Ensure that we call __cxa_begin_catch before calling
@@ -29,12 +29,12 @@ namespace test0 {
 //   Cleanup lpad.
 // CHECK: [[TERMINATE_LPAD]]:
 // CHECK-NEXT: [[T0:%.*]] = landingpad
-// CHECK-NEXT:   catch i8* null
-// CHECK-NEXT: [[T1:%.*]] = extractvalue { i8*, i32 } [[T0]], 0
-// CHECK-NEXT: call void @__clang_call_terminate(i8* [[T1]])
+// CHECK-NEXT:   catch ptr null
+// CHECK-NEXT: [[T1:%.*]] = extractvalue { ptr, i32 } [[T0]], 0
+// CHECK-NEXT: call void @__clang_call_terminate(ptr [[T1]])
 // CHECK-NEXT: unreachable
 
 // CHECK-LABEL:  define linkonce_odr hidden void @__clang_call_terminate(
-// CHECK:      call i8* @__cxa_begin_catch(
+// CHECK:      call ptr @__cxa_begin_catch(
 // CHECK-NEXT: call void @_ZSt9terminatev()
 // CHECK-NEXT: unreachable

diff  --git a/clang/test/CodeGenCXX/noinline-template.cpp b/clang/test/CodeGenCXX/noinline-template.cpp
index 2cc1b712d78ba..cb81f72d0714f 100644
--- a/clang/test/CodeGenCXX/noinline-template.cpp
+++ b/clang/test/CodeGenCXX/noinline-template.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -triple %itanium_abi_triple -o - | FileCheck %s
 
 // This was a problem in Sema, but only shows up as noinline missing
 // in CodeGen.
 
-// CHECK: define linkonce_odr {{.*}}void @_ZN6VectorIiE13growStorageByEv(%struct.Vector* {{[^,]*}} %this) [[NI:#[0-9]+]]
+// CHECK: define linkonce_odr {{.*}}void @_ZN6VectorIiE13growStorageByEv(ptr {{[^,]*}} %this) [[NI:#[0-9]+]]
 
 template <class Ty> struct Vector  {
   void growStorageBy();

diff  --git a/clang/test/CodeGenCXX/nrvo.cpp b/clang/test/CodeGenCXX/nrvo.cpp
index 955f8c474ac0a..ac89946fdab00 100644
--- a/clang/test/CodeGenCXX/nrvo.cpp
+++ b/clang/test/CodeGenCXX/nrvo.cpp
@@ -1,7 +1,7 @@
 // NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown -emit-llvm -fcxx-exceptions -fexceptions -disable-llvm-passes -std=c++03 -o - %s | FileCheck --check-prefixes=CHECK-EH-03 %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown -emit-llvm -fcxx-exceptions -fexceptions -disable-llvm-passes -std=c++11 -DCXX11 -o - %s | FileCheck --check-prefixes=CHECK-EH-11 %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -fcxx-exceptions -fexceptions -disable-llvm-passes -std=c++03 -o - %s | FileCheck --check-prefixes=CHECK-EH-03 %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm -fcxx-exceptions -fexceptions -disable-llvm-passes -std=c++11 -DCXX11 -o - %s | FileCheck --check-prefixes=CHECK-EH-11 %s
 
 // Test code generation for the named return value optimization.
 class X {
@@ -25,51 +25,48 @@ extern X OuterX;
 
 // CHECK-LABEL: @_Z5test0v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4:[0-9]+]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4:[0-9]+]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z5test0v(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    ret void
 //
 // CHECK-EH-11-LABEL: @_Z5test0v(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6:[0-9]+]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6:[0-9]+]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    ret void
@@ -81,96 +78,93 @@ X test0() { // http://wg21.link/p2025r2#ex-2
 
 // CHECK-LABEL: @_Z5test1b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       cleanup:
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z5test1b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-03-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       cleanup:
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    ret void
 //
 // CHECK-EH-11-LABEL: @_Z5test1b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-11-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       cleanup:
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    ret void
@@ -184,170 +178,167 @@ X test1(bool B) {
 
 // CHECK-LABEL: @_Z5test2b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-NEXT:    [[Y:%.*]] = alloca [[CLASS_X]], align 1
 // CHECK-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    call void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    call void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    call void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    call void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       cleanup:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR4]]
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z5test2b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-EH-03-NEXT:    [[Y:%.*]] = alloca [[CLASS_X]], align 1
-// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont:
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD1:%.*]]
 // CHECK-EH-03:       invoke.cont2:
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-03:       lpad:
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[EHCLEANUP:%.*]]
 // CHECK-EH-03:       lpad1:
-// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP6]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP7:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP7]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { ptr, i32 } [[TMP5]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP6]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP7:%.*]] = extractvalue { ptr, i32 } [[TMP5]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP7]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT5:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT3:%.*]] unwind label [[LPAD1]]
 // CHECK-EH-03:       invoke.cont3:
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       cleanup:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT4:%.*]] unwind label [[LPAD]]
 // CHECK-EH-03:       invoke.cont4:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    ret void
 // CHECK-EH-03:       invoke.cont5:
 // CHECK-EH-03-NEXT:    br label [[EHCLEANUP]]
 // CHECK-EH-03:       ehcleanup:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT7:%.*]] unwind label [[TERMINATE_LPAD]]
 // CHECK-EH-03:       invoke.cont7:
 // CHECK-EH-03-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-03:       eh.resume:
-// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-03-NEXT:    [[LPAD_VAL8:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-03-NEXT:    resume { i8*, i32 } [[LPAD_VAL8]]
+// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-03-NEXT:    [[LPAD_VAL8:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-03-NEXT:    resume { ptr, i32 } [[LPAD_VAL8]]
 // CHECK-EH-03:       terminate.lpad:
-// CHECK-EH-03-NEXT:    [[TMP8:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-03-NEXT:    catch i8* null
-// CHECK-EH-03-NEXT:    [[TMP9:%.*]] = extractvalue { i8*, i32 } [[TMP8]], 0
-// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(i8* [[TMP9]]) #[[ATTR6:[0-9]+]]
+// CHECK-EH-03-NEXT:    [[TMP8:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-03-NEXT:    catch ptr null
+// CHECK-EH-03-NEXT:    [[TMP9:%.*]] = extractvalue { ptr, i32 } [[TMP8]], 0
+// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(ptr [[TMP9]]) #[[ATTR6:[0-9]+]]
 // CHECK-EH-03-NEXT:    unreachable
 //
 // CHECK-EH-11-LABEL: @_Z5test2b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-EH-11-NEXT:    [[Y:%.*]] = alloca [[CLASS_X]], align 1
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD1:%.*]]
 // CHECK-EH-11:       invoke.cont2:
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[EHCLEANUP:%.*]]
 // CHECK-EH-11:       lpad1:
-// CHECK-EH-11-NEXT:    [[TMP5:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP5:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP6]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP7:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP7]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP6:%.*]] = extractvalue { ptr, i32 } [[TMP5]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP6]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP7:%.*]] = extractvalue { ptr, i32 } [[TMP5]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP7]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EHCLEANUP]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT3:%.*]] unwind label [[LPAD1]]
 // CHECK-EH-11:       invoke.cont3:
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       cleanup:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR6]]
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       ehcleanup:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL5:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL5]]
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL5:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL5]]
 //
 X test2(bool B) {
   X x;
@@ -359,36 +350,35 @@ X test2(bool B) {
 
 // CHECK-LABEL: @_Z5test3b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-NEXT:    [[NRVO1:%.*]] = alloca i1, align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
 // CHECK-NEXT:    br label [[RETURN:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO1]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO1]], align 1
-// CHECK-NEXT:    [[NRVO_VAL2:%.*]] = load i1, i1* [[NRVO1]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO1]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO1]], align 1
+// CHECK-NEXT:    [[NRVO_VAL2:%.*]] = load i1, ptr [[NRVO1]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL2]], label [[NRVO_SKIPDTOR4:%.*]], label [[NRVO_UNUSED3:%.*]]
 // CHECK:       nrvo.unused3:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR4]]
 // CHECK:       nrvo.skipdtor4:
 // CHECK-NEXT:    br label [[RETURN]]
@@ -397,36 +387,35 @@ X test2(bool B) {
 //
 // CHECK-EH-03-LABEL: @_Z5test3b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-03-NEXT:    [[NRVO1:%.*]] = alloca i1, align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO1]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO1]], align 1
-// CHECK-EH-03-NEXT:    [[NRVO_VAL2:%.*]] = load i1, i1* [[NRVO1]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO1]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO1]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL2:%.*]] = load i1, ptr [[NRVO1]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL2]], label [[NRVO_SKIPDTOR4:%.*]], label [[NRVO_UNUSED3:%.*]]
 // CHECK-EH-03:       nrvo.unused3:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR4]]
 // CHECK-EH-03:       nrvo.skipdtor4:
 // CHECK-EH-03-NEXT:    br label [[RETURN]]
@@ -435,36 +424,35 @@ X test2(bool B) {
 //
 // CHECK-EH-11-LABEL: @_Z5test3b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-11-NEXT:    [[NRVO1:%.*]] = alloca i1, align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO1]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO1]], align 1
-// CHECK-EH-11-NEXT:    [[NRVO_VAL2:%.*]] = load i1, i1* [[NRVO1]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO1]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO1]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL2:%.*]] = load i1, ptr [[NRVO1]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL2]], label [[NRVO_SKIPDTOR4:%.*]], label [[NRVO_UNUSED3:%.*]]
 // CHECK-EH-11:       nrvo.unused3:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR4]]
 // CHECK-EH-11:       nrvo.skipdtor4:
 // CHECK-EH-11-NEXT:    br label [[RETURN]]
@@ -484,34 +472,33 @@ extern "C" void exit(int) throw();
 
 // CHECK-LABEL: @_Z5test4b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       cleanup:
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
-// CHECK-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-NEXT:    i32 0, label [[CLEANUP_CONT:%.*]]
 // CHECK-NEXT:    i32 1, label [[RETURN:%.*]]
@@ -527,34 +514,33 @@ extern "C" void exit(int) throw();
 //
 // CHECK-EH-03-LABEL: @_Z5test4b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-03-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       cleanup:
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
-// CHECK-EH-03-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-EH-03-NEXT:    i32 0, label [[CLEANUP_CONT:%.*]]
 // CHECK-EH-03-NEXT:    i32 1, label [[RETURN:%.*]]
@@ -570,34 +556,33 @@ extern "C" void exit(int) throw();
 //
 // CHECK-EH-11-LABEL: @_Z5test4b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-11-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       cleanup:
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
-// CHECK-EH-11-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-EH-11-NEXT:    i32 0, label [[CLEANUP_CONT:%.*]]
 // CHECK-EH-11-NEXT:    i32 1, label [[RETURN:%.*]]
@@ -624,61 +609,59 @@ X test4(bool B) {
 void may_throw();
 // CHECK-EH-03-LABEL: @_Z5test5v(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
-// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
+// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    invoke void @_Z9may_throwv()
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont:
 // CHECK-EH-03-NEXT:    br label [[TRY_CONT:%.*]]
 // CHECK-EH-03:       lpad:
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-03-NEXT:    catch i8* bitcast ({ i8*, i8* }* @_ZTI1X to i8*)
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP2]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP3]], i32* [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-03-NEXT:    catch ptr @_ZTI1X
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP2]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP3]], ptr [[EHSELECTOR_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CATCH_DISPATCH:%.*]]
 // CHECK-EH-03:       catch.dispatch:
-// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = call i32 @llvm.eh.typeid.for(i8* bitcast ({ i8*, i8* }* @_ZTI1X to i8*)) #[[ATTR7]]
+// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = call i32 @llvm.eh.typeid.for(ptr @_ZTI1X) #[[ATTR7]]
 // CHECK-EH-03-NEXT:    [[MATCHES:%.*]] = icmp eq i32 [[SEL]], [[TMP4]]
 // CHECK-EH-03-NEXT:    br i1 [[MATCHES]], label [[CATCH:%.*]], label [[EH_RESUME:%.*]]
 // CHECK-EH-03:       catch:
-// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = call i8* @__cxa_get_exception_ptr(i8* [[EXN]]) #[[ATTR7]]
-// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = bitcast i8* [[TMP5]] to %class.X*
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]], %class.X* noundef nonnull align 1 dereferenceable(1) [[TMP6]])
+// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = call ptr @__cxa_get_exception_ptr(ptr [[EXN]]) #[[ATTR7]]
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[X]], ptr noundef nonnull align 1 dereferenceable(1) [[TMP5]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont1:
-// CHECK-EH-03-NEXT:    [[TMP7:%.*]] = call i8* @__cxa_begin_catch(i8* [[EXN]]) #[[ATTR7]]
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP7:%.*]] = call ptr @__cxa_begin_catch(ptr [[EXN]]) #[[ATTR7]]
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT3:%.*]] unwind label [[LPAD2:%.*]]
 // CHECK-EH-03:       invoke.cont3:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT5:%.*]] unwind label [[LPAD4:%.*]]
 // CHECK-EH-03:       lpad2:
-// CHECK-EH-03-NEXT:    [[TMP8:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP8:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP9:%.*]] = extractvalue { i8*, i32 } [[TMP8]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP9]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP10:%.*]] = extractvalue { i8*, i32 } [[TMP8]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP10]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP9:%.*]] = extractvalue { ptr, i32 } [[TMP8]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP9]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP10:%.*]] = extractvalue { ptr, i32 } [[TMP8]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP10]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT6:%.*]] unwind label [[TERMINATE_LPAD]]
 // CHECK-EH-03:       invoke.cont5:
 // CHECK-EH-03-NEXT:    call void @__cxa_end_catch()
 // CHECK-EH-03-NEXT:    ret void
 // CHECK-EH-03:       lpad4:
-// CHECK-EH-03-NEXT:    [[TMP11:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP11:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP12:%.*]] = extractvalue { i8*, i32 } [[TMP11]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP12]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP13:%.*]] = extractvalue { i8*, i32 } [[TMP11]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP13]], i32* [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP12:%.*]] = extractvalue { ptr, i32 } [[TMP11]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP12]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP13:%.*]] = extractvalue { ptr, i32 } [[TMP11]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP13]], ptr [[EHSELECTOR_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[EHCLEANUP:%.*]]
 // CHECK-EH-03:       invoke.cont6:
 // CHECK-EH-03-NEXT:    br label [[EHCLEANUP]]
@@ -691,65 +674,63 @@ void may_throw();
 // CHECK-EH-03-NEXT:    call void @llvm.trap()
 // CHECK-EH-03-NEXT:    unreachable
 // CHECK-EH-03:       eh.resume:
-// CHECK-EH-03-NEXT:    [[EXN8:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[SEL9:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN8]], 0
-// CHECK-EH-03-NEXT:    [[LPAD_VAL10:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL9]], 1
-// CHECK-EH-03-NEXT:    resume { i8*, i32 } [[LPAD_VAL10]]
+// CHECK-EH-03-NEXT:    [[EXN8:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[SEL9:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN8]], 0
+// CHECK-EH-03-NEXT:    [[LPAD_VAL10:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL9]], 1
+// CHECK-EH-03-NEXT:    resume { ptr, i32 } [[LPAD_VAL10]]
 // CHECK-EH-03:       terminate.lpad:
-// CHECK-EH-03-NEXT:    [[TMP14:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-03-NEXT:    catch i8* null
-// CHECK-EH-03-NEXT:    [[TMP15:%.*]] = extractvalue { i8*, i32 } [[TMP14]], 0
-// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(i8* [[TMP15]]) #[[ATTR6]]
+// CHECK-EH-03-NEXT:    [[TMP14:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-03-NEXT:    catch ptr null
+// CHECK-EH-03-NEXT:    [[TMP15:%.*]] = extractvalue { ptr, i32 } [[TMP14]], 0
+// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(ptr [[TMP15]]) #[[ATTR6]]
 // CHECK-EH-03-NEXT:    unreachable
 //
 // CHECK-EH-11-LABEL: @_Z5test5v(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    invoke void @_Z9may_throwv()
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
 // CHECK-EH-11-NEXT:    br label [[TRY_CONT:%.*]]
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-11-NEXT:    catch i8* bitcast ({ i8*, i8* }* @_ZTI1X to i8*)
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP2]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP3]], i32* [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-11-NEXT:    catch ptr @_ZTI1X
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP2]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP3]], ptr [[EHSELECTOR_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CATCH_DISPATCH:%.*]]
 // CHECK-EH-11:       catch.dispatch:
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = call i32 @llvm.eh.typeid.for(i8* bitcast ({ i8*, i8* }* @_ZTI1X to i8*)) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = call i32 @llvm.eh.typeid.for(ptr @_ZTI1X) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    [[MATCHES:%.*]] = icmp eq i32 [[SEL]], [[TMP4]]
 // CHECK-EH-11-NEXT:    br i1 [[MATCHES]], label [[CATCH:%.*]], label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       catch:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP5:%.*]] = call i8* @__cxa_get_exception_ptr(i8* [[EXN]]) #[[ATTR6]]
-// CHECK-EH-11-NEXT:    [[TMP6:%.*]] = bitcast i8* [[TMP5]] to %class.X*
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]], %class.X* noundef nonnull align 1 dereferenceable(1) [[TMP6]])
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP5:%.*]] = call ptr @__cxa_get_exception_ptr(ptr [[EXN]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[X]], ptr noundef nonnull align 1 dereferenceable(1) [[TMP5]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont1:
-// CHECK-EH-11-NEXT:    [[TMP7:%.*]] = call i8* @__cxa_begin_catch(i8* [[EXN]]) #[[ATTR6]]
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    [[TMP7:%.*]] = call ptr @__cxa_begin_catch(ptr [[EXN]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT3:%.*]] unwind label [[LPAD2:%.*]]
 // CHECK-EH-11:       invoke.cont3:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    call void @__cxa_end_catch()
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       lpad2:
-// CHECK-EH-11-NEXT:    [[TMP8:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP8:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP9:%.*]] = extractvalue { i8*, i32 } [[TMP8]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP9]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP10:%.*]] = extractvalue { i8*, i32 } [[TMP8]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP10]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP9:%.*]] = extractvalue { ptr, i32 } [[TMP8]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP9]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP10:%.*]] = extractvalue { ptr, i32 } [[TMP8]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP10]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    invoke void @__cxa_end_catch()
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT4:%.*]] unwind label [[TERMINATE_LPAD]]
 // CHECK-EH-11:       invoke.cont4:
@@ -758,16 +739,16 @@ void may_throw();
 // CHECK-EH-11-NEXT:    call void @llvm.trap()
 // CHECK-EH-11-NEXT:    unreachable
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN5:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL6:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN5]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL7:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL6]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL7]]
+// CHECK-EH-11-NEXT:    [[EXN5:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL6:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN5]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL7:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL6]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL7]]
 // CHECK-EH-11:       terminate.lpad:
-// CHECK-EH-11-NEXT:    [[TMP11:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-11-NEXT:    catch i8* null
-// CHECK-EH-11-NEXT:    [[TMP12:%.*]] = extractvalue { i8*, i32 } [[TMP11]], 0
-// CHECK-EH-11-NEXT:    call void @__clang_call_terminate(i8* [[TMP12]]) #[[ATTR7:[0-9]+]]
+// CHECK-EH-11-NEXT:    [[TMP11:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-11-NEXT:    catch ptr null
+// CHECK-EH-11-NEXT:    [[TMP12:%.*]] = extractvalue { ptr, i32 } [[TMP11]], 0
+// CHECK-EH-11-NEXT:    call void @__clang_call_terminate(ptr [[TMP12]]) #[[ATTR7:[0-9]+]]
 // CHECK-EH-11-NEXT:    unreachable
 //
 X test5() { // http://wg21.link/p2025r2#ex-14
@@ -782,82 +763,79 @@ X test5() { // http://wg21.link/p2025r2#ex-14
 // rdar://problem/10430868
 // CHECK-LABEL: @_Z5test6v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[A:%.*]] = alloca [[CLASS_X:%.*]], align 8
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[A]])
-// CHECK-NEXT:    call void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[A]])
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[A]]) #[[ATTR4]]
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[A]])
+// CHECK-NEXT:    call void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[A]])
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[A]]) #[[ATTR4]]
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z5test6v(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[A:%.*]] = alloca [[CLASS_X:%.*]], align 8
-// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[A]])
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[A]])
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[A]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[A]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[A]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[A]])
 // CHECK-EH-03-NEXT:    ret void
 // CHECK-EH-03:       lpad:
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP2]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP3]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[A]])
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP2]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP3]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[A]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont1:
 // CHECK-EH-03-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-03:       eh.resume:
-// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-03-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-03-NEXT:    resume { i8*, i32 } [[LPAD_VAL2]]
+// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-03-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-03-NEXT:    resume { ptr, i32 } [[LPAD_VAL2]]
 // CHECK-EH-03:       terminate.lpad:
-// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-03-NEXT:    catch i8* null
-// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = extractvalue { i8*, i32 } [[TMP4]], 0
-// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(i8* [[TMP5]]) #[[ATTR6]]
+// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-03-NEXT:    catch ptr null
+// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP4]], 0
+// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(ptr [[TMP5]]) #[[ATTR6]]
 // CHECK-EH-03-NEXT:    unreachable
 //
 // CHECK-EH-11-LABEL: @_Z5test6v(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[A:%.*]] = alloca [[CLASS_X:%.*]], align 8
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[A]])
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[A]])
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[A]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[A]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[A]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[A]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP2]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP3]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[A]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP2]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP3]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[A]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL1:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL1]]
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL1:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL1]]
 //
 X test6() {
   X a __attribute__((aligned(8)));
@@ -866,87 +844,84 @@ X test6() {
 
 // CHECK-LABEL: @_Z5test7b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
 // CHECK-NEXT:    br label [[RETURN:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-NEXT:    br label [[RETURN]]
 // CHECK:       return:
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z5test7b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[RETURN]]
 // CHECK-EH-03:       return:
 // CHECK-EH-03-NEXT:    ret void
 //
 // CHECK-EH-11-LABEL: @_Z5test7b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-11-NEXT:    br label [[RETURN]]
 // CHECK-EH-11:       return:
 // CHECK-EH-11-NEXT:    ret void
@@ -961,36 +936,35 @@ X test7(bool b) {
 
 // CHECK-LABEL: @_Z5test8b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-NEXT:    [[NRVO1:%.*]] = alloca i1, align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
 // CHECK-NEXT:    br label [[RETURN:%.*]]
 // CHECK:       if.else:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO1]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO1]], align 1
-// CHECK-NEXT:    [[NRVO_VAL2:%.*]] = load i1, i1* [[NRVO1]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO1]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO1]], align 1
+// CHECK-NEXT:    [[NRVO_VAL2:%.*]] = load i1, ptr [[NRVO1]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL2]], label [[NRVO_SKIPDTOR4:%.*]], label [[NRVO_UNUSED3:%.*]]
 // CHECK:       nrvo.unused3:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR4]]
 // CHECK:       nrvo.skipdtor4:
 // CHECK-NEXT:    br label [[RETURN]]
@@ -999,36 +973,35 @@ X test7(bool b) {
 //
 // CHECK-EH-03-LABEL: @_Z5test8b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-03-NEXT:    [[NRVO1:%.*]] = alloca i1, align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-03:       if.else:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO1]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO1]], align 1
-// CHECK-EH-03-NEXT:    [[NRVO_VAL2:%.*]] = load i1, i1* [[NRVO1]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO1]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO1]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL2:%.*]] = load i1, ptr [[NRVO1]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL2]], label [[NRVO_SKIPDTOR4:%.*]], label [[NRVO_UNUSED3:%.*]]
 // CHECK-EH-03:       nrvo.unused3:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR4]]
 // CHECK-EH-03:       nrvo.skipdtor4:
 // CHECK-EH-03-NEXT:    br label [[RETURN]]
@@ -1037,36 +1010,35 @@ X test7(bool b) {
 //
 // CHECK-EH-11-LABEL: @_Z5test8b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-11-NEXT:    [[NRVO1:%.*]] = alloca i1, align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-11:       if.else:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO1]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO1]], align 1
-// CHECK-EH-11-NEXT:    [[NRVO_VAL2:%.*]] = load i1, i1* [[NRVO1]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO1]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO1]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL2:%.*]] = load i1, ptr [[NRVO1]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL2]], label [[NRVO_SKIPDTOR4:%.*]], label [[NRVO_UNUSED3:%.*]]
 // CHECK-EH-11:       nrvo.unused3:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR4]]
 // CHECK-EH-11:       nrvo.skipdtor4:
 // CHECK-EH-11-NEXT:    br label [[RETURN]]
@@ -1085,31 +1057,28 @@ X test8(bool b) {
 
 // CHECK-LABEL: @_Z5test9v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[TMP:%.*]] = alloca [[STRUCT_Y:%.*]], align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %struct.Y* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-NEXT:    call void @_ZN1YIiE1fEv(%struct.Y* sret([[STRUCT_Y]]) align 1 [[TMP]])
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-NEXT:    call void @_ZN1YIiE1fEv(ptr sret([[STRUCT_Y]]) align 1 [[TMP]])
 // CHECK-NEXT:    call void @llvm.trap()
 // CHECK-NEXT:    unreachable
 //
 // CHECK-EH-03-LABEL: @_Z5test9v(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[TMP:%.*]] = alloca [[STRUCT_Y:%.*]], align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %struct.Y* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-03-NEXT:    call void @_ZN1YIiE1fEv(%struct.Y* sret([[STRUCT_Y]]) align 1 [[TMP]])
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    call void @_ZN1YIiE1fEv(ptr sret([[STRUCT_Y]]) align 1 [[TMP]])
 // CHECK-EH-03-NEXT:    call void @llvm.trap()
 // CHECK-EH-03-NEXT:    unreachable
 //
 // CHECK-EH-11-LABEL: @_Z5test9v(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[TMP:%.*]] = alloca [[STRUCT_Y:%.*]], align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %struct.Y* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1YIiE1fEv(%struct.Y* sret([[STRUCT_Y]]) align 1 [[TMP]])
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1YIiE1fEv(ptr sret([[STRUCT_Y]]) align 1 [[TMP]])
 // CHECK-EH-11-NEXT:    call void @llvm.trap()
 // CHECK-EH-11-NEXT:    unreachable
 //
@@ -1119,131 +1088,128 @@ Y<int> test9() {
 
 // CHECK-LABEL: @_Z6test10b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    call void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    call void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK:       if.else:
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       cleanup:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z6test10b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont:
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-03:       lpad:
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT2:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
 // CHECK-EH-03:       if.else:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[LPAD]]
 // CHECK-EH-03:       invoke.cont1:
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       cleanup:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    ret void
 // CHECK-EH-03:       invoke.cont2:
 // CHECK-EH-03-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-03:       eh.resume:
-// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-03-NEXT:    [[LPAD_VAL3:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-03-NEXT:    resume { i8*, i32 } [[LPAD_VAL3]]
+// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-03-NEXT:    [[LPAD_VAL3:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-03-NEXT:    resume { ptr, i32 } [[LPAD_VAL3]]
 // CHECK-EH-03:       terminate.lpad:
-// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-03-NEXT:    catch i8* null
-// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 0
-// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(i8* [[TMP6]]) #[[ATTR6]]
+// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-03-NEXT:    catch ptr null
+// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { ptr, i32 } [[TMP5]], 0
+// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(ptr [[TMP6]]) #[[ATTR6]]
 // CHECK-EH-03-NEXT:    unreachable
 //
 // CHECK-EH-11-LABEL: @_Z6test10b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       if.else:
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[LPAD]]
 // CHECK-EH-11:       invoke.cont1:
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       cleanup:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL2]]
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL2]]
 //
 X test10(bool b) { // http://wg21.link/p2025r2#ex-3
   X x;
@@ -1255,131 +1221,128 @@ X test10(bool b) { // http://wg21.link/p2025r2#ex-3
 
 // CHECK-LABEL: @_Z6test11b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    call void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    call void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       cleanup:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z6test11b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont:
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-03:       lpad:
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT2:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[LPAD]]
 // CHECK-EH-03:       invoke.cont1:
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       cleanup:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    ret void
 // CHECK-EH-03:       invoke.cont2:
 // CHECK-EH-03-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-03:       eh.resume:
-// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-03-NEXT:    [[LPAD_VAL3:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-03-NEXT:    resume { i8*, i32 } [[LPAD_VAL3]]
+// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-03-NEXT:    [[LPAD_VAL3:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-03-NEXT:    resume { ptr, i32 } [[LPAD_VAL3]]
 // CHECK-EH-03:       terminate.lpad:
-// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-03-NEXT:    catch i8* null
-// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 0
-// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(i8* [[TMP6]]) #[[ATTR6]]
+// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-03-NEXT:    catch ptr null
+// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { ptr, i32 } [[TMP5]], 0
+// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(ptr [[TMP6]]) #[[ATTR6]]
 // CHECK-EH-03-NEXT:    unreachable
 //
 // CHECK-EH-11-LABEL: @_Z6test11b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[LPAD]]
 // CHECK-EH-11:       invoke.cont1:
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       cleanup:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL2]]
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL2]]
 //
 X test11(bool b) { // http://wg21.link/p2025r2#ex-5
   X x;
@@ -1390,42 +1353,41 @@ X test11(bool b) { // http://wg21.link/p2025r2#ex-5
 
 // CHECK-LABEL: @_Z6test12b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    br label [[DO_BODY:%.*]]
 // CHECK:       do.body:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    store i32 2, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i32 2, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       cleanup:
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
-// CHECK-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-NEXT:    i32 2, label [[DO_END:%.*]]
 // CHECK-NEXT:    i32 1, label [[RETURN:%.*]]
 // CHECK-NEXT:    ]
 // CHECK:       do.end:
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-NEXT:    br label [[RETURN]]
 // CHECK:       return:
 // CHECK-NEXT:    ret void
@@ -1434,42 +1396,41 @@ X test11(bool b) { // http://wg21.link/p2025r2#ex-5
 //
 // CHECK-EH-03-LABEL: @_Z6test12b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-03-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    br label [[DO_BODY:%.*]]
 // CHECK-EH-03:       do.body:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    store i32 2, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 2, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       cleanup:
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
-// CHECK-EH-03-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-EH-03-NEXT:    i32 2, label [[DO_END:%.*]]
 // CHECK-EH-03-NEXT:    i32 1, label [[RETURN:%.*]]
 // CHECK-EH-03-NEXT:    ]
 // CHECK-EH-03:       do.end:
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[RETURN]]
 // CHECK-EH-03:       return:
 // CHECK-EH-03-NEXT:    ret void
@@ -1478,42 +1439,41 @@ X test11(bool b) { // http://wg21.link/p2025r2#ex-5
 //
 // CHECK-EH-11-LABEL: @_Z6test12b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-11-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    br label [[DO_BODY:%.*]]
 // CHECK-EH-11:       do.body:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    store i32 2, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 2, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       cleanup:
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
-// CHECK-EH-11-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-EH-11-NEXT:    i32 2, label [[DO_END:%.*]]
 // CHECK-EH-11-NEXT:    i32 1, label [[RETURN:%.*]]
 // CHECK-EH-11-NEXT:    ]
 // CHECK-EH-11:       do.end:
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-11-NEXT:    br label [[RETURN]]
 // CHECK-EH-11:       return:
 // CHECK-EH-11-NEXT:    ret void
@@ -1532,27 +1492,26 @@ X test12(bool b) { // http://wg21.link/p2025r2#ex-6
 
 // CHECK-LABEL: @_Z6test13b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-NEXT:    br label [[RETURN:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
 // CHECK-NEXT:    br label [[RETURN]]
@@ -1561,27 +1520,26 @@ X test12(bool b) { // http://wg21.link/p2025r2#ex-6
 //
 // CHECK-EH-03-LABEL: @_Z6test13b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    br label [[RETURN]]
@@ -1590,27 +1548,26 @@ X test12(bool b) { // http://wg21.link/p2025r2#ex-6
 //
 // CHECK-EH-11-LABEL: @_Z6test13b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-11-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    br label [[RETURN]]
@@ -1626,160 +1583,157 @@ X test13(bool b) { // http://wg21.link/p2025r2#ex-7
 
 // CHECK-LABEL: @_Z6test14b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    call void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    call void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       cleanup:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z6test14b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont:
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-03:       lpad:
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT3:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[LPAD]]
 // CHECK-EH-03:       invoke.cont1:
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
 // CHECK-EH-03:       invoke.cont2:
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       cleanup:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    ret void
 // CHECK-EH-03:       invoke.cont3:
 // CHECK-EH-03-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-03:       eh.resume:
-// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-03-NEXT:    [[LPAD_VAL4:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-03-NEXT:    resume { i8*, i32 } [[LPAD_VAL4]]
+// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-03-NEXT:    [[LPAD_VAL4:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-03-NEXT:    resume { ptr, i32 } [[LPAD_VAL4]]
 // CHECK-EH-03:       terminate.lpad:
-// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-03-NEXT:    catch i8* null
-// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 0
-// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(i8* [[TMP6]]) #[[ATTR6]]
+// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-03-NEXT:    catch ptr null
+// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { ptr, i32 } [[TMP5]], 0
+// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(ptr [[TMP6]]) #[[ATTR6]]
 // CHECK-EH-03-NEXT:    unreachable
 //
 // CHECK-EH-11-LABEL: @_Z6test14b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[LPAD]]
 // CHECK-EH-11:       invoke.cont1:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       cleanup:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL2]]
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL2]]
 //
 X test14(bool b) { // http://wg21.link/p2025r2#ex-8
   X x;
@@ -1791,160 +1745,157 @@ X test14(bool b) { // http://wg21.link/p2025r2#ex-8
 
 // CHECK-LABEL: @_Z6test15b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    call void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    call void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       cleanup:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z6test15b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont:
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-03:       lpad:
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT3:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[LPAD]]
 // CHECK-EH-03:       invoke.cont1:
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD]]
 // CHECK-EH-03:       invoke.cont2:
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       cleanup:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    ret void
 // CHECK-EH-03:       invoke.cont3:
 // CHECK-EH-03-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-03:       eh.resume:
-// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-03-NEXT:    [[LPAD_VAL4:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-03-NEXT:    resume { i8*, i32 } [[LPAD_VAL4]]
+// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-03-NEXT:    [[LPAD_VAL4:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-03-NEXT:    resume { ptr, i32 } [[LPAD_VAL4]]
 // CHECK-EH-03:       terminate.lpad:
-// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-03-NEXT:    catch i8* null
-// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 0
-// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(i8* [[TMP6]]) #[[ATTR6]]
+// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-03-NEXT:    catch ptr null
+// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { ptr, i32 } [[TMP5]], 0
+// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(ptr [[TMP6]]) #[[ATTR6]]
 // CHECK-EH-03-NEXT:    unreachable
 //
 // CHECK-EH-11-LABEL: @_Z6test15b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[LPAD]]
 // CHECK-EH-11:       invoke.cont1:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       cleanup:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL2]]
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL2]]
 //
 X test15(bool b) { // http://wg21.link/p2025r2#ex-15
   X x;
@@ -1960,46 +1911,46 @@ X test15(bool b) { // http://wg21.link/p2025r2#ex-15
 // CHECK-EH-11-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-EH-11-NEXT:    [[AGG_TMP:%.*]] = alloca [[CLASS_X]], align 1
 // CHECK-EH-11-NEXT:    [[REF_TMP:%.*]] = alloca [[CLASS_ANON:%.*]], align 4
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON]], %class.anon* [[REF_TMP]], i32 0, i32 0
-// CHECK-EH-11-NEXT:    store %class.X* [[X]], %class.X** [[TMP0]], align 4
-// CHECK-EH-11-NEXT:    invoke void @"_ZZ6test16vENK3$_0clEv"(%class.X* sret([[CLASS_X]]) align 1 [[AGG_TMP]], %class.anon* noundef nonnull align 4 dereferenceable(4) [[REF_TMP]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = getelementptr inbounds [[CLASS_ANON]], ptr [[REF_TMP]], i32 0, i32 0
+// CHECK-EH-11-NEXT:    store ptr [[X]], ptr [[TMP0]], align 4
+// CHECK-EH-11-NEXT:    invoke void @"_ZZ6test16vENK3$_0clEv"(ptr sret([[CLASS_X]]) align 1 [[AGG_TMP]], ptr noundef nonnull align 4 dereferenceable(4) [[REF_TMP]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
-// CHECK-EH-11-NEXT:    invoke void @_Z8ConsumeX1X(%class.X* noundef [[AGG_TMP]])
+// CHECK-EH-11-NEXT:    invoke void @_Z8ConsumeX1X(ptr noundef [[AGG_TMP]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT2:%.*]] unwind label [[LPAD1:%.*]]
 // CHECK-EH-11:       invoke.cont2:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_TMP]]) #[[ATTR6]]
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_TMP]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP2]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP3]], i32* [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP2]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP3]], ptr [[EHSELECTOR_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[EHCLEANUP:%.*]]
 // CHECK-EH-11:       lpad1:
-// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP5:%.*]] = extractvalue { i8*, i32 } [[TMP4]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP5]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP4]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP6]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_TMP]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP4]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP5]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP6:%.*]] = extractvalue { ptr, i32 } [[TMP4]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP6]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_TMP]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EHCLEANUP]]
 // CHECK-EH-11:       ehcleanup:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL3:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL3]]
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL3:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL3]]
 //
 void test16() { // http://wg21.link/p2025r2#ex-9
   X x;
@@ -2012,84 +1963,83 @@ void test16() { // http://wg21.link/p2025r2#ex-9
 
 // CHECK-LABEL: @_Z6test17i(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[I_ADDR:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-NEXT:    store i32 [[I:%.*]], i32* [[I_ADDR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store i32 [[I:%.*]], ptr [[I_ADDR]], align 4
 // CHECK-NEXT:    br i1 false, label [[IF_THEN:%.*]], label [[IF_END2:%.*]]
 // CHECK:       if.then:
 // CHECK-NEXT:    br label [[IMPOSSIBLE:%.*]]
 // CHECK:       impossible:
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP1]], 3
 // CHECK-NEXT:    br i1 [[CMP]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then1:
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-NEXT:    br label [[RETURN:%.*]]
 // CHECK:       if.end:
 // CHECK-NEXT:    br label [[IF_END2]]
 // CHECK:       if.end2:
 // CHECK-NEXT:    br label [[WHILE_BODY:%.*]]
 // CHECK:       while.body:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-NEXT:    [[CMP3:%.*]] = icmp eq i32 [[TMP2]], 0
 // CHECK-NEXT:    br i1 [[CMP3]], label [[IF_THEN4:%.*]], label [[IF_END5:%.*]]
 // CHECK:       if.then4:
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK:       if.end5:
-// CHECK-NEXT:    [[TMP3:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-NEXT:    [[TMP3:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-NEXT:    [[CMP6:%.*]] = icmp eq i32 [[TMP3]], 1
 // CHECK-NEXT:    br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_END8:%.*]]
 // CHECK:       if.then7:
-// CHECK-NEXT:    store i32 4, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i32 4, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       if.end8:
-// CHECK-NEXT:    [[TMP4:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-NEXT:    [[CMP9:%.*]] = icmp eq i32 [[TMP4]], 2
 // CHECK-NEXT:    br i1 [[CMP9]], label [[IF_THEN10:%.*]], label [[IF_END11:%.*]]
 // CHECK:       if.then10:
-// CHECK-NEXT:    store i32 3, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i32 3, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]], !llvm.loop [[LOOP3:![0-9]+]]
 // CHECK:       if.end11:
-// CHECK-NEXT:    [[TMP5:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-NEXT:    [[CMP12:%.*]] = icmp eq i32 [[TMP5]], 3
 // CHECK-NEXT:    br i1 [[CMP12]], label [[IF_THEN13:%.*]], label [[IF_END14:%.*]]
 // CHECK:       if.then13:
-// CHECK-NEXT:    store i32 2, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i32 2, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       if.end14:
-// CHECK-NEXT:    [[TMP6:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-NEXT:    [[TMP6:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-NEXT:    [[CMP15:%.*]] = icmp eq i32 [[TMP6]], 4
 // CHECK-NEXT:    br i1 [[CMP15]], label [[IF_THEN16:%.*]], label [[IF_END17:%.*]]
 // CHECK:       if.then16:
 // CHECK-NEXT:    call void @exit(i32 noundef 1) #[[ATTR4]]
 // CHECK-NEXT:    br label [[IF_END17]]
 // CHECK:       if.end17:
-// CHECK-NEXT:    [[TMP7:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-NEXT:    [[TMP7:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-NEXT:    [[CMP18:%.*]] = icmp eq i32 [[TMP7]], 5
 // CHECK-NEXT:    br i1 [[CMP18]], label [[IF_THEN19:%.*]], label [[IF_END20:%.*]]
 // CHECK:       if.then19:
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       if.end20:
-// CHECK-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       cleanup:
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
-// CHECK-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-NEXT:    i32 0, label [[CLEANUP_CONT:%.*]]
 // CHECK-NEXT:    i32 1, label [[RETURN]]
@@ -2100,7 +2050,7 @@ void test16() { // http://wg21.link/p2025r2#ex-9
 // CHECK:       cleanup.cont:
 // CHECK-NEXT:    br label [[WHILE_BODY]], !llvm.loop [[LOOP3]]
 // CHECK:       while.end:
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-NEXT:    br label [[RETURN]]
 // CHECK:       return:
 // CHECK-NEXT:    ret void
@@ -2109,84 +2059,83 @@ void test16() { // http://wg21.link/p2025r2#ex-9
 //
 // CHECK-EH-03-LABEL: @_Z6test17i(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[I_ADDR:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-03-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-03-NEXT:    store i32 [[I:%.*]], i32* [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store i32 [[I:%.*]], ptr [[I_ADDR]], align 4
 // CHECK-EH-03-NEXT:    br i1 false, label [[IF_THEN:%.*]], label [[IF_END2:%.*]]
 // CHECK-EH-03:       if.then:
 // CHECK-EH-03-NEXT:    br label [[IMPOSSIBLE:%.*]]
 // CHECK-EH-03:       impossible:
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-03-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP1]], 3
 // CHECK-EH-03-NEXT:    br i1 [[CMP]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then1:
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-03:       if.end:
 // CHECK-EH-03-NEXT:    br label [[IF_END2]]
 // CHECK-EH-03:       if.end2:
 // CHECK-EH-03-NEXT:    br label [[WHILE_BODY:%.*]]
 // CHECK-EH-03:       while.body:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-03-NEXT:    [[CMP3:%.*]] = icmp eq i32 [[TMP2]], 0
 // CHECK-EH-03-NEXT:    br i1 [[CMP3]], label [[IF_THEN4:%.*]], label [[IF_END5:%.*]]
 // CHECK-EH-03:       if.then4:
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-03:       if.end5:
-// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-03-NEXT:    [[CMP6:%.*]] = icmp eq i32 [[TMP3]], 1
 // CHECK-EH-03-NEXT:    br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_END8:%.*]]
 // CHECK-EH-03:       if.then7:
-// CHECK-EH-03-NEXT:    store i32 4, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 4, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       if.end8:
-// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-03-NEXT:    [[CMP9:%.*]] = icmp eq i32 [[TMP4]], 2
 // CHECK-EH-03-NEXT:    br i1 [[CMP9]], label [[IF_THEN10:%.*]], label [[IF_END11:%.*]]
 // CHECK-EH-03:       if.then10:
-// CHECK-EH-03-NEXT:    store i32 3, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 3, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       if.end11:
-// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-03-NEXT:    [[CMP12:%.*]] = icmp eq i32 [[TMP5]], 3
 // CHECK-EH-03-NEXT:    br i1 [[CMP12]], label [[IF_THEN13:%.*]], label [[IF_END14:%.*]]
 // CHECK-EH-03:       if.then13:
-// CHECK-EH-03-NEXT:    store i32 2, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 2, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       if.end14:
-// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-03-NEXT:    [[CMP15:%.*]] = icmp eq i32 [[TMP6]], 4
 // CHECK-EH-03-NEXT:    br i1 [[CMP15]], label [[IF_THEN16:%.*]], label [[IF_END17:%.*]]
 // CHECK-EH-03:       if.then16:
 // CHECK-EH-03-NEXT:    call void @exit(i32 noundef 1) #[[ATTR7]]
 // CHECK-EH-03-NEXT:    br label [[IF_END17]]
 // CHECK-EH-03:       if.end17:
-// CHECK-EH-03-NEXT:    [[TMP7:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    [[TMP7:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-03-NEXT:    [[CMP18:%.*]] = icmp eq i32 [[TMP7]], 5
 // CHECK-EH-03-NEXT:    br i1 [[CMP18]], label [[IF_THEN19:%.*]], label [[IF_END20:%.*]]
 // CHECK-EH-03:       if.then19:
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       if.end20:
-// CHECK-EH-03-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       cleanup:
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
-// CHECK-EH-03-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-EH-03-NEXT:    i32 0, label [[CLEANUP_CONT:%.*]]
 // CHECK-EH-03-NEXT:    i32 1, label [[RETURN]]
@@ -2197,7 +2146,7 @@ void test16() { // http://wg21.link/p2025r2#ex-9
 // CHECK-EH-03:       cleanup.cont:
 // CHECK-EH-03-NEXT:    br label [[WHILE_BODY]]
 // CHECK-EH-03:       while.end:
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[RETURN]]
 // CHECK-EH-03:       return:
 // CHECK-EH-03-NEXT:    ret void
@@ -2206,84 +2155,83 @@ void test16() { // http://wg21.link/p2025r2#ex-9
 //
 // CHECK-EH-11-LABEL: @_Z6test17i(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[I_ADDR:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-11-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-11-NEXT:    store i32 [[I:%.*]], i32* [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store i32 [[I:%.*]], ptr [[I_ADDR]], align 4
 // CHECK-EH-11-NEXT:    br i1 false, label [[IF_THEN:%.*]], label [[IF_END2:%.*]]
 // CHECK-EH-11:       if.then:
 // CHECK-EH-11-NEXT:    br label [[IMPOSSIBLE:%.*]]
 // CHECK-EH-11:       impossible:
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-11-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP1]], 3
 // CHECK-EH-11-NEXT:    br i1 [[CMP]], label [[IF_THEN1:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then1:
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-11-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-11:       if.end:
 // CHECK-EH-11-NEXT:    br label [[IF_END2]]
 // CHECK-EH-11:       if.end2:
 // CHECK-EH-11-NEXT:    br label [[WHILE_BODY:%.*]]
 // CHECK-EH-11:       while.body:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-11-NEXT:    [[CMP3:%.*]] = icmp eq i32 [[TMP2]], 0
 // CHECK-EH-11-NEXT:    br i1 [[CMP3]], label [[IF_THEN4:%.*]], label [[IF_END5:%.*]]
 // CHECK-EH-11:       if.then4:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-11:       if.end5:
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-11-NEXT:    [[CMP6:%.*]] = icmp eq i32 [[TMP3]], 1
 // CHECK-EH-11-NEXT:    br i1 [[CMP6]], label [[IF_THEN7:%.*]], label [[IF_END8:%.*]]
 // CHECK-EH-11:       if.then7:
-// CHECK-EH-11-NEXT:    store i32 4, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 4, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       if.end8:
-// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-11-NEXT:    [[CMP9:%.*]] = icmp eq i32 [[TMP4]], 2
 // CHECK-EH-11-NEXT:    br i1 [[CMP9]], label [[IF_THEN10:%.*]], label [[IF_END11:%.*]]
 // CHECK-EH-11:       if.then10:
-// CHECK-EH-11-NEXT:    store i32 3, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 3, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]], !llvm.loop [[LOOP3:![0-9]+]]
 // CHECK-EH-11:       if.end11:
-// CHECK-EH-11-NEXT:    [[TMP5:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    [[TMP5:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-11-NEXT:    [[CMP12:%.*]] = icmp eq i32 [[TMP5]], 3
 // CHECK-EH-11-NEXT:    br i1 [[CMP12]], label [[IF_THEN13:%.*]], label [[IF_END14:%.*]]
 // CHECK-EH-11:       if.then13:
-// CHECK-EH-11-NEXT:    store i32 2, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 2, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       if.end14:
-// CHECK-EH-11-NEXT:    [[TMP6:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    [[TMP6:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-11-NEXT:    [[CMP15:%.*]] = icmp eq i32 [[TMP6]], 4
 // CHECK-EH-11-NEXT:    br i1 [[CMP15]], label [[IF_THEN16:%.*]], label [[IF_END17:%.*]]
 // CHECK-EH-11:       if.then16:
 // CHECK-EH-11-NEXT:    call void @exit(i32 noundef 1) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[IF_END17]]
 // CHECK-EH-11:       if.end17:
-// CHECK-EH-11-NEXT:    [[TMP7:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    [[TMP7:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-11-NEXT:    [[CMP18:%.*]] = icmp eq i32 [[TMP7]], 5
 // CHECK-EH-11-NEXT:    br i1 [[CMP18]], label [[IF_THEN19:%.*]], label [[IF_END20:%.*]]
 // CHECK-EH-11:       if.then19:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       if.end20:
-// CHECK-EH-11-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       cleanup:
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
-// CHECK-EH-11-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-EH-11-NEXT:    i32 0, label [[CLEANUP_CONT:%.*]]
 // CHECK-EH-11-NEXT:    i32 1, label [[RETURN]]
@@ -2294,7 +2242,7 @@ void test16() { // http://wg21.link/p2025r2#ex-9
 // CHECK-EH-11:       cleanup.cont:
 // CHECK-EH-11-NEXT:    br label [[WHILE_BODY]], !llvm.loop [[LOOP3]]
 // CHECK-EH-11:       while.end:
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-11-NEXT:    br label [[RETURN]]
 // CHECK-EH-11:       return:
 // CHECK-EH-11-NEXT:    ret void
@@ -2328,73 +2276,72 @@ X test17(int i) { // http://wg21.link/p2025r2#ex-10
 
 // CHECK-LABEL: @_Z6test18i(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[I_ADDR:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
 // CHECK-NEXT:    [[NRVO1:%.*]] = alloca i1, align 1
 // CHECK-NEXT:    [[NRVO11:%.*]] = alloca i1, align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-NEXT:    store i32 [[I:%.*]], i32* [[I_ADDR]], align 4
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    [[TMP1:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store i32 [[I:%.*]], ptr [[I_ADDR]], align 4
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    [[TMP1:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP1]], 0
 // CHECK-NEXT:    br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP]]
 // CHECK:       cleanup:
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
-// CHECK-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-NEXT:    i32 0, label [[CLEANUP_CONT:%.*]]
 // CHECK-NEXT:    i32 1, label [[RETURN:%.*]]
 // CHECK-NEXT:    ]
 // CHECK:       cleanup.cont:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO1]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    [[TMP2:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-NEXT:    store i1 false, ptr [[NRVO1]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    [[TMP2:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-NEXT:    [[CMP2:%.*]] = icmp eq i32 [[TMP2]], 1
 // CHECK-NEXT:    br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END4:%.*]]
 // CHECK:       if.then3:
-// CHECK-NEXT:    store i1 true, i1* [[NRVO1]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i1 true, ptr [[NRVO1]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP5:%.*]]
 // CHECK:       if.end4:
-// CHECK-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    br label [[CLEANUP5]]
 // CHECK:       cleanup5:
-// CHECK-NEXT:    [[NRVO_VAL6:%.*]] = load i1, i1* [[NRVO1]], align 1
+// CHECK-NEXT:    [[NRVO_VAL6:%.*]] = load i1, ptr [[NRVO1]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL6]], label [[NRVO_SKIPDTOR8:%.*]], label [[NRVO_UNUSED7:%.*]]
 // CHECK:       nrvo.unused7:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR8]]
 // CHECK:       nrvo.skipdtor8:
-// CHECK-NEXT:    [[CLEANUP_DEST9:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    [[CLEANUP_DEST9:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-NEXT:    switch i32 [[CLEANUP_DEST9]], label [[UNREACHABLE]] [
 // CHECK-NEXT:    i32 0, label [[CLEANUP_CONT10:%.*]]
 // CHECK-NEXT:    i32 1, label [[RETURN]]
 // CHECK-NEXT:    ]
 // CHECK:       cleanup.cont10:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO11]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO11]], align 1
-// CHECK-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
-// CHECK-NEXT:    [[NRVO_VAL13:%.*]] = load i1, i1* [[NRVO11]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO11]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO11]], align 1
+// CHECK-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-NEXT:    [[NRVO_VAL13:%.*]] = load i1, ptr [[NRVO11]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL13]], label [[NRVO_SKIPDTOR15:%.*]], label [[NRVO_UNUSED14:%.*]]
 // CHECK:       nrvo.unused14:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR15]]
 // CHECK:       nrvo.skipdtor15:
 // CHECK-NEXT:    br label [[RETURN]]
@@ -2405,73 +2352,72 @@ X test17(int i) { // http://wg21.link/p2025r2#ex-10
 //
 // CHECK-EH-03-LABEL: @_Z6test18i(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[I_ADDR:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-03-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-03-NEXT:    [[NRVO1:%.*]] = alloca i1, align 1
 // CHECK-EH-03-NEXT:    [[NRVO11:%.*]] = alloca i1, align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-03-NEXT:    store i32 [[I:%.*]], i32* [[I_ADDR]], align 4
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store i32 [[I:%.*]], ptr [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-03-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP1]], 0
 // CHECK-EH-03-NEXT:    br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-03:       cleanup:
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
-// CHECK-EH-03-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-EH-03-NEXT:    i32 0, label [[CLEANUP_CONT:%.*]]
 // CHECK-EH-03-NEXT:    i32 1, label [[RETURN:%.*]]
 // CHECK-EH-03-NEXT:    ]
 // CHECK-EH-03:       cleanup.cont:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO1]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO1]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-03-NEXT:    [[CMP2:%.*]] = icmp eq i32 [[TMP2]], 1
 // CHECK-EH-03-NEXT:    br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END4:%.*]]
 // CHECK-EH-03:       if.then3:
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO1]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO1]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP5:%.*]]
 // CHECK-EH-03:       if.end4:
-// CHECK-EH-03-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    br label [[CLEANUP5]]
 // CHECK-EH-03:       cleanup5:
-// CHECK-EH-03-NEXT:    [[NRVO_VAL6:%.*]] = load i1, i1* [[NRVO1]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL6:%.*]] = load i1, ptr [[NRVO1]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL6]], label [[NRVO_SKIPDTOR8:%.*]], label [[NRVO_UNUSED7:%.*]]
 // CHECK-EH-03:       nrvo.unused7:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR8]]
 // CHECK-EH-03:       nrvo.skipdtor8:
-// CHECK-EH-03-NEXT:    [[CLEANUP_DEST9:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[CLEANUP_DEST9:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-03-NEXT:    switch i32 [[CLEANUP_DEST9]], label [[UNREACHABLE]] [
 // CHECK-EH-03-NEXT:    i32 0, label [[CLEANUP_CONT10:%.*]]
 // CHECK-EH-03-NEXT:    i32 1, label [[RETURN]]
 // CHECK-EH-03-NEXT:    ]
 // CHECK-EH-03:       cleanup.cont10:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO11]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO11]], align 1
-// CHECK-EH-03-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[NRVO_VAL13:%.*]] = load i1, i1* [[NRVO11]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO11]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO11]], align 1
+// CHECK-EH-03-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[NRVO_VAL13:%.*]] = load i1, ptr [[NRVO11]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL13]], label [[NRVO_SKIPDTOR15:%.*]], label [[NRVO_UNUSED14:%.*]]
 // CHECK-EH-03:       nrvo.unused14:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR15]]
 // CHECK-EH-03:       nrvo.skipdtor15:
 // CHECK-EH-03-NEXT:    br label [[RETURN]]
@@ -2482,73 +2428,72 @@ X test17(int i) { // http://wg21.link/p2025r2#ex-10
 //
 // CHECK-EH-11-LABEL: @_Z6test18i(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[I_ADDR:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-11-NEXT:    [[CLEANUP_DEST_SLOT:%.*]] = alloca i32, align 4
 // CHECK-EH-11-NEXT:    [[NRVO1:%.*]] = alloca i1, align 1
 // CHECK-EH-11-NEXT:    [[NRVO11:%.*]] = alloca i1, align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-11-NEXT:    store i32 [[I:%.*]], i32* [[I_ADDR]], align 4
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store i32 [[I:%.*]], ptr [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-11-NEXT:    [[CMP:%.*]] = icmp eq i32 [[TMP1]], 0
 // CHECK-EH-11-NEXT:    br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP]]
 // CHECK-EH-11:       cleanup:
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
-// CHECK-EH-11-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[CLEANUP_DEST:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    switch i32 [[CLEANUP_DEST]], label [[UNREACHABLE:%.*]] [
 // CHECK-EH-11-NEXT:    i32 0, label [[CLEANUP_CONT:%.*]]
 // CHECK-EH-11-NEXT:    i32 1, label [[RETURN:%.*]]
 // CHECK-EH-11-NEXT:    ]
 // CHECK-EH-11:       cleanup.cont:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO1]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = load i32, i32* [[I_ADDR]], align 4
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO1]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = load i32, ptr [[I_ADDR]], align 4
 // CHECK-EH-11-NEXT:    [[CMP2:%.*]] = icmp eq i32 [[TMP2]], 1
 // CHECK-EH-11-NEXT:    br i1 [[CMP2]], label [[IF_THEN3:%.*]], label [[IF_END4:%.*]]
 // CHECK-EH-11:       if.then3:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO1]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO1]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP5:%.*]]
 // CHECK-EH-11:       if.end4:
-// CHECK-EH-11-NEXT:    store i32 0, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    store i32 0, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    br label [[CLEANUP5]]
 // CHECK-EH-11:       cleanup5:
-// CHECK-EH-11-NEXT:    [[NRVO_VAL6:%.*]] = load i1, i1* [[NRVO1]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL6:%.*]] = load i1, ptr [[NRVO1]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL6]], label [[NRVO_SKIPDTOR8:%.*]], label [[NRVO_UNUSED7:%.*]]
 // CHECK-EH-11:       nrvo.unused7:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR8]]
 // CHECK-EH-11:       nrvo.skipdtor8:
-// CHECK-EH-11-NEXT:    [[CLEANUP_DEST9:%.*]] = load i32, i32* [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[CLEANUP_DEST9:%.*]] = load i32, ptr [[CLEANUP_DEST_SLOT]], align 4
 // CHECK-EH-11-NEXT:    switch i32 [[CLEANUP_DEST9]], label [[UNREACHABLE]] [
 // CHECK-EH-11-NEXT:    i32 0, label [[CLEANUP_CONT10:%.*]]
 // CHECK-EH-11-NEXT:    i32 1, label [[RETURN]]
 // CHECK-EH-11-NEXT:    ]
 // CHECK-EH-11:       cleanup.cont10:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO11]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO11]], align 1
-// CHECK-EH-11-NEXT:    store i32 1, i32* [[CLEANUP_DEST_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[NRVO_VAL13:%.*]] = load i1, i1* [[NRVO11]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO11]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO11]], align 1
+// CHECK-EH-11-NEXT:    store i32 1, ptr [[CLEANUP_DEST_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[NRVO_VAL13:%.*]] = load i1, ptr [[NRVO11]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL13]], label [[NRVO_SKIPDTOR15:%.*]], label [[NRVO_UNUSED14:%.*]]
 // CHECK-EH-11:       nrvo.unused14:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR15]]
 // CHECK-EH-11:       nrvo.skipdtor15:
 // CHECK-EH-11-NEXT:    br label [[RETURN]]
@@ -2575,45 +2520,44 @@ X test18(int i) { // http://wg21.link/p2025r2#ex-11
 #ifdef CXX11
 // CHECK-EH-11-LABEL: @_Z6test19v(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-11-NEXT:    [[L:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-EH-11-NEXT:    [[REF_TMP:%.*]] = alloca [[CLASS_ANON_0:%.*]], align 4
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], %class.anon.0* [[REF_TMP]], i32 0, i32 0
-// CHECK-EH-11-NEXT:    store %class.X* [[AGG_RESULT]], %class.X** [[TMP1]], align 4
-// CHECK-EH-11-NEXT:    invoke void @"_ZZ6test19vENK3$_1clEv"(%class.X* sret([[CLASS_X]]) align 1 [[L]], %class.anon.0* noundef nonnull align 4 dereferenceable(4) [[REF_TMP]])
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = getelementptr inbounds [[CLASS_ANON_0]], ptr [[REF_TMP]], i32 0, i32 0
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT]], ptr [[TMP1]], align 4
+// CHECK-EH-11-NEXT:    invoke void @"_ZZ6test19vENK3$_1clEv"(ptr sret([[CLASS_X]]) align 1 [[L]], ptr noundef nonnull align 4 dereferenceable(4) [[REF_TMP]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[L]]) #[[ATTR6]]
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[L]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL1:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL1]]
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL1:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL1]]
 //
 X test19() { // http://wg21.link/p2025r2#ex-12
   X x;
@@ -2641,10 +2585,10 @@ X test20() { // http://wg21.link/p2025r2#ex-18
 // CHECK-EH-11-NEXT:  entry:
 // CHECK-EH-11-NEXT:    [[AGG_TMP_ENSURED:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-EH-11-NEXT:    [[AGG_TMP_ENSURED1:%.*]] = alloca [[CLASS_X]], align 1
-// CHECK-EH-11-NEXT:    call void @_Z6test20ILb1EE1Xv(%class.X* sret([[CLASS_X]]) align 1 [[AGG_TMP_ENSURED]])
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED]]) #[[ATTR6]]
-// CHECK-EH-11-NEXT:    call void @_Z6test20ILb0EE1Xv(%class.X* sret([[CLASS_X]]) align 1 [[AGG_TMP_ENSURED1]])
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED1]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_Z6test20ILb1EE1Xv(ptr sret([[CLASS_X]]) align 1 [[AGG_TMP_ENSURED]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_Z6test20ILb0EE1Xv(ptr sret([[CLASS_X]]) align 1 [[AGG_TMP_ENSURED1]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED1]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    ret void
 //
 void test20instantiate() {
@@ -2655,51 +2599,48 @@ void test20instantiate() {
 
 // CHECK-LABEL: @_Z6test21v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z6test21v(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    ret void
 //
 // CHECK-EH-11-LABEL: @_Z6test21v(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    ret void
@@ -2711,82 +2652,79 @@ const volatile X test21() { // http://wg21.link/p2025r2#ex-19
 
 // CHECK-LABEL: @_Z6test22v(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    call void @_ZN1XC1ERVKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    call void @_ZN1XC1ERVKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR4]]
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z6test22v(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERVKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERVKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    ret void
 // CHECK-EH-03:       lpad:
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP2]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP3]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP2]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP3]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont1:
 // CHECK-EH-03-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-03:       eh.resume:
-// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-03-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-03-NEXT:    resume { i8*, i32 } [[LPAD_VAL2]]
+// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-03-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-03-NEXT:    resume { ptr, i32 } [[LPAD_VAL2]]
 // CHECK-EH-03:       terminate.lpad:
-// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-03-NEXT:    catch i8* null
-// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = extractvalue { i8*, i32 } [[TMP4]], 0
-// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(i8* [[TMP5]]) #[[ATTR6]]
+// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-03-NEXT:    catch ptr null
+// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = extractvalue { ptr, i32 } [[TMP4]], 0
+// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(ptr [[TMP5]]) #[[ATTR6]]
 // CHECK-EH-03-NEXT:    unreachable
 //
 // CHECK-EH-11-LABEL: @_Z6test22v(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[X:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERVKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERVKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[X]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP2]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP1]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP3]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP2]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP1]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP3]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[X]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL1:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL1]]
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL1:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL1]]
 //
 X test22() { // http://wg21.link/p2025r2#ex-19
   volatile X x;
@@ -2795,145 +2733,142 @@ X test22() { // http://wg21.link/p2025r2#ex-19
 
 // CHECK-LABEL: @_Z6test23b(
 // CHECK-NEXT:  entry:
-// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-NEXT:    [[Y:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK:       if.then:
-// CHECK-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK:       nrvo.unused:
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK:       nrvo.skipdtor:
 // CHECK-NEXT:    br label [[RETURN:%.*]]
 // CHECK:       if.end:
-// CHECK-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
-// CHECK-NEXT:    call void @_ZN1XC1ERVKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
-// CHECK-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR4]]
+// CHECK-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-NEXT:    call void @_ZN1XC1ERVKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR4]]
 // CHECK-NEXT:    br label [[RETURN]]
 // CHECK:       return:
 // CHECK-NEXT:    ret void
 //
 // CHECK-EH-03-LABEL: @_Z6test23b(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-03-NEXT:    [[Y:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-03-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-03-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-03-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-03-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-03:       if.then:
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-03:       if.end:
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERVKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XC1ERVKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
 // CHECK-EH-03-NEXT:    br label [[RETURN]]
 // CHECK-EH-03:       lpad:
-// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-03-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-03-NEXT:    cleanup
-// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-03-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-03-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-03-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-03-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-03-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    invoke void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
 // CHECK-EH-03-NEXT:    to label [[INVOKE_CONT1:%.*]] unwind label [[TERMINATE_LPAD:%.*]]
 // CHECK-EH-03:       invoke.cont1:
 // CHECK-EH-03-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-03:       return:
 // CHECK-EH-03-NEXT:    ret void
 // CHECK-EH-03:       eh.resume:
-// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-03-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-03-NEXT:    resume { i8*, i32 } [[LPAD_VAL2]]
+// CHECK-EH-03-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-03-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-03-NEXT:    [[LPAD_VAL2:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-03-NEXT:    resume { ptr, i32 } [[LPAD_VAL2]]
 // CHECK-EH-03:       terminate.lpad:
-// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { i8*, i32 }
-// CHECK-EH-03-NEXT:    catch i8* null
-// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { i8*, i32 } [[TMP5]], 0
-// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(i8* [[TMP6]]) #[[ATTR6]]
+// CHECK-EH-03-NEXT:    [[TMP5:%.*]] = landingpad { ptr, i32 }
+// CHECK-EH-03-NEXT:    catch ptr null
+// CHECK-EH-03-NEXT:    [[TMP6:%.*]] = extractvalue { ptr, i32 } [[TMP5]], 0
+// CHECK-EH-03-NEXT:    call void @__clang_call_terminate(ptr [[TMP6]]) #[[ATTR6]]
 // CHECK-EH-03-NEXT:    unreachable
 //
 // CHECK-EH-11-LABEL: @_Z6test23b(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[B_ADDR:%.*]] = alloca i8, align 1
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
 // CHECK-EH-11-NEXT:    [[Y:%.*]] = alloca [[CLASS_X:%.*]], align 1
-// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[EXN_SLOT:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[EHSELECTOR_SLOT:%.*]] = alloca i32, align 4
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
 // CHECK-EH-11-NEXT:    [[FROMBOOL:%.*]] = zext i1 [[B:%.*]] to i8
-// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], i8* [[B_ADDR]], align 1
-// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, i8* [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    store i8 [[FROMBOOL]], ptr [[B_ADDR]], align 1
+// CHECK-EH-11-NEXT:    [[TMP1:%.*]] = load i8, ptr [[B_ADDR]], align 1
 // CHECK-EH-11-NEXT:    [[TOBOOL:%.*]] = trunc i8 [[TMP1]] to i1
 // CHECK-EH-11-NEXT:    br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
 // CHECK-EH-11:       if.then:
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    br label [[RETURN:%.*]]
 // CHECK-EH-11:       if.end:
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
-// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERVKS_(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], %class.X* noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
+// CHECK-EH-11-NEXT:    invoke void @_ZN1XC1ERVKS_(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]], ptr noundef nonnull align 1 dereferenceable(1) [[Y]])
 // CHECK-EH-11-NEXT:    to label [[INVOKE_CONT:%.*]] unwind label [[LPAD:%.*]]
 // CHECK-EH-11:       invoke.cont:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[RETURN]]
 // CHECK-EH-11:       lpad:
-// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { i8*, i32 }
+// CHECK-EH-11-NEXT:    [[TMP2:%.*]] = landingpad { ptr, i32 }
 // CHECK-EH-11-NEXT:    cleanup
-// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 0
-// CHECK-EH-11-NEXT:    store i8* [[TMP3]], i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { i8*, i32 } [[TMP2]], 1
-// CHECK-EH-11-NEXT:    store i32 [[TMP4]], i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    [[TMP3:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 0
+// CHECK-EH-11-NEXT:    store ptr [[TMP3]], ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[TMP4:%.*]] = extractvalue { ptr, i32 } [[TMP2]], 1
+// CHECK-EH-11-NEXT:    store i32 [[TMP4]], ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[Y]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[EH_RESUME:%.*]]
 // CHECK-EH-11:       return:
 // CHECK-EH-11-NEXT:    ret void
 // CHECK-EH-11:       eh.resume:
-// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load i8*, i8** [[EXN_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, i32* [[EHSELECTOR_SLOT]], align 4
-// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-EH-11-NEXT:    [[LPAD_VAL1:%.*]] = insertvalue { i8*, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
-// CHECK-EH-11-NEXT:    resume { i8*, i32 } [[LPAD_VAL1]]
+// CHECK-EH-11-NEXT:    [[EXN:%.*]] = load ptr, ptr [[EXN_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[SEL:%.*]] = load i32, ptr [[EHSELECTOR_SLOT]], align 4
+// CHECK-EH-11-NEXT:    [[LPAD_VAL:%.*]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-EH-11-NEXT:    [[LPAD_VAL1:%.*]] = insertvalue { ptr, i32 } [[LPAD_VAL]], i32 [[SEL]], 1
+// CHECK-EH-11-NEXT:    resume { ptr, i32 } [[LPAD_VAL1]]
 //
 X test23(bool b) { // http://wg21.link/p2025r2#ex-19
   if (b) {
@@ -2947,34 +2882,32 @@ X test23(bool b) { // http://wg21.link/p2025r2#ex-19
 #ifdef __EXCEPTIONS
 // CHECK-EH-03-LABEL: @_Z6test24v(
 // CHECK-EH-03-NEXT:  entry:
-// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-03-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-03-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-03-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-03-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-03-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-03-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-03-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-03-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-03-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-03:       nrvo.unused:
-// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-03-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
 // CHECK-EH-03-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-03:       nrvo.skipdtor:
 // CHECK-EH-03-NEXT:    ret void
 //
 // CHECK-EH-11-LABEL: @_Z6test24v(
 // CHECK-EH-11-NEXT:  entry:
-// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca i8*, align 4
+// CHECK-EH-11-NEXT:    [[RESULT_PTR:%.*]] = alloca ptr, align 4
 // CHECK-EH-11-NEXT:    [[NRVO:%.*]] = alloca i1, align 1
-// CHECK-EH-11-NEXT:    [[TMP0:%.*]] = bitcast %class.X* [[AGG_RESULT:%.*]] to i8*
-// CHECK-EH-11-NEXT:    store i8* [[TMP0]], i8** [[RESULT_PTR]], align 4
-// CHECK-EH-11-NEXT:    store i1 false, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
-// CHECK-EH-11-NEXT:    store i1 true, i1* [[NRVO]], align 1
-// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, i1* [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    store ptr [[AGG_RESULT:%.*]], ptr [[RESULT_PTR]], align 4
+// CHECK-EH-11-NEXT:    store i1 false, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    call void @_ZN1XC1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]])
+// CHECK-EH-11-NEXT:    store i1 true, ptr [[NRVO]], align 1
+// CHECK-EH-11-NEXT:    [[NRVO_VAL:%.*]] = load i1, ptr [[NRVO]], align 1
 // CHECK-EH-11-NEXT:    br i1 [[NRVO_VAL]], label [[NRVO_SKIPDTOR:%.*]], label [[NRVO_UNUSED:%.*]]
 // CHECK-EH-11:       nrvo.unused:
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_RESULT]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    br label [[NRVO_SKIPDTOR]]
 // CHECK-EH-11:       nrvo.skipdtor:
 // CHECK-EH-11-NEXT:    ret void
@@ -3002,10 +2935,10 @@ X test25() {
 // CHECK-EH-11-NEXT:  entry:
 // CHECK-EH-11-NEXT:    [[AGG_TMP_ENSURED:%.*]] = alloca [[CLASS_X:%.*]], align 1
 // CHECK-EH-11-NEXT:    [[AGG_TMP_ENSURED1:%.*]] = alloca [[CLASS_X]], align 1
-// CHECK-EH-11-NEXT:    call void @_Z6test25ILb1EE1Xv(%class.X* sret([[CLASS_X]]) align 1 [[AGG_TMP_ENSURED]])
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED]]) #[[ATTR6]]
-// CHECK-EH-11-NEXT:    call void @_Z6test25ILb0EE1Xv(%class.X* sret([[CLASS_X]]) align 1 [[AGG_TMP_ENSURED1]])
-// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(%class.X* noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED1]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_Z6test25ILb1EE1Xv(ptr sret([[CLASS_X]]) align 1 [[AGG_TMP_ENSURED]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED]]) #[[ATTR6]]
+// CHECK-EH-11-NEXT:    call void @_Z6test25ILb0EE1Xv(ptr sret([[CLASS_X]]) align 1 [[AGG_TMP_ENSURED1]])
+// CHECK-EH-11-NEXT:    call void @_ZN1XD1Ev(ptr noundef nonnull align 1 dereferenceable(1) [[AGG_TMP_ENSURED1]]) #[[ATTR6]]
 // CHECK-EH-11-NEXT:    ret void
 //
 void test25instantiate() {

diff  --git a/clang/test/CodeGenCXX/nullptr.cpp b/clang/test/CodeGenCXX/nullptr.cpp
index 1759f05706db5..ca76c55e2122d 100644
--- a/clang/test/CodeGenCXX/nullptr.cpp
+++ b/clang/test/CodeGenCXX/nullptr.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -I%S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -I%S -emit-llvm -o - %s | FileCheck %s
 
 #include <typeinfo>
 
-// CHECK: @_ZTIDn = external constant i8*
+// CHECK: @_ZTIDn = external constant ptr
 int* a = nullptr;
 
 void f() {
@@ -15,7 +15,7 @@ nullptr_t get_nullptr();
 
 struct X { };
 void g() {
-  // CHECK: call i8* @_Z11get_nullptrv()
+  // CHECK: call ptr @_Z11get_nullptrv()
   int (X::*pmf)(int) = get_nullptr();
 }
 
@@ -38,7 +38,7 @@ bool pr23833_a(U &u) { return bool(u.b); }
 // CHECK: store
 // CHECK: load
 // CHECK-NOT: load
-// CHECK: ret i8* null
+// CHECK: ret ptr null
 nullptr_t pr23833_b(nullptr_t &n) { return n; }
 
 struct X1 { operator int*(); };
@@ -58,7 +58,7 @@ int pr23833_c() {
 // CHECK-NOT: load
 // CHECK: store
 // CHECK: load
-// CHECK: ret i32*
+// CHECK: ret ptr
 int *pr23833_d() {
   int *p = X2();
   return p;

diff  --git a/clang/test/CodeGenCXX/operator-new.cpp b/clang/test/CodeGenCXX/operator-new.cpp
index f3f8320ab76d1..a393561f7db83 100644
--- a/clang/test/CodeGenCXX/operator-new.cpp
+++ b/clang/test/CodeGenCXX/operator-new.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-pc-linux-gnu -emit-llvm -o %t-1.ll %s
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -o %t-1.ll %s
 // RUN: FileCheck --check-prefix=ALL -check-prefix SANE --input-file=%t-1.ll %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-pc-linux-gnu -emit-llvm -fno-assume-sane-operator-new -o %t-2.ll %s
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu -emit-llvm -fno-assume-sane-operator-new -o %t-2.ll %s
 // RUN: FileCheck --check-prefix=ALL -check-prefix SANENOT --input-file=%t-2.ll %s
 
 class teste {
@@ -10,7 +10,7 @@ class teste {
 };
 
 void f1() {
-  // ALL: declare noundef nonnull i8* @_Znwj(
+  // ALL: declare noundef nonnull ptr @_Znwj(
   new teste();
 }
 
@@ -22,8 +22,8 @@ void *f2(long N) {
   // ALL-NEXT: [[OVER:%.*]] = extractvalue {{.*}} [[UWO]], 1
   // ALL-NEXT: [[SUM:%.*]] = extractvalue {{.*}} [[UWO]], 0
   // ALL-NEXT: [[RESULT:%.*]] = select i1 [[OVER]], i32 -1, i32 [[SUM]]
-  // SANE-NEXT: call noalias noundef nonnull i8* @_Znaj(i32 noundef [[RESULT]])
-  // SANENOT-NEXT: call noundef nonnull i8* @_Znaj(i32 noundef [[RESULT]])
+  // SANE-NEXT: call noalias noundef nonnull ptr @_Znaj(i32 noundef [[RESULT]])
+  // SANENOT-NEXT: call noundef nonnull ptr @_Znaj(i32 noundef [[RESULT]])
 }
 
-// ALL: declare noundef nonnull i8* @_Znaj(
+// ALL: declare noundef nonnull ptr @_Znaj(

diff  --git a/clang/test/CodeGenCXX/pass-by-value-noalias.cpp b/clang/test/CodeGenCXX/pass-by-value-noalias.cpp
index ef3c11f90dae1..765a6fb66a72b 100644
--- a/clang/test/CodeGenCXX/pass-by-value-noalias.cpp
+++ b/clang/test/CodeGenCXX/pass-by-value-noalias.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fpass-by-value-is-noalias -triple arm64-apple-iphoneos -emit-llvm -disable-llvm-optzns %s -o - 2>&1 | FileCheck --check-prefix=WITH_NOALIAS %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple arm64-apple-iphoneos -emit-llvm -disable-llvm-optzns %s -o - 2>&1 | FileCheck --check-prefix=NO_NOALIAS %s
+// RUN: %clang_cc1 -fpass-by-value-is-noalias -triple arm64-apple-iphoneos -emit-llvm -disable-llvm-optzns %s -o - 2>&1 | FileCheck --check-prefix=WITH_NOALIAS %s
+// RUN: %clang_cc1 -triple arm64-apple-iphoneos -emit-llvm -disable-llvm-optzns %s -o - 2>&1 | FileCheck --check-prefix=NO_NOALIAS %s
 
 // A trivial struct large enough so it is not passed in registers on ARM64.
 struct Foo {
@@ -14,8 +14,8 @@ struct Foo {
 // Make sure noalias is added to indirect arguments with trivially copyable types
 // if -fpass-by-value-is-noalias is provided.
 
-// WITH_NOALIAS: define{{.*}} void @_Z4take3Foo(%struct.Foo* noalias noundef %arg)
-// NO_NOALIAS: define{{.*}} void @_Z4take3Foo(%struct.Foo* noundef %arg)
+// WITH_NOALIAS: define{{.*}} void @_Z4take3Foo(ptr noalias noundef %arg)
+// NO_NOALIAS: define{{.*}} void @_Z4take3Foo(ptr noundef %arg)
 void take(Foo arg) {}
 
 int G;
@@ -38,8 +38,8 @@ struct NonTrivial {
 // Make sure noalias is not added to indirect arguments that are not trivially
 // copyable even if -fpass-by-value-is-noalias is provided.
 
-// WITH_NOALIAS: define{{.*}} void @_Z4take10NonTrivial(%struct.NonTrivial* noundef %arg)
-// NO_NOALIAS:   define{{.*}} void @_Z4take10NonTrivial(%struct.NonTrivial* noundef %arg)
+// WITH_NOALIAS: define{{.*}} void @_Z4take10NonTrivial(ptr noundef %arg)
+// NO_NOALIAS:   define{{.*}} void @_Z4take10NonTrivial(ptr noundef %arg)
 void take(NonTrivial arg) {}
 
 // Escape examples. Pointers to the objects passed to take() may escape, depending on whether a temporary copy is created or not (e.g. due to NRVO).
@@ -54,12 +54,12 @@ struct A {
 };
 A *p;
 
-// WITH_NOALIAS: define{{.*}} void @_Z4take1A(%struct.A* noalias noundef %arg)
-// NO_NOALIAS: define{{.*}} void @_Z4take1A(%struct.A* noundef %arg)
+// WITH_NOALIAS: define{{.*}} void @_Z4take1A(ptr noalias noundef %arg)
+// NO_NOALIAS: define{{.*}} void @_Z4take1A(ptr noundef %arg)
 void take(A arg) {}
 
-// WITH_NOALIAS: define{{.*}} void @_Z7CreateAPP1A(%struct.A* noalias sret(%struct.A) align 1 %agg.result, %struct.A** noundef %where)
-// NO_NOALIAS: define{{.*}} void @_Z7CreateAPP1A(%struct.A* noalias sret(%struct.A) align 1 %agg.result, %struct.A** noundef %where)
+// WITH_NOALIAS: define{{.*}} void @_Z7CreateAPP1A(ptr noalias sret(%struct.A) align 1 %agg.result, ptr noundef %where)
+// NO_NOALIAS: define{{.*}} void @_Z7CreateAPP1A(ptr noalias sret(%struct.A) align 1 %agg.result, ptr noundef %where)
 A CreateA(A **where) {
   A justlikethis;
   *where = &justlikethis; //Escaped pointer 2 (should also be UB, then)

diff  --git a/clang/test/CodeGenCXX/personality.cpp b/clang/test/CodeGenCXX/personality.cpp
index 5dd4972f45ae9..1c8baa2c412fe 100644
--- a/clang/test/CodeGenCXX/personality.cpp
+++ b/clang/test/CodeGenCXX/personality.cpp
@@ -1,30 +1,30 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-linux-gnu -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-linux-gnu -fexceptions -exception-model=dwarf -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-DWARF
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-linux-gnu -fexceptions -exception-model=seh -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-SEH
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-linux-gnu -fexceptions -exception-model=sjlj -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-SJLJ
+// RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU
+// RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=dwarf -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-DWARF
+// RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=seh -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-SEH
+// RUN: %clang_cc1 -triple i686-unknown-linux-gnu -fexceptions -exception-model=sjlj -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-SJLJ
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-windows-msvc -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-WIN
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-windows-msvc -D __SEH_EXCEPTIONS__ -fms-extensions -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-WIN-SEH-X86
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-windows-msvc -D __SEH_EXCEPTIONS__ -fms-extensions -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-WIN-SEH-X64
+// RUN: %clang_cc1 -triple i686-unknown-windows-msvc -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-WIN
+// RUN: %clang_cc1 -triple i686-unknown-windows-msvc -D __SEH_EXCEPTIONS__ -fms-extensions -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-WIN-SEH-X86
+// RUN: %clang_cc1 -triple x86_64-unknown-windows-msvc -D __SEH_EXCEPTIONS__ -fms-extensions -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-WIN-SEH-X64
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-windows-gnu -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-windows-gnu -fexceptions -exception-model=dwarf -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-DWARF
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-windows-gnu -fexceptions -exception-model=seh -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-SEH
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-unknown-windows-gnu -fexceptions -exception-model=sjlj -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-SJLJ
+// RUN: %clang_cc1 -triple i686-unknown-windows-gnu -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU
+// RUN: %clang_cc1 -triple i686-unknown-windows-gnu -fexceptions -exception-model=dwarf -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-DWARF
+// RUN: %clang_cc1 -triple i686-unknown-windows-gnu -fexceptions -exception-model=seh -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-SEH
+// RUN: %clang_cc1 -triple i686-unknown-windows-gnu -fexceptions -exception-model=sjlj -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-GNU-SJLJ
 
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc-unknown-aix-xcoff -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-AIX
-// RUN: %clang_cc1 -no-opaque-pointers -triple powerpc64-unknown-aix-xcoff -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-AIX
+// RUN: %clang_cc1 -triple powerpc-unknown-aix-xcoff -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-AIX
+// RUN: %clang_cc1 -triple powerpc64-unknown-aix-xcoff -fexceptions -fcxx-exceptions -S -emit-llvm %s -o - | FileCheck %s -check-prefix CHECK-AIX
 
 extern void g();
 
-// CHECK-GNU: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
-// CHECK-GNU-DWARF: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
-// CHECK-GNU-SEH: personality i8* bitcast (i32 (...)* @__gxx_personality_seh0 to i8*)
-// CHECK-GNU-SJLJ: personality i8* bitcast (i32 (...)* @__gxx_personality_sj0 to i8*)
+// CHECK-GNU: personality ptr @__gxx_personality_v0
+// CHECK-GNU-DWARF: personality ptr @__gxx_personality_v0
+// CHECK-GNU-SEH: personality ptr @__gxx_personality_seh0
+// CHECK-GNU-SJLJ: personality ptr @__gxx_personality_sj0
 
-// CHECK-WIN: personality i8* bitcast (i32 (...)* @__CxxFrameHandler3 to i8*)
+// CHECK-WIN: personality ptr @__CxxFrameHandler3
 
-// CHECK-AIX: personality i8* bitcast (i32 (...)* @__xlcxx_personality_v1 to i8*)
+// CHECK-AIX: personality ptr @__xlcxx_personality_v1
 
 void f() {
   try {
@@ -34,8 +34,8 @@ void f() {
 }
 
 #if defined(__SEH_EXCEPTIONS__)
-// CHECK-WIN-SEH-X86: personality i8* bitcast (i32 (...)* @_except_handler3 to i8*)
-// CHECK-WIN-SEH-X64: personality i8* bitcast (i32 (...)* @__C_specific_handler to i8*)
+// CHECK-WIN-SEH-X86: personality ptr @_except_handler3
+// CHECK-WIN-SEH-X64: personality ptr @__C_specific_handler
 
 void h(void) {
   __try {

diff  --git a/clang/test/CodeGenCXX/pod-member-memcpys.cpp b/clang/test/CodeGenCXX/pod-member-memcpys.cpp
index 5dbb9956bab9e..16d3d45a8179b 100644
--- a/clang/test/CodeGenCXX/pod-member-memcpys.cpp
+++ b/clang/test/CodeGenCXX/pod-member-memcpys.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple x86_64-apple-darwin10 -emit-llvm -std=c++03 -fexceptions -fcxx-exceptions -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -triple i386-apple-darwin10 -emit-llvm -std=c++03 -o - %s | FileCheck --check-prefix=CHECK-2 %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple x86_64-apple-darwin10 -emit-llvm -std=c++03 -fexceptions -fcxx-exceptions -o - %s | FileCheck %s
+// RUN: %clang_cc1 -no-enable-noundef-analysis -triple i386-apple-darwin10 -emit-llvm -std=c++03 -o - %s | FileCheck --check-prefix=CHECK-2 %s
 
 struct POD {
   int w, x, y, z;
@@ -123,67 +123,67 @@ CALL_AO(InnerClassMember)
 CALL_AO(PackedMembers)
 
 // Basic copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.Basic* @_ZN5BasicaSERKS_(%struct.Basic* {{[^,]*}} %this, %struct.Basic* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
-// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
-// CHECK: ret %struct.Basic*
+// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN5BasicaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN6NonPODaSERKS_
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: ret ptr
 
 // PODMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.PODMember* @_ZN9PODMemberaSERKS_(%struct.PODMember* {{[^,]*}} %this, %struct.PODMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
-// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
-// CHECK: ret %struct.PODMember*
+// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN9PODMemberaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
+// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN6NonPODaSERKS_
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: ret ptr
 
 // PODLikeMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.PODLikeMember* @_ZN13PODLikeMemberaSERKS_(%struct.PODLikeMember* {{[^,]*}} %this, %struct.PODLikeMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
-// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
-// CHECK: ret %struct.PODLikeMember*
+// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN13PODLikeMemberaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
+// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN6NonPODaSERKS_
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: ret ptr
 
 // ArrayMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ArrayMember* @_ZN11ArrayMemberaSERKS_(%struct.ArrayMember* {{[^,]*}} %this, %struct.ArrayMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 64, i1 {{.*}})
-// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 64, i1 {{.*}})
-// CHECK: ret %struct.ArrayMember*
+// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN11ArrayMemberaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 64, i1 {{.*}})
+// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN6NonPODaSERKS_
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 64, i1 {{.*}})
+// CHECK: ret ptr
 
 // ZeroLengthArrayMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.ZeroLengthArrayMember* @_ZN21ZeroLengthArrayMemberaSERKS_(%struct.ZeroLengthArrayMember* {{[^,]*}} %this, %struct.ZeroLengthArrayMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 8, i1 {{.*}})
-// CHECK: ret %struct.ZeroLengthArrayMember*
+// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN21ZeroLengthArrayMemberaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN6NonPODaSERKS_
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 8, i1 {{.*}})
+// CHECK: ret ptr
 
 // VolatileMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.VolatileMember* @_ZN14VolatileMemberaSERKS_(%struct.VolatileMember* {{[^,]*}} %this, %struct.VolatileMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
-// CHECK: load volatile i32, i32* {{.*}}, align 4
+// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14VolatileMemberaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: load volatile i32, ptr {{.*}}, align 4
 // CHECK: store volatile i32 {{.*}}, align 4
-// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
-// CHECK: ret %struct.VolatileMember*
+// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN6NonPODaSERKS_
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: ret ptr
 
 // BitfieldMember copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.BitfieldMember* @_ZN14BitfieldMemberaSERKS_(%struct.BitfieldMember* {{[^,]*}} %this, %struct.BitfieldMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
-// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 1 {{.*}} align 1 {{.*}}i64 3, i1 {{.*}})
-// CHECK: ret %struct.BitfieldMember*
+// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN14BitfieldMemberaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN6NonPODaSERKS_
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 1 {{.*}} align 1 {{.*}}i64 3, i1 {{.*}})
+// CHECK: ret ptr
 
 // InnerClass copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.InnerClassMember* @_ZN16InnerClassMemberaSERKS_(%struct.InnerClassMember* {{[^,]*}} %this, %struct.InnerClassMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
-// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
-// CHECK: ret %struct.InnerClassMember*
+// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN16InnerClassMemberaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
+// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN6NonPODaSERKS_
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: ret ptr
 
 // PackedMembers copy-assignment:
-// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.PackedMembers* @_ZN13PackedMembersaSERKS_(%struct.PackedMembers* {{[^,]*}} %this, %struct.PackedMembers* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %struct.NonPOD* @_ZN6NonPODaSERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 1 {{.*}} align 1 {{.*}}i64 16, i1 {{.*}})
-// CHECK: ret %struct.PackedMembers*
+// CHECK-LABEL: define linkonce_odr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN13PackedMembersaSERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_ZN6NonPODaSERKS_
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 1 {{.*}} align 1 {{.*}}i64 16, i1 {{.*}})
+// CHECK: ret ptr
 
 // COPY-CONSTRUCTORS:
 
@@ -195,88 +195,88 @@ CALL_AO(PackedMembers)
 
 CALL_CC(PackedMembers)
 // PackedMembers copy-assignment:
-// CHECK-LABEL: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(%struct.PackedMembers* {{[^,]*}} %this, %struct.PackedMembers* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK-LABEL: define linkonce_odr void @_ZN13PackedMembersC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
 // CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 1 {{.*}} align 1 {{.*}}i64 16, i1 {{.*}})
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 1 {{.*}} align 1 {{.*}}i64 16, i1 {{.*}})
 // CHECK: ret void
 
 CALL_CC(BitfieldMember2)
 // BitfieldMember2 copy-constructor:
-// CHECK-2-LABEL: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(%struct.BitfieldMember2* {{[^,]*}} %this, %struct.BitfieldMember2* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK-2: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 false)
+// CHECK-2-LABEL: define linkonce_odr void @_ZN15BitfieldMember2C2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK-2: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 false)
 // CHECK-2: call void @_ZN6NonPODC1ERKS_
 // CHECK-2: ret void
 
 CALL_CC(BitfieldMember3)
 // BitfieldMember3 copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN15BitfieldMember3C2ERKS_(%struct.BitfieldMember3* {{[^,]*}} %this, %struct.BitfieldMember3* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 8, i1 false)
+// CHECK-LABEL: define linkonce_odr void @_ZN15BitfieldMember3C2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 8, i1 false)
 // CHECK: ret void
 
 CALL_CC(ReferenceMember)
 // ReferenceMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(%struct.ReferenceMember* {{[^,]*}} %this, %struct.ReferenceMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 16, i1 {{.*}})
+// CHECK-LABEL: define linkonce_odr void @_ZN15ReferenceMemberC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 16, i1 {{.*}})
 // CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 16, i1 {{.*}})
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 8 {{.*}} align 8 {{.*}}i64 16, i1 {{.*}})
 // CHECK: ret void
 
 CALL_CC(InnerClassMember)
 // InnerClass copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(%struct.InnerClassMember* {{[^,]*}} %this, %struct.InnerClassMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
+// CHECK-LABEL: define linkonce_odr void @_ZN16InnerClassMemberC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
 // CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
 // CHECK: ret void
 
 CALL_CC(BitfieldMember)
 // BitfieldMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(%struct.BitfieldMember* {{[^,]*}} %this, %struct.BitfieldMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK-LABEL: define linkonce_odr void @_ZN14BitfieldMemberC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
 // CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 1 {{.*}} align 1 {{.*}}i64 3, i1 {{.*}})
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 1 {{.*}} align 1 {{.*}}i64 3, i1 {{.*}})
 // CHECK: ret void
 
 CALL_CC(VolatileMember)
 // VolatileMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN14VolatileMemberC2ERKS_(%struct.VolatileMember* {{[^,]*}} %this, %struct.VolatileMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
-// CHECK: load volatile i32, i32* {{.*}}, align 4
+// CHECK-LABEL: define linkonce_odr void @_ZN14VolatileMemberC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: load volatile i32, ptr {{.*}}, align 4
 // CHECK: store volatile i32 {{.*}}, align 4
 // CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
 // CHECK: ret void
 
 CALL_CC(ArrayMember)
 // ArrayMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(%struct.ArrayMember* {{[^,]*}} %this, %struct.ArrayMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 64, i1 {{.*}})
+// CHECK-LABEL: define linkonce_odr void @_ZN11ArrayMemberC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 64, i1 {{.*}})
 // CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 64, i1 {{.*}})
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 64, i1 {{.*}})
 // CHECK: ret void
 
 CALL_CC(PODLikeMember)
 // PODLikeMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(%struct.PODLikeMember* {{[^,]*}} %this, %struct.PODLikeMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
+// CHECK-LABEL: define linkonce_odr void @_ZN13PODLikeMemberC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
 // CHECK: invoke void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
 // CHECK: ret void
 // CHECK: landingpad
 // CHECK: invoke void @_ZN7PODLikeD1Ev
 
 CALL_CC(PODMember)
 // PODMember copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN9PODMemberC2ERKS_(%struct.PODMember* {{[^,]*}} %this, %struct.PODMember* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
+// CHECK-LABEL: define linkonce_odr void @_ZN9PODMemberC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 32, i1 {{.*}})
 // CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
 // CHECK: ret void
 
 CALL_CC(Basic)
 // Basic copy-constructor:
-// CHECK-LABEL: define linkonce_odr void @_ZN5BasicC2ERKS_(%struct.Basic* {{[^,]*}} %this, %struct.Basic* nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK-LABEL: define linkonce_odr void @_ZN5BasicC2ERKS_(ptr {{[^,]*}} %this, ptr nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) %0)
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
 // CHECK: call void @_ZN6NonPODC1ERKS_
-// CHECK: call void @llvm.memcpy.p0i8.p0i8.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
+// CHECK: call void @llvm.memcpy.p0.p0.i64({{.*}} align 4 {{.*}} align 4 {{.*}}i64 16, i1 {{.*}})
 // CHECK: ret void

diff  --git a/clang/test/CodeGenCXX/powerpc-byval.cpp b/clang/test/CodeGenCXX/powerpc-byval.cpp
index ca5341cfdd028..1f0488b2a81f7 100644
--- a/clang/test/CodeGenCXX/powerpc-byval.cpp
+++ b/clang/test/CodeGenCXX/powerpc-byval.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple=powerpc-unknown-linux | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple=powerpc-unknown-linux | FileCheck %s
 
 struct S {
   S();
@@ -9,4 +9,4 @@ void byval(S one, S two) {
   one = two;
 }
 
-// CHECK: define{{.*}} void @_Z5byval1SS_(%struct.S* noundef %one, %struct.S* noundef %two)
+// CHECK: define{{.*}} void @_Z5byval1SS_(ptr noundef %one, ptr noundef %two)

diff  --git a/clang/test/CodeGenCXX/pr12251.cpp b/clang/test/CodeGenCXX/pr12251.cpp
index 2615bc7260e95..a267a3aed077d 100644
--- a/clang/test/CodeGenCXX/pr12251.cpp
+++ b/clang/test/CodeGenCXX/pr12251.cpp
@@ -1,16 +1,16 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple i386-unknown-unknown -emit-llvm -O1 -relaxed-aliasing -fstrict-enums -std=c++11 -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple i386-unknown-unknown -emit-llvm -O1 -relaxed-aliasing -std=c++11 -o - | FileCheck --check-prefix=NO-STRICT-ENUMS %s
+// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -O1 -relaxed-aliasing -fstrict-enums -std=c++11 -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -O1 -relaxed-aliasing -std=c++11 -o - | FileCheck --check-prefix=NO-STRICT-ENUMS %s
 
 bool f(bool *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} zeroext i1 @_Z1fPb
-// CHECK: load i8, i8* %{{[^ ]*}}, align 1, !range [[RANGE_i8_0_2:![^ ]*]]
+// CHECK: load i8, ptr %{{[^ ]*}}, align 1, !range [[RANGE_i8_0_2:![^ ]*]]
 
 // Only enum-tests follow. Ensure that after the bool test, no further range
 // metadata shows up when strict enums are disabled.
 // NO-STRICT-ENUMS-LABEL: define{{.*}} zeroext i1 @_Z1fPb
-// NO-STRICT-ENUMS: load i8, i8* %{{[^ ]*}}, align 1, !range
+// NO-STRICT-ENUMS: load i8, ptr %{{[^ ]*}}, align 1, !range
 // NO-STRICT-ENUMS-NOT: !range
 
 enum e1 { };
@@ -32,70 +32,70 @@ e3 g3(e3 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z2g3P2e3
-// CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_0_32:![^ ]*]]
+// CHECK: load i32, ptr %x, align 4, !range [[RANGE_i32_0_32:![^ ]*]]
 
 enum e4 { e4_a = -16};
 e4 g4(e4 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z2g4P2e4
-// CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m16_16:![^ ]*]]
+// CHECK: load i32, ptr %x, align 4, !range [[RANGE_i32_m16_16:![^ ]*]]
 
 enum e5 { e5_a = -16, e5_b = 16};
 e5 g5(e5 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z2g5P2e5
-// CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m32_32:![^ ]*]]
+// CHECK: load i32, ptr %x, align 4, !range [[RANGE_i32_m32_32:![^ ]*]]
 
 enum e6 { e6_a = -1 };
 e6 g6(e6 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z2g6P2e6
-// CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m1_1:![^ ]*]]
+// CHECK: load i32, ptr %x, align 4, !range [[RANGE_i32_m1_1:![^ ]*]]
 
 enum e7 { e7_a = -16, e7_b = 2};
 e7 g7(e7 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z2g7P2e7
-// CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m16_16]]
+// CHECK: load i32, ptr %x, align 4, !range [[RANGE_i32_m16_16]]
 
 enum e8 { e8_a = -17};
 e8 g8(e8 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z2g8P2e8
-// CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m32_32:![^ ]*]]
+// CHECK: load i32, ptr %x, align 4, !range [[RANGE_i32_m32_32:![^ ]*]]
 
 enum e9 { e9_a = 17};
 e9 g9(e9 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z2g9P2e9
-// CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_0_32]]
+// CHECK: load i32, ptr %x, align 4, !range [[RANGE_i32_0_32]]
 
 enum e10 { e10_a = -16, e10_b = 32};
 e10 g10(e10 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z3g10P3e10
-// CHECK: load i32, i32* %x, align 4, !range [[RANGE_i32_m64_64:![^ ]*]]
+// CHECK: load i32, ptr %x, align 4, !range [[RANGE_i32_m64_64:![^ ]*]]
 
 enum e11 {e11_a = 4294967296 };
 enum e11 g11(enum e11 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i64 @_Z3g11P3e11
-// CHECK: load i64, i64* %x, align {{[84]}}, !range [[RANGE_i64_0_2pow33:![^ ]*]]
+// CHECK: load i64, ptr %x, align {{[84]}}, !range [[RANGE_i64_0_2pow33:![^ ]*]]
 
 enum e12 {e12_a = 9223372036854775808U };
 enum e12 g12(enum e12 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i64 @_Z3g12P3e12
-// CHECK: load i64, i64* %x, align {{[84]}}
+// CHECK: load i64, ptr %x, align {{[84]}}
 // CHECK-NOT: range
 // CHECK: ret
 
@@ -104,7 +104,7 @@ e13 g13(e13 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} signext i8 @_Z3g13P3e13
-// CHECK: load i8, i8* %x, align 1
+// CHECK: load i8, ptr %x, align 1
 // CHECK-NOT: range
 // CHECK: ret
 
@@ -113,7 +113,7 @@ e14 g14(e14 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z3g14P3e14
-// CHECK: load i32, i32* %x, align 4
+// CHECK: load i32, ptr %x, align 4
 // CHECK-NOT: range
 // CHECK: ret
 
@@ -122,7 +122,7 @@ e15 g15(e15 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z3g15P3e15
-// CHECK: load i32, i32* %x, align 4
+// CHECK: load i32, ptr %x, align 4
 // CHECK-NOT: range
 // CHECK: ret
 
@@ -131,7 +131,7 @@ e16 g16(e16 *x) {
   return *x;
 }
 // CHECK-LABEL: define{{.*}} i32 @_Z3g16P3e16
-// CHECK: load i32, i32* %x, align 4
+// CHECK: load i32, ptr %x, align 4
 // CHECK-NOT: range
 // CHECK: ret
 

diff  --git a/clang/test/CodeGenCXX/pr13396.cpp b/clang/test/CodeGenCXX/pr13396.cpp
index 30b0aaa5da407..37cb8925f1ff3 100644
--- a/clang/test/CodeGenCXX/pr13396.cpp
+++ b/clang/test/CodeGenCXX/pr13396.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-pc-linux-gnu %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i686-pc-linux-gnu %s -emit-llvm -o - | FileCheck %s
 struct foo {
   template<typename T>
   __attribute__ ((regparm (3))) foo(T x) {}
@@ -7,13 +7,13 @@ struct foo {
 };
 
 foo::foo() {
-  // CHECK-LABEL: define{{.*}} void @_ZN3fooC2Ev(%struct.foo* inreg noundef nonnull align 1 dereferenceable(1) %this)
-  // CHECK-LABEL: define{{.*}} void @_ZN3fooC1Ev(%struct.foo* inreg noundef nonnull align 1 dereferenceable(1) %this)
+  // CHECK-LABEL: define{{.*}} void @_ZN3fooC2Ev(ptr inreg noundef nonnull align 1 dereferenceable(1) %this)
+  // CHECK-LABEL: define{{.*}} void @_ZN3fooC1Ev(ptr inreg noundef nonnull align 1 dereferenceable(1) %this)
 }
 
 foo::~foo() {
-  // CHECK-LABEL: define{{.*}} void @_ZN3fooD2Ev(%struct.foo* inreg noundef nonnull align 1 dereferenceable(1) %this)
-  // CHECK-LABEL: define{{.*}} void @_ZN3fooD1Ev(%struct.foo* inreg noundef nonnull align 1 dereferenceable(1) %this)
+  // CHECK-LABEL: define{{.*}} void @_ZN3fooD2Ev(ptr inreg noundef nonnull align 1 dereferenceable(1) %this)
+  // CHECK-LABEL: define{{.*}} void @_ZN3fooD1Ev(ptr inreg noundef nonnull align 1 dereferenceable(1) %this)
 }
 
 void dummy() {
@@ -21,6 +21,6 @@ void dummy() {
   // older clangs accept:
   // template foo::foo(int x);
   foo x(10);
-  // CHECK-LABEL: define linkonce_odr void @_ZN3fooC1IiEET_(%struct.foo* inreg noundef nonnull align 1 dereferenceable(1) %this, i32 inreg noundef %x)
-  // CHECK-LABEL: define linkonce_odr void @_ZN3fooC2IiEET_(%struct.foo* inreg noundef nonnull align 1 dereferenceable(1) %this, i32 inreg noundef %x)
+  // CHECK-LABEL: define linkonce_odr void @_ZN3fooC1IiEET_(ptr inreg noundef nonnull align 1 dereferenceable(1) %this, i32 inreg noundef %x)
+  // CHECK-LABEL: define linkonce_odr void @_ZN3fooC2IiEET_(ptr inreg noundef nonnull align 1 dereferenceable(1) %this, i32 inreg noundef %x)
 }

diff  --git a/clang/test/CodeGenCXX/pr20897.cpp b/clang/test/CodeGenCXX/pr20897.cpp
index ec840dd0caa4d..5412c7dc91fba 100644
--- a/clang/test/CodeGenCXX/pr20897.cpp
+++ b/clang/test/CodeGenCXX/pr20897.cpp
@@ -1,33 +1,31 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-msvc -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i686-windows-msvc -fms-extensions -emit-llvm -std=c++1y -O0 -o - %s | FileCheck %s
 struct Base {};
 
 // __declspec(dllexport) causes us to export the implicit constructor.
 struct __declspec(dllexport) Derived : virtual Base {
-// CHECK-LABEL: define weak_odr dso_local dllexport x86_thiscallcc noundef %struct.Derived* @"??0Derived@@QAE at ABU0@@Z"
-// CHECK:      %[[this:.*]] = load %struct.Derived*, %struct.Derived** {{.*}}
-// CHECK-NEXT: store %struct.Derived* %[[this]], %struct.Derived** %[[retval:.*]]
-// CHECK:      %[[dest_a_gep:.*]] = getelementptr inbounds %struct.Derived, %struct.Derived* %[[this]], i32 0, i32 1
-// CHECK-NEXT: %[[src_load:.*]]   = load %struct.Derived*, %struct.Derived** {{.*}}
-// CHECK-NEXT: %[[src_a_gep:.*]]  = getelementptr inbounds %struct.Derived, %struct.Derived* %[[src_load:.*]], i32 0, i32 1
-// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 %[[dest_a_gep]], i8* align 4 %[[src_a_gep]], i64 1, i1 false)
-// CHECK-NEXT: %[[dest_this:.*]] = load %struct.Derived*, %struct.Derived** %[[retval]]
-// CHECK-NEXT: ret %struct.Derived* %[[dest_this]]
+// CHECK-LABEL: define weak_odr dso_local dllexport x86_thiscallcc noundef ptr @"??0Derived@@QAE at ABU0@@Z"
+// CHECK:      %[[this:.*]] = load ptr, ptr {{.*}}
+// CHECK-NEXT: store ptr %[[this]], ptr %[[retval:.*]]
+// CHECK:      %[[dest_a_gep:.*]] = getelementptr inbounds %struct.Derived, ptr %[[this]], i32 0, i32 1
+// CHECK-NEXT: %[[src_load:.*]]   = load ptr, ptr {{.*}}
+// CHECK-NEXT: %[[src_a_gep:.*]]  = getelementptr inbounds %struct.Derived, ptr %[[src_load:.*]], i32 0, i32 1
+// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 %[[dest_a_gep]], ptr align 4 %[[src_a_gep]], i64 1, i1 false)
+// CHECK-NEXT: %[[dest_this:.*]] = load ptr, ptr %[[retval]]
+// CHECK-NEXT: ret ptr %[[dest_this]]
   bool a : 1;
   bool b : 1;
 };
 
 // __declspec(dllexport) causes us to export the implicit copy constructor.
 struct __declspec(dllexport) Derived2 : virtual Base {
-// CHECK-LABEL: define weak_odr dso_local dllexport x86_thiscallcc noundef %struct.Derived2* @"??0Derived2@@QAE at ABU0@@Z"
-// CHECK:      %[[this:.*]] = load %struct.Derived2*, %struct.Derived2** {{.*}}
-// CHECK-NEXT: store %struct.Derived2* %[[this]], %struct.Derived2** %[[retval:.*]]
-// CHECK:      %[[dest_a_gep:.*]] = getelementptr inbounds %struct.Derived2, %struct.Derived2* %[[this]], i32 0, i32 1
-// CHECK-NEXT: %[[src_load:.*]]   = load %struct.Derived2*, %struct.Derived2** {{.*}}
-// CHECK-NEXT: %[[src_a_gep:.*]]  = getelementptr inbounds %struct.Derived2, %struct.Derived2* %[[src_load:.*]], i32 0, i32 1
-// CHECK-NEXT: %[[dest_a_bitcast:.*]]  = bitcast [1 x i32]* %[[dest_a_gep]] to i8*
-// CHECK-NEXT: %[[src_a_bitcast:.*]] = bitcast [1 x i32]* %[[src_a_gep]] to i8*
-// CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i32(i8* align 4 %[[dest_a_bitcast]], i8* align 4 %[[src_a_bitcast]], i32 4, i1 false)
-// CHECK-NEXT: %[[dest_this:.*]] = load %struct.Derived2*, %struct.Derived2** %[[retval]]
-// CHECK-NEXT: ret %struct.Derived2* %[[dest_this]]
+// CHECK-LABEL: define weak_odr dso_local dllexport x86_thiscallcc noundef ptr @"??0Derived2@@QAE at ABU0@@Z"
+// CHECK:      %[[this:.*]] = load ptr, ptr {{.*}}
+// CHECK-NEXT: store ptr %[[this]], ptr %[[retval:.*]]
+// CHECK:      %[[dest_a_gep:.*]] = getelementptr inbounds %struct.Derived2, ptr %[[this]], i32 0, i32 1
+// CHECK-NEXT: %[[src_load:.*]]   = load ptr, ptr {{.*}}
+// CHECK-NEXT: %[[src_a_gep:.*]]  = getelementptr inbounds %struct.Derived2, ptr %[[src_load:.*]], i32 0, i32 1
+// CHECK-NEXT: call void @llvm.memcpy.p0.p0.i32(ptr align 4 %[[dest_a_gep]], ptr align 4 %[[src_a_gep]], i32 4, i1 false)
+// CHECK-NEXT: %[[dest_this:.*]] = load ptr, ptr %[[retval]]
+// CHECK-NEXT: ret ptr %[[dest_this]]
   int Array[1];
 };

diff  --git a/clang/test/CodeGenCXX/pr27030.cpp b/clang/test/CodeGenCXX/pr27030.cpp
index eefe8865e3ca0..3b0938695fe3e 100644
--- a/clang/test/CodeGenCXX/pr27030.cpp
+++ b/clang/test/CodeGenCXX/pr27030.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple=i386-pc-win32 %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple=i386-pc-win32 %s -o - | FileCheck %s
 struct A {};
 struct B : A {};
 extern "C" {
@@ -6,7 +6,7 @@ extern int B::*a;
 void test1() { (int A::*)(a); }
 }
 // CHECK-LABEL: define dso_local void @test1(
-// CHECK: %[[load:.*]]       = load i32, i32* @a
+// CHECK: %[[load:.*]]       = load i32, ptr @a
 // CHECK: %[[memptr_cmp:.*]] = icmp ne i32 %[[load]], -1
 // CHECK: br i1 %[[memptr_cmp]]
 

diff  --git a/clang/test/CodeGenCXX/pr28360.cpp b/clang/test/CodeGenCXX/pr28360.cpp
index 39997798c49be..889cebb315277 100644
--- a/clang/test/CodeGenCXX/pr28360.cpp
+++ b/clang/test/CodeGenCXX/pr28360.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - -triple i686-pc-win32 | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple i686-pc-win32 | FileCheck %s
 struct A {
   void Foo();
   void Foo(int);
@@ -11,6 +11,6 @@ void Bar(const MpTy &);
 void Baz() { Bar(&A::Foo); }
 
 // CHECK-LABEL: define dso_local void @"?Baz@@YAXXZ"(
-// CHECK:  %[[ref_tmp:.*]] = alloca i8*, align 4
-// CHECK: store i8* bitcast (void (%struct.A*)* @"?Foo at A@@QAEXXZ" to i8*), i8** %[[ref_tmp]], align 4
-// CHECK: call void @"?Bar@@YAXABQ8A@@AEXXZ at Z"(i8** noundef nonnull align 4 dereferenceable(4) %[[ref_tmp]])
+// CHECK:  %[[ref_tmp:.*]] = alloca ptr, align 4
+// CHECK: store ptr @"?Foo at A@@QAEXXZ", ptr %[[ref_tmp]], align 4
+// CHECK: call void @"?Bar@@YAXABQ8A@@AEXXZ at Z"(ptr noundef nonnull align 4 dereferenceable(4) %[[ref_tmp]])

diff  --git a/clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp b/clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp
index 8577ccd490636..d9ece9f5c7351 100644
--- a/clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp
+++ b/clang/test/CodeGenCXX/pr40771-ctad-with-lambda-copy-capture.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -emit-llvm --std=c++17 -fcxx-exceptions -fexceptions -discard-value-names %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm --std=c++17 -fcxx-exceptions -fexceptions -discard-value-names %s -o - | FileCheck %s
 
 struct Q { Q(); };
 struct R { R(Q); ~R(); };
@@ -13,43 +13,43 @@ T t { R{q}, S{q} };
 // CHECK-NEXT: [[TMP_Q1:%[a-z0-9.]+]] = alloca %struct.Q, align 1
 // CHECK-NEXT: [[TMP_S:%[a-z0-9.]+]] = alloca %struct.S, align 1
 // CHECK-NEXT: [[TMP_Q2:%[a-z0-9.]+]] = alloca %struct.Q, align 1
-// CHECK-NEXT: [[XPT:%[a-z0-9.]+]] = alloca i8*
+// CHECK-NEXT: [[XPT:%[a-z0-9.]+]] = alloca ptr
 // CHECK-NEXT: [[SLOT:%[a-z0-9.]+]] = alloca i32
 // CHECK-NEXT: [[ACTIVE:%[a-z0-9.]+]] = alloca i1, align 1
-// CHECK-NEXT: call void @_ZN1RC1E1Q(%struct.R* {{[^,]*}} [[TMP_R]])
-// CHECK-NEXT: store i1 true, i1* [[ACTIVE]], align 1
-// CHECK-NEXT: invoke void @_ZN1SC1E1Q(%struct.S* {{[^,]*}} [[TMP_S]])
+// CHECK-NEXT: call void @_ZN1RC1E1Q(ptr {{[^,]*}} [[TMP_R]])
+// CHECK-NEXT: store i1 true, ptr [[ACTIVE]], align 1
+// CHECK-NEXT: invoke void @_ZN1SC1E1Q(ptr {{[^,]*}} [[TMP_S]])
 // CHECK-NEXT:   to label %[[L1:[a-z0-9.]+]] unwind label %[[L2:[a-z0-9.]+]]
 // CHECK-EMPTY:
 // CHECK-NEXT: [[L1]]:
-// CHECK-NEXT: store i1 false, i1* [[ACTIVE]], align 1
-// CHECK-NEXT: call void @_ZN1SD1Ev(%struct.S*
-// CHECK-NEXT: call void @_ZN1RD1Ev(%struct.R*
+// CHECK-NEXT: store i1 false, ptr [[ACTIVE]], align 1
+// CHECK-NEXT: call void @_ZN1SD1Ev(ptr
+// CHECK-NEXT: call void @_ZN1RD1Ev(ptr
 // CHECK-NEXT: [[EXIT:%[a-z0-9.]+]] = call i32 @__cxa_atexit(
 // CHECK-NEXT: ret void
 // CHECK-EMPTY:
 // CHECK-NEXT: [[L2]]:
-// CHECK-NEXT: [[LP:%[a-z0-9.]+]] = landingpad { i8*, i32 }
+// CHECK-NEXT: [[LP:%[a-z0-9.]+]] = landingpad { ptr, i32 }
 // CHECK-NEXT:                      cleanup
-// CHECK-NEXT: [[X1:%[a-z0-9.]+]] = extractvalue { i8*, i32 } [[LP]], 0
-// CHECK-NEXT: store i8* [[X1]], i8** [[XPT]], align 8
-// CHECK-NEXT: [[X2:%[a-z0-9.]+]] = extractvalue { i8*, i32 } [[LP]], 1
-// CHECK-NEXT: store i32 [[X2]], i32* [[SLOT]], align 4
-// CHECK-NEXT: [[IS_ACT:%[a-z0-9.]+]] = load i1, i1* [[ACTIVE]], align 1
+// CHECK-NEXT: [[X1:%[a-z0-9.]+]] = extractvalue { ptr, i32 } [[LP]], 0
+// CHECK-NEXT: store ptr [[X1]], ptr [[XPT]], align 8
+// CHECK-NEXT: [[X2:%[a-z0-9.]+]] = extractvalue { ptr, i32 } [[LP]], 1
+// CHECK-NEXT: store i32 [[X2]], ptr [[SLOT]], align 4
+// CHECK-NEXT: [[IS_ACT:%[a-z0-9.]+]] = load i1, ptr [[ACTIVE]], align 1
 // CHECK-NEXT: br i1 [[IS_ACT]], label %[[L3:[a-z0-9.]+]], label %[[L4:[a-z0-9.]+]]
 // CHECK-EMPTY:
 // CHECK-NEXT: [[L3]]:
-// CHECK-NEXT: call void @_ZN1RD1Ev(%struct.R*
+// CHECK-NEXT: call void @_ZN1RD1Ev(ptr
 // CHECK-NEXT: br label %[[L4]]
 // CHECK-EMPTY:
 // CHECK-NEXT: [[L4]]:
-// CHECK-NEXT: call void @_ZN1RD1Ev(%struct.R* {{[^,]*}} [[TMP_R]])
+// CHECK-NEXT: call void @_ZN1RD1Ev(ptr {{[^,]*}} [[TMP_R]])
 // CHECK-NEXT: br label %[[L5:[a-z0-9.]+]]
 // CHECK-EMPTY:
 // CHECK-NEXT: [[L5]]:
-// CHECK-NEXT: [[EXN:%[a-z0-9.]+]] = load i8*, i8** [[XPT]], align 8
-// CHECK-NEXT: [[SEL:%[a-z0-9.]+]] = load i32, i32* [[SLOT]], align 4
-// CHECK-NEXT: [[LV1:%[a-z0-9.]+]] = insertvalue { i8*, i32 } undef, i8* [[EXN]], 0
-// CHECK-NEXT: [[LV2:%[a-z0-9.]+]] = insertvalue { i8*, i32 } [[LV1]], i32 [[SEL]], 1
-// CHECK-NEXT: resume { i8*, i32 } [[LV2]]
+// CHECK-NEXT: [[EXN:%[a-z0-9.]+]] = load ptr, ptr [[XPT]], align 8
+// CHECK-NEXT: [[SEL:%[a-z0-9.]+]] = load i32, ptr [[SLOT]], align 4
+// CHECK-NEXT: [[LV1:%[a-z0-9.]+]] = insertvalue { ptr, i32 } undef, ptr [[EXN]], 0
+// CHECK-NEXT: [[LV2:%[a-z0-9.]+]] = insertvalue { ptr, i32 } [[LV1]], i32 [[SEL]], 1
+// CHECK-NEXT: resume { ptr, i32 } [[LV2]]
 // CHECK-NEXT: }

diff  --git a/clang/test/CodeGenCXX/pr45964-decomp-transform.cpp b/clang/test/CodeGenCXX/pr45964-decomp-transform.cpp
index bceff30603beb..f7df110ec0129 100644
--- a/clang/test/CodeGenCXX/pr45964-decomp-transform.cpp
+++ b/clang/test/CodeGenCXX/pr45964-decomp-transform.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-linux-gnu -emit-llvm -o - %s | FileCheck %s
 
 int a[1];
 // CHECK: @a = global [1 x i32] zeroinitializer
@@ -10,15 +10,15 @@ void (*d)(){test_transform<0>};
 // CHECK-LABEL: define {{.*}} @_Z14test_transformILi0EEvv
 // CHECK:       [[ENTRY:.*]]:
 // CHECK-NEXT:  [[ARR:%.*]] = alloca [1 x i32]
-// CHECK-NEXT:  [[BEGIN:%.*]] = getelementptr inbounds [1 x i32], [1 x i32]* [[ARR]], i64 0, i64 0
+// CHECK-NEXT:  [[BEGIN:%.*]] = getelementptr inbounds [1 x i32], ptr [[ARR]], i64 0, i64 0
 // CHECK-NEXT:  br label %[[BODY:.*]]
 // CHECK-EMPTY:
 // CHECK-NEXT:  [[BODY]]:
 // CHECK-NEXT:  [[CUR:%.*]] = phi i64 [ 0, %[[ENTRY]] ], [ [[NEXT:%.*]], %[[BODY]] ]
-// CHECK-NEXT:  [[DEST:%.*]] = getelementptr inbounds i32, i32* [[BEGIN]], i64 [[CUR]]
-// CHECK-NEXT:  [[SRC:%.*]] = getelementptr inbounds [1 x i32], [1 x i32]* @a, i64 0, i64 [[CUR]]
-// CHECK-NEXT:  [[X:%.*]] = load i32, i32* [[SRC]]
-// CHECK-NEXT:  store i32 [[X]], i32* [[DEST]]
+// CHECK-NEXT:  [[DEST:%.*]] = getelementptr inbounds i32, ptr [[BEGIN]], i64 [[CUR]]
+// CHECK-NEXT:  [[SRC:%.*]] = getelementptr inbounds [1 x i32], ptr @a, i64 0, i64 [[CUR]]
+// CHECK-NEXT:  [[X:%.*]] = load i32, ptr [[SRC]]
+// CHECK-NEXT:  store i32 [[X]], ptr [[DEST]]
 // CHECK-NEXT:  [[NEXT]] = add nuw i64 [[CUR]], 1
 // CHECK-NEXT:  [[EQ:%.*]] = icmp eq i64 [[NEXT]], 1
 // CHECK-NEXT:  br i1 [[EQ]], label %[[FIN:.*]], label %[[BODY]]

diff  --git a/clang/test/CodeGenCXX/pr47636.cpp b/clang/test/CodeGenCXX/pr47636.cpp
index 007eba56bb62c..597e94695ca5f 100644
--- a/clang/test/CodeGenCXX/pr47636.cpp
+++ b/clang/test/CodeGenCXX/pr47636.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -no-opaque-pointers -o - -emit-llvm -triple x86_64-linux-pc %s | FileCheck %s
+// RUN: %clang_cc1 -o - -emit-llvm -triple x86_64-linux-pc %s | FileCheck %s
 int(&&intu_rvref)[] {1,2,3,4};
 // CHECK: @_ZGR10intu_rvref_ = internal global [4 x i32] [i32 1, i32 2, i32 3, i32 4]
-// CHECK: @intu_rvref ={{.*}} constant [4 x i32]* @_ZGR10intu_rvref_
+// CHECK: @intu_rvref ={{.*}} constant ptr @_ZGR10intu_rvref_
 
 void foo() {
   static const int(&&intu_rvref)[] {1,2,3,4};
-  // CHECK: @_ZZ3foovE10intu_rvref = internal constant [4 x i32]* @_ZGRZ3foovE10intu_rvref_
+  // CHECK: @_ZZ3foovE10intu_rvref = internal constant ptr @_ZGRZ3foovE10intu_rvref_
   // CHECK: @_ZGRZ3foovE10intu_rvref_ = internal constant [4 x i32] [i32 1, i32 2, i32 3, i32 4]
 }
 
@@ -13,7 +13,7 @@ void foo() {
 constexpr int f() {
   // CHECK: i32 @_Z1fv()
   int(&&intu_rvref)[]{1, 2, 3, 4};
-  // CHECK: %{{.*}} = alloca [4 x i32]*
+  // CHECK: %{{.*}} = alloca ptr
   return intu_rvref[2];
 }
 

diff  --git a/clang/test/CodeGenCXX/pragma-loop-safety-imperfectly_nested.cpp b/clang/test/CodeGenCXX/pragma-loop-safety-imperfectly_nested.cpp
index 5ea2a6f33e4c2..99079f6c03673 100644
--- a/clang/test/CodeGenCXX/pragma-loop-safety-imperfectly_nested.cpp
+++ b/clang/test/CodeGenCXX/pragma-loop-safety-imperfectly_nested.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
 
 // Verify that the outer loop has the llvm.access.group property for the
 // accesses outside and inside the inner loop, even when the inner loop
@@ -15,12 +15,12 @@ void vectorize_imperfectly_nested_test(int *List, int Length) {
 }
 
 
-// CHECK: load i32, i32* %Length.addr, align 4, !llvm.access.group ![[ACCESS_GROUP_2:[0-9]+]]
+// CHECK: load i32, ptr %Length.addr, align 4, !llvm.access.group ![[ACCESS_GROUP_2:[0-9]+]]
 
 // CHECK: %[[MUL:.+]] = mul nsw i32 %add, 2
-// CHECK: store i32 %[[MUL]], i32* %{{.+}}, !llvm.access.group ![[ACCESS_GROUP_3:[0-9]+]]
+// CHECK: store i32 %[[MUL]], ptr %{{.+}}, !llvm.access.group ![[ACCESS_GROUP_3:[0-9]+]]
 // CHECK: br label %{{.+}}, !llvm.loop ![[INNER_LOOPID:[0-9]+]]
-// CHECK: store i32 21, i32* %{{.+}}, !llvm.access.group ![[ACCESS_GROUP_2]]
+// CHECK: store i32 21, ptr %{{.+}}, !llvm.access.group ![[ACCESS_GROUP_2]]
 // CHECK: br label %{{.+}}, !llvm.loop ![[OUTER_LOOPID:[0-9]+]]
 
 // CHECK: ![[ACCESS_GROUP_2]] = distinct !{}

diff  --git a/clang/test/CodeGenCXX/pragma-loop-safety-nested.cpp b/clang/test/CodeGenCXX/pragma-loop-safety-nested.cpp
index fb945bcd3a845..bb5df1de0ac08 100644
--- a/clang/test/CodeGenCXX/pragma-loop-safety-nested.cpp
+++ b/clang/test/CodeGenCXX/pragma-loop-safety-nested.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
 
 // Verify that the outer loop has the llvm.access.group property for the
 // accesses outside and inside the inner loop.
@@ -12,9 +12,9 @@ void vectorize_nested_test(int *List, int Length) {
 }
 
 
-// CHECK: load i32, i32* %Length.addr, align 4, !llvm.access.group ![[ACCESS_GROUP_2:[0-9]+]]
+// CHECK: load i32, ptr %Length.addr, align 4, !llvm.access.group ![[ACCESS_GROUP_2:[0-9]+]]
 // CHECK: %[[MUL:.+]] = mul
-// CHECK: store i32 %[[MUL]], i32* %{{.+}}, !llvm.access.group ![[ACCESS_GROUP_LIST_3:[0-9]+]]
+// CHECK: store i32 %[[MUL]], ptr %{{.+}}, !llvm.access.group ![[ACCESS_GROUP_LIST_3:[0-9]+]]
 // CHECK: br label %{{.+}}, !llvm.loop ![[INNER_LOOPID:[0-9]+]]
 // CHECK: br label %{{.+}}, !llvm.loop ![[OUTER_LOOPID:[0-9]+]]
 

diff  --git a/clang/test/CodeGenCXX/pragma-loop-safety-outer.cpp b/clang/test/CodeGenCXX/pragma-loop-safety-outer.cpp
index 9077b024b30f5..c467eb8e97659 100644
--- a/clang/test/CodeGenCXX/pragma-loop-safety-outer.cpp
+++ b/clang/test/CodeGenCXX/pragma-loop-safety-outer.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
 
 // Verify that the outer loop has the inner loop's access in its
 // llvm.loop.parallel_accesses property.
@@ -12,7 +12,7 @@ void vectorize_outer_test(int *List, int Length) {
 }
 
 // CHECK: %[[MUL:.+]] = mul
-// CHECK: store i32 %[[MUL]], i32* %{{.+}}, !llvm.access.group ![[ACCESS_GROUP_2:[0-9]+]]
+// CHECK: store i32 %[[MUL]], ptr %{{.+}}, !llvm.access.group ![[ACCESS_GROUP_2:[0-9]+]]
 // CHECK: br label %{{.+}}, !llvm.loop ![[INNER_LOOPID:[0-9]+]]
 // CHECK: br label %{{.+}}, !llvm.loop ![[OUTER_LOOPID:[0-9]+]]
 

diff  --git a/clang/test/CodeGenCXX/pragma-loop-safety.cpp b/clang/test/CodeGenCXX/pragma-loop-safety.cpp
index 5fc827f7b9261..db1b6769e0514 100644
--- a/clang/test/CodeGenCXX/pragma-loop-safety.cpp
+++ b/clang/test/CodeGenCXX/pragma-loop-safety.cpp
@@ -1,21 +1,21 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm -o - %s | FileCheck %s
 
 // Verify assume_safety vectorization is recognized.
 void vectorize_test(int *List, int Length) {
 // CHECK: define {{.*}} @_Z14vectorize_test
-// CHECK: [[LOAD1_IV:.+]] = load i32, i32* [[IV1:[^,]+]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_2:[0-9]+]]
-// CHECK-NEXT: [[LOAD1_LEN:.+]] = load i32, i32* [[LEN1:.+]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_2]]
+// CHECK: [[LOAD1_IV:.+]] = load i32, ptr [[IV1:[^,]+]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_2:[0-9]+]]
+// CHECK-NEXT: [[LOAD1_LEN:.+]] = load i32, ptr [[LEN1:.+]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_2]]
 // CHECK-NEXT: [[CMP1:.+]] = icmp slt i32[[LOAD1_IV]],[[LOAD1_LEN]]
 // CHECK-NEXT: br i1[[CMP1]], label %[[LOOP1_BODY:[^,]+]], label %[[LOOP1_END:[^,]+]]
 #pragma clang loop vectorize(assume_safety) interleave(disable) unroll(disable)
   for (int i = 0; i < Length; i++) {
-    // CHECK: [[RHIV1:.+]] = load i32, i32* [[IV1]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_2]]
+    // CHECK: [[RHIV1:.+]] = load i32, ptr [[IV1]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_2]]
     // CHECK-DAG: [[CALC1:.+]] = mul nsw i32[[RHIV1]], 2
-    // CHECK-DAG: [[SIV1:.+]] = load i32, i32* [[IV1]]{{.*}}!llvm.access.group ![[ACCESS_GROUP_2]]
+    // CHECK-DAG: [[SIV1:.+]] = load i32, ptr [[IV1]]{{.*}}!llvm.access.group ![[ACCESS_GROUP_2]]
     // CHECK-DAG: [[INDEX1:.+]] = sext i32[[SIV1]] to i64
-    // CHECK-DAG: [[ARRAY1:.+]] = load i32*, i32** [[LIST1:.*]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_2]]
-    // CHECK-DAG: [[PTR1:.+]] = getelementptr inbounds i32, i32*[[ARRAY1]], i64[[INDEX1]]
-    // CHECK: store i32[[CALC1]], i32*[[PTR1]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_2]]
+    // CHECK-DAG: [[ARRAY1:.+]] = load ptr, ptr [[LIST1:.*]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_2]]
+    // CHECK-DAG: [[PTR1:.+]] = getelementptr inbounds i32, ptr[[ARRAY1]], i64[[INDEX1]]
+    // CHECK: store i32[[CALC1]], ptr[[PTR1]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_2]]
     // CHECK-NEXT: br label [[LOOP1_INC:[^,]+]]
     List[i] = i * 2;
 
@@ -26,19 +26,19 @@ void vectorize_test(int *List, int Length) {
 // Verify assume_safety interleaving is recognized.
 void interleave_test(int *List, int Length) {
 // CHECK: define {{.*}} @_Z15interleave_test
-// CHECK: [[LOAD2_IV:.+]] = load i32, i32* [[IV2:[^,]+]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_8:[0-9]+]]
-// CHECK-NEXT: [[LOAD2_LEN:.+]] = load i32, i32* [[LEN2:.+]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_8]]
+// CHECK: [[LOAD2_IV:.+]] = load i32, ptr [[IV2:[^,]+]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_8:[0-9]+]]
+// CHECK-NEXT: [[LOAD2_LEN:.+]] = load i32, ptr [[LEN2:.+]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_8]]
 // CHECK-NEXT: [[CMP2:.+]] = icmp slt i32[[LOAD2_IV]],[[LOAD2_LEN]]
 // CHECK-NEXT: br i1[[CMP2]], label %[[LOOP2_BODY:[^,]+]], label %[[LOOP2_END:[^,]+]]
 #pragma clang loop interleave(assume_safety) vectorize(disable) unroll(disable)
   for (int i = 0; i < Length; i++) {
-    // CHECK: [[RHIV2:.+]] = load i32, i32* [[IV2]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_8]]
+    // CHECK: [[RHIV2:.+]] = load i32, ptr [[IV2]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_8]]
     // CHECK-DAG: [[CALC2:.+]] = mul nsw i32[[RHIV2]], 2
-    // CHECK-DAG: [[SIV2:.+]] = load i32, i32* [[IV2]]{{.*}}!llvm.access.group ![[ACCESS_GROUP_8]]
+    // CHECK-DAG: [[SIV2:.+]] = load i32, ptr [[IV2]]{{.*}}!llvm.access.group ![[ACCESS_GROUP_8]]
     // CHECK-DAG: [[INDEX2:.+]] = sext i32[[SIV2]] to i64
-    // CHECK-DAG: [[ARRAY2:.+]] = load i32*, i32** [[LIST2:.*]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_8]]
-    // CHECK-DAG: [[PTR2:.+]] = getelementptr inbounds i32, i32*[[ARRAY2]], i64[[INDEX2]]
-    // CHECK: store i32[[CALC2]], i32*[[PTR2]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_8]]
+    // CHECK-DAG: [[ARRAY2:.+]] = load ptr, ptr [[LIST2:.*]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_8]]
+    // CHECK-DAG: [[PTR2:.+]] = getelementptr inbounds i32, ptr[[ARRAY2]], i64[[INDEX2]]
+    // CHECK: store i32[[CALC2]], ptr[[PTR2]], {{.*}}!llvm.access.group ![[ACCESS_GROUP_8]]
     // CHECK-NEXT: br label [[LOOP2_INC:[^,]+]]
     List[i] = i * 2;
 

diff  --git a/clang/test/CodeGenCXX/pragma-pack-3.cpp b/clang/test/CodeGenCXX/pragma-pack-3.cpp
index 198f6664da372..a11d20764b1fa 100644
--- a/clang/test/CodeGenCXX/pragma-pack-3.cpp
+++ b/clang/test/CodeGenCXX/pragma-pack-3.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=i686-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=i686-apple-darwin10 -emit-llvm -o - | FileCheck %s
 
 struct Base {
   char a;
@@ -12,7 +12,7 @@ struct Derived_1 : virtual Base
 #pragma pack(1)
 struct Derived_2 : Derived_1 {
   // CHECK: %struct.Derived_2 = type { %struct.Derived_1.base, %struct.Base }
-  // CHECK: %struct.Derived_1.base = type <{ i32 (...)**, i8 }>
+  // CHECK: %struct.Derived_1.base = type <{ ptr, i8 }>
 };
 
 Derived_2 x;

diff  --git a/clang/test/CodeGenCXX/predefined-expr-sizeof.cpp b/clang/test/CodeGenCXX/predefined-expr-sizeof.cpp
index 5c5849f462628..a80ec8124ad77 100644
--- a/clang/test/CodeGenCXX/predefined-expr-sizeof.cpp
+++ b/clang/test/CodeGenCXX/predefined-expr-sizeof.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
 
-// CHECK: store i32 59, i32* %size
-// CHECK: store i32 65, i32* %size
+// CHECK: store i32 59, ptr %size
+// CHECK: store i32 65, ptr %size
 template<typename T>
 class TemplateClass {
 public:
@@ -10,8 +10,8 @@ class TemplateClass {
   }
 };
 
-// CHECK: store i32 35, i32* %size
-// CHECK: store i32 38, i32* %size
+// CHECK: store i32 35, ptr %size
+// CHECK: store i32 38, ptr %size
 template<typename T>
 void functionTemplate(T t) {
   int size = sizeof(__PRETTY_FUNCTION__);

diff  --git a/clang/test/CodeGenCXX/ps4-dllstorage-vtable-rtti.cpp b/clang/test/CodeGenCXX/ps4-dllstorage-vtable-rtti.cpp
index 77f0be81a6935..5724e78617df9 100644
--- a/clang/test/CodeGenCXX/ps4-dllstorage-vtable-rtti.cpp
+++ b/clang/test/CodeGenCXX/ps4-dllstorage-vtable-rtti.cpp
@@ -36,10 +36,10 @@
 // The two tests for each of these points are one for importing, and one for
 // exporting.
 
-// RUN: %clang_cc1 -no-opaque-pointers -I%S -fdeclspec -triple x86_64-unknown-windows-itanium -emit-llvm -o - %s -fhalf-no-semantic-interposition | FileCheck %s -check-prefix=WI
-// RUN: %clang_cc1 -no-opaque-pointers -I%S -fdeclspec -triple x86_64-scei-windows-itanium -emit-llvm -o - %s -fhalf-no-semantic-interposition | FileCheck %s --check-prefixes=PS4,SCEI_WI
-// RUN: %clang_cc1 -no-opaque-pointers -I%S -fdeclspec -triple x86_64-scei-ps4 -emit-llvm -o - %s -fhalf-no-semantic-interposition | FileCheck %s --check-prefixes=PS4,SCEI_PS4
-// RUN: %clang_cc1 -no-opaque-pointers -I%S -fdeclspec -triple x86_64-sie-ps5  -emit-llvm -o - %s -fhalf-no-semantic-interposition | FileCheck %s --check-prefixes=PS4,SCEI_PS4
+// RUN: %clang_cc1 -I%S -fdeclspec -triple x86_64-unknown-windows-itanium -emit-llvm -o - %s -fhalf-no-semantic-interposition | FileCheck %s -check-prefix=WI
+// RUN: %clang_cc1 -I%S -fdeclspec -triple x86_64-scei-windows-itanium -emit-llvm -o - %s -fhalf-no-semantic-interposition | FileCheck %s --check-prefixes=PS4,SCEI_WI
+// RUN: %clang_cc1 -I%S -fdeclspec -triple x86_64-scei-ps4 -emit-llvm -o - %s -fhalf-no-semantic-interposition | FileCheck %s --check-prefixes=PS4,SCEI_PS4
+// RUN: %clang_cc1 -I%S -fdeclspec -triple x86_64-sie-ps5  -emit-llvm -o - %s -fhalf-no-semantic-interposition | FileCheck %s --check-prefixes=PS4,SCEI_PS4
 
 #include <typeinfo>
 
@@ -49,7 +49,7 @@
 // (as described in the "Side note", above).
 //
 // PS4-DAG: @_ZTI10FullImport = {{.*}}dllimport
-// WI-DAG: @_ZTI10FullImport = external dllimport constant i8*
+// WI-DAG: @_ZTI10FullImport = external dllimport constant ptr
 struct __declspec(dllimport) FullImport
 {
   virtual void getId() {}
@@ -168,7 +168,7 @@ void FooExport::Bump()
 //
 // CHECK-PS4: @_ZTV11FooNoImport = external dso_local unnamed_addr constant {
 // CHECK-WI:  @_ZTV11FooNoImport = linkonce_odr dso_local unnamed_addr constant {
-// CHECK-PS4: @_ZTI11FooNoImport = external dso_local constant i8*{{$}}
+// CHECK-PS4: @_ZTI11FooNoImport = external dso_local constant ptr{{$}}
 // CHECK-WI:  @_ZTI11FooNoImport = linkonce_odr dso_local constant {
 struct FooNoImport
 {

diff  --git a/clang/test/CodeGenCXX/redefine_extname.cpp b/clang/test/CodeGenCXX/redefine_extname.cpp
index 01d2d1147fd29..d17235e230146 100644
--- a/clang/test/CodeGenCXX/redefine_extname.cpp
+++ b/clang/test/CodeGenCXX/redefine_extname.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple=i386-pc-solaris2.11 -w -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple=i386-pc-solaris2.11 -w -emit-llvm %s -o - | FileCheck %s
 
 extern "C" {
   struct statvfs64 {
@@ -13,7 +13,7 @@ void some_func() {
   statvfs64(&st);
 // Check that even if there is a structure with redefined name before the
 // pragma, subsequent function name redefined properly. PR5172, Comment 11.
-// CHECK:  call i32 @statvfs(%struct.statvfs64* noundef %st)
+// CHECK:  call i32 @statvfs(ptr noundef %st)
 }
 
 // This is a case when redefenition is deferred *and* we have a local of the

diff  --git a/clang/test/CodeGenCXX/reference-cast.cpp b/clang/test/CodeGenCXX/reference-cast.cpp
index ae1b8b7c4819c..e7b07365974d6 100644
--- a/clang/test/CodeGenCXX/reference-cast.cpp
+++ b/clang/test/CodeGenCXX/reference-cast.cpp
@@ -1,71 +1,71 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-apple-darwin10 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10 -o - %s | FileCheck %s
 
 // PR6024
 extern int i;
 
-// CHECK: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i32* @_Z16lvalue_noop_castv() [[NUW:#[0-9]+]]
+// CHECK: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z16lvalue_noop_castv() [[NUW:#[0-9]+]]
 const int &lvalue_noop_cast() {
   if (i == 0)
-    // CHECK: store i32 17, i32*
+    // CHECK: store i32 17, ptr
     return (const int&)17;
   else if (i == 1)
-    // CHECK: store i32 17, i32*
+    // CHECK: store i32 17, ptr
     return static_cast<const int&>(17);
-    // CHECK: store i32 17, i32*
+    // CHECK: store i32 17, ptr
   return 17;
 }
 
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i16* @_Z20lvalue_integral_castv() 
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z20lvalue_integral_castv() 
 const short &lvalue_integral_cast() {
   if (i == 0)
-    // CHECK: store i16 17, i16*
+    // CHECK: store i16 17, ptr
     return (const short&)17;
   else if (i == 1)
-    // CHECK: store i16 17, i16*
+    // CHECK: store i16 17, ptr
     return static_cast<const short&>(17);
-  // CHECK: store i16 17, i16*
+  // CHECK: store i16 17, ptr
   return 17;
 }
 
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i16* @_Z29lvalue_floating_integral_castv()
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z29lvalue_floating_integral_castv()
 const short &lvalue_floating_integral_cast() {
   if (i == 0)
-    // CHECK: store i16 17, i16*
+    // CHECK: store i16 17, ptr
     return (const short&)17.5;
   else if (i == 1)
-    // CHECK: store i16 17, i16*
+    // CHECK: store i16 17, ptr
     return static_cast<const short&>(17.5);
-  // CHECK: store i16 17, i16*
+  // CHECK: store i16 17, ptr
   return 17.5;
 }
 
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) float* @_Z29lvalue_integral_floating_castv()
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z29lvalue_integral_floating_castv()
 const float &lvalue_integral_floating_cast() {
   if (i == 0)
-    // CHECK: store float 1.700000e+{{0*}}1, float*
+    // CHECK: store float 1.700000e+{{0*}}1, ptr
     return (const float&)17;
   else if (i == 1)
-    // CHECK: store float 1.700000e+{{0*}}1, float*
+    // CHECK: store float 1.700000e+{{0*}}1, ptr
     return static_cast<const float&>(17);
-  // CHECK: store float 1.700000e+{{0*}}1, float*
+  // CHECK: store float 1.700000e+{{0*}}1, ptr
   return 17;
 }
 
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) float* @_Z20lvalue_floating_castv()
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z20lvalue_floating_castv()
 const float &lvalue_floating_cast() {
   if (i == 0)
-    // CHECK: store float 1.700000e+{{0*}}1, float*
+    // CHECK: store float 1.700000e+{{0*}}1, ptr
     return (const float&)17.0;
   else if (i == 1)
-    // CHECK: store float 1.700000e+{{0*}}1, float*
+    // CHECK: store float 1.700000e+{{0*}}1, ptr
     return static_cast<const float&>(17.0);
-  // CHECK: store float 1.700000e+{{0*}}1, float*
+  // CHECK: store float 1.700000e+{{0*}}1, ptr
   return 17.0;
 }
 
 int get_int();
 
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i8* @_Z24lvalue_integer_bool_castv()
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z24lvalue_integer_bool_castv()
 const bool &lvalue_integer_bool_cast() {
   if (i == 0)
     // CHECK: call noundef i32 @_Z7get_intv()
@@ -82,7 +82,7 @@ const bool &lvalue_integer_bool_cast() {
 
 float get_float();
 
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i8* @_Z25lvalue_floating_bool_castv()
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z25lvalue_floating_bool_castv()
 const bool &lvalue_floating_bool_cast() {
   if (i == 0)
     // CHECK: call noundef float @_Z9get_floatv()
@@ -107,39 +107,39 @@ typedef int (X::*pmf)(int);
 pm get_pointer_to_member_data();
 pmf get_pointer_to_member_function();
 
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i8* @_Z26lvalue_ptrmem_to_bool_castv()
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z26lvalue_ptrmem_to_bool_castv()
 const bool &lvalue_ptrmem_to_bool_cast() {
   if (i == 0)
     // CHECK: call i64 @_Z26get_pointer_to_member_datav()
     // CHECK: store i8
-    // CHECK: store i8*
+    // CHECK: store ptr
     return (const bool&)get_pointer_to_member_data();
   else if (i == 1)
     // CHECK: call i64 @_Z26get_pointer_to_member_datav()
     // CHECK: store i8
-    // CHECK: store i8*
+    // CHECK: store ptr
     return static_cast<const bool&>(get_pointer_to_member_data());
   // CHECK: call i64 @_Z26get_pointer_to_member_datav()
   // CHECK: store i8
-  // CHECK: store i8*
+  // CHECK: store ptr
   return get_pointer_to_member_data();
 }
 
-// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) i8* @_Z27lvalue_ptrmem_to_bool_cast2v
+// CHECK-LABEL: define{{.*}} nonnull align {{[0-9]+}} dereferenceable({{[0-9]+}}) ptr @_Z27lvalue_ptrmem_to_bool_cast2v
 const bool &lvalue_ptrmem_to_bool_cast2() {
   if (i == 0)
     // CHECK: {{call.*_Z30get_pointer_to_member_functionv}}
     // CHECK: store i8
-    // CHECK: store i8*
+    // CHECK: store ptr
     return (const bool&)get_pointer_to_member_function();
   else if (i == 1)
     // CHECK: {{call.*_Z30get_pointer_to_member_functionv}}
     // CHECK: store i8
-    // CHECK: store i8*
+    // CHECK: store ptr
     return static_cast<const bool&>(get_pointer_to_member_function());
   // CHECK: {{call.*_Z30get_pointer_to_member_functionv}}
   // CHECK: store i8
-  // CHECK: store i8*
+  // CHECK: store ptr
   return get_pointer_to_member_function();
 }
 
@@ -169,15 +169,15 @@ const _Complex float &f1() {
   return get_complex_double();
 }
 
-// CHECK-LABEL: define{{.*}} i32 @_Z7pr10592RKi(i32*
+// CHECK-LABEL: define{{.*}} i32 @_Z7pr10592RKi(ptr
 unsigned pr10592(const int &v) {
-  // CHECK: [[VADDR:%[a-zA-Z0-9.]+]] = alloca i32*
+  // CHECK: [[VADDR:%[a-zA-Z0-9.]+]] = alloca ptr
   // CHECK-NEXT: [[REFTMP:%[a-zA-Z0-9.]+]] = alloca i32
-  // CHECK-NEXT: store i32* [[V:%[a-zA-Z0-9.]+]], i32** [[VADDR]]
-  // CHECK-NEXT: [[VADDR_1:%[a-zA-Z0-9.]+]] = load i32*, i32** [[VADDR]]
-  // CHECK-NEXT: [[VVAL:%[a-zA-Z0-9.]+]] = load i32, i32* [[VADDR_1]]
-  // CHECK-NEXT: store i32 [[VVAL]], i32* [[REFTMP]]
-  // CHECK-NEXT: [[VVAL_I:%[a-zA-Z0-9.]+]] = load i32, i32* [[REFTMP]]
+  // CHECK-NEXT: store ptr [[V:%[a-zA-Z0-9.]+]], ptr [[VADDR]]
+  // CHECK-NEXT: [[VADDR_1:%[a-zA-Z0-9.]+]] = load ptr, ptr [[VADDR]]
+  // CHECK-NEXT: [[VVAL:%[a-zA-Z0-9.]+]] = load i32, ptr [[VADDR_1]]
+  // CHECK-NEXT: store i32 [[VVAL]], ptr [[REFTMP]]
+  // CHECK-NEXT: [[VVAL_I:%[a-zA-Z0-9.]+]] = load i32, ptr [[REFTMP]]
   // CHECK-NEXT: ret i32 [[VVAL_I]]
   return static_cast<const unsigned &>(v);
 }

diff  --git a/clang/test/CodeGenCXX/regcall.cpp b/clang/test/CodeGenCXX/regcall.cpp
index 6e6b3c17dc0fd..b47a2125d7873 100644
--- a/clang/test/CodeGenCXX/regcall.cpp
+++ b/clang/test/CodeGenCXX/regcall.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-gnu -emit-llvm -std=c++11     %s -o - | FileCheck -allow-deprecated-dag-overlap -check-prefix=CHECK-LIN -check-prefix=CHECK-LIN64 %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-linux-gnu -emit-llvm -std=c++11     %s -o -   | FileCheck -allow-deprecated-dag-overlap -check-prefix=CHECK-LIN -check-prefix=CHECK-LIN32 %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-msvc -emit-llvm -std=c++11  %s -o - -DWIN_TEST | FileCheck -allow-deprecated-dag-overlap -check-prefix=CHECK-WIN64 %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-windows-msvc -emit-llvm -std=c++11  %s -o - -DWIN_TEST   | FileCheck -allow-deprecated-dag-overlap -check-prefix=CHECK-WIN32 %s
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -emit-llvm -std=c++11     %s -o - | FileCheck -allow-deprecated-dag-overlap -check-prefix=CHECK-LIN -check-prefix=CHECK-LIN64 %s
+// RUN: %clang_cc1 -triple i386-linux-gnu -emit-llvm -std=c++11     %s -o -   | FileCheck -allow-deprecated-dag-overlap -check-prefix=CHECK-LIN -check-prefix=CHECK-LIN32 %s
+// RUN: %clang_cc1 -triple x86_64-windows-msvc -emit-llvm -std=c++11  %s -o - -DWIN_TEST | FileCheck -allow-deprecated-dag-overlap -check-prefix=CHECK-WIN64 %s
+// RUN: %clang_cc1 -triple i386-windows-msvc -emit-llvm -std=c++11  %s -o - -DWIN_TEST   | FileCheck -allow-deprecated-dag-overlap -check-prefix=CHECK-WIN32 %s
 
 int __regcall foo(int i);
 
@@ -37,8 +37,8 @@ class test_class {
   // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc void @_ZN10test_classC1Ev
   // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc void @_ZN10test_classC2Ev
   // Windows ignores calling convention on constructor/destructors.
-  // CHECK-WIN64-DAG: define linkonce_odr dso_local noundef %class.test_class* @"??0test_class@@QEAA at XZ"
-  // CHECK-WIN32-DAG: define linkonce_odr dso_local x86_thiscallcc noundef %class.test_class* @"??0test_class@@QAE at XZ"
+  // CHECK-WIN64-DAG: define linkonce_odr dso_local noundef ptr @"??0test_class@@QEAA at XZ"
+  // CHECK-WIN32-DAG: define linkonce_odr dso_local x86_thiscallcc noundef ptr @"??0test_class@@QAE at XZ"
 
 #ifndef WIN_TEST
   __regcall
@@ -53,9 +53,9 @@ class test_class {
   test_class& __regcall operator+=(const test_class&){
     return *this;
   }
-  // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc noundef nonnull align 4 dereferenceable(4) %class.test_class* @_ZN10test_classpLERKS_
-  // CHECK-WIN64-DAG: define linkonce_odr dso_local x86_regcallcc noundef nonnull align 4 dereferenceable(4) %class.test_class* @"??Ytest_class@@QEAwAEAV0 at AEBV0@@Z"
-  // CHECK-WIN32-DAG: define linkonce_odr dso_local x86_regcallcc noundef nonnull align 4 dereferenceable(4) %class.test_class* @"??Ytest_class@@QAwAAV0 at ABV0@@Z"
+  // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc noundef nonnull align 4 dereferenceable(4) ptr @_ZN10test_classpLERKS_
+  // CHECK-WIN64-DAG: define linkonce_odr dso_local x86_regcallcc noundef nonnull align 4 dereferenceable(4) ptr @"??Ytest_class@@QEAwAEAV0 at AEBV0@@Z"
+  // CHECK-WIN32-DAG: define linkonce_odr dso_local x86_regcallcc noundef nonnull align 4 dereferenceable(4) ptr @"??Ytest_class@@QAwAAV0 at ABV0@@Z"
   void __regcall do_thing(){}
   // CHECK-LIN-DAG: define linkonce_odr x86_regcallcc void @_ZN10test_class20__regcall3__do_thingEv
   // CHECK-WIN64-DAG: define linkonce_odr dso_local x86_regcallcc void @"?do_thing at test_class@@QEAwXXZ"
@@ -74,8 +74,8 @@ bool __regcall operator ==(const test_class&, const test_class&){ --x; return fa
 // CHECK-WIN32-DAG: define dso_local x86_regcallcc noundef zeroext i1 @"??8 at Yw_NABVtest_class@@0 at Z"
 
 test_class __regcall operator""_test_class (unsigned long long) { ++x; return test_class{};}
-// CHECK-LIN64-DAG: define{{.*}} x86_regcallcc void @_Zli11_test_classy(%class.test_class* noalias sret(%class.test_class) align 4 %agg.result, i64 noundef %0)
-// CHECK-LIN32-DAG: define{{.*}} x86_regcallcc void @_Zli11_test_classy(%class.test_class* inreg noalias sret(%class.test_class) align 4 %agg.result, i64 noundef %0)
+// CHECK-LIN64-DAG: define{{.*}} x86_regcallcc void @_Zli11_test_classy(ptr noalias sret(%class.test_class) align 4 %agg.result, i64 noundef %0)
+// CHECK-LIN32-DAG: define{{.*}} x86_regcallcc void @_Zli11_test_classy(ptr inreg noalias sret(%class.test_class) align 4 %agg.result, i64 noundef %0)
 // CHECK-WIN64-DAG: ??__K_test_class@@Yw?AVtest_class@@_K at Z"
 // CHECK-WIN32-DAG: ??__K_test_class@@Yw?AVtest_class@@_K at Z"
 
@@ -99,8 +99,8 @@ void force_gen() {
 long double _Complex __regcall foo(long double _Complex f) {
   return f;
 }
-// CHECK-LIN64-DAG: define{{.*}} x86_regcallcc void @_Z15__regcall3__fooCe({ x86_fp80, x86_fp80 }* noalias sret({ x86_fp80, x86_fp80 }) align 16 %agg.result, { x86_fp80, x86_fp80 }* noundef byval({ x86_fp80, x86_fp80 }) align 16 %f)
-// CHECK-LIN32-DAG: define{{.*}} x86_regcallcc void @_Z15__regcall3__fooCe({ x86_fp80, x86_fp80 }* inreg noalias sret({ x86_fp80, x86_fp80 }) align 4 %agg.result, { x86_fp80, x86_fp80 }* noundef byval({ x86_fp80, x86_fp80 }) align 4 %f)
+// CHECK-LIN64-DAG: define{{.*}} x86_regcallcc void @_Z15__regcall3__fooCe(ptr noalias sret({ x86_fp80, x86_fp80 }) align 16 %agg.result, ptr noundef byval({ x86_fp80, x86_fp80 }) align 16 %f)
+// CHECK-LIN32-DAG: define{{.*}} x86_regcallcc void @_Z15__regcall3__fooCe(ptr inreg noalias sret({ x86_fp80, x86_fp80 }) align 4 %agg.result, ptr noundef byval({ x86_fp80, x86_fp80 }) align 4 %f)
 // CHECK-WIN64-DAG: define dso_local x86_regcallcc noundef { double, double } @"?foo@@YwU?$_Complex at O@__clang@@U12@@Z"(double noundef %f.0, double noundef %f.1)
 // CHECK-WIN32-DAG: define dso_local x86_regcallcc noundef { double, double } @"?foo@@YwU?$_Complex at O@__clang@@U12@@Z"(double noundef %f.0, double noundef %f.1)
 

diff  --git a/clang/test/CodeGenCXX/regparm.cpp b/clang/test/CodeGenCXX/regparm.cpp
index 5bd9d5f8f702e..1fd471c2d0727 100644
--- a/clang/test/CodeGenCXX/regparm.cpp
+++ b/clang/test/CodeGenCXX/regparm.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown %s -emit-llvm -o - | FileCheck %s
 
 
-// CHECK: _Z3fooRi(i32* inreg
+// CHECK: _Z3fooRi(ptr inreg
 void __attribute__ ((regparm (1)))  foo(int &a) {
 }
 
@@ -11,7 +11,7 @@ struct S1 {
 };
 
 void __attribute__((regparm(3))) foo2(S1 a, int b);
-// CHECK: declare void @_Z4foo22S1i(%struct.S1* inreg noundef, i32 inreg noundef)
+// CHECK: declare void @_Z4foo22S1i(ptr inreg noundef, i32 inreg noundef)
 void bar2(S1 a, int b) {
   foo2(a, b);
 }
@@ -32,7 +32,7 @@ struct S3 {
   } a;
 };
 __attribute((regparm(2))) void foo4(S3 a, int b);
-// CHECK: declare void @_Z4foo42S3i(%struct.S3* noundef byval(%struct.S3) align 4, i32 inreg noundef)
+// CHECK: declare void @_Z4foo42S3i(ptr noundef byval(%struct.S3) align 4, i32 inreg noundef)
 void bar3(S3 a, int b) {
   foo4(a, b);
 }

diff  --git a/clang/test/CodeGenCXX/rtti-mingw64.cpp b/clang/test/CodeGenCXX/rtti-mingw64.cpp
index 7a3ba4912ebd2..e0a4607cf28c3 100644
--- a/clang/test/CodeGenCXX/rtti-mingw64.cpp
+++ b/clang/test/CodeGenCXX/rtti-mingw64.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-gnu %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-gnu %s -emit-llvm -o - | FileCheck %s
 struct A { int a; };
 struct B : virtual A { int b; };
 B b;
@@ -8,11 +8,11 @@ class C {
 C::~C() {}
 
 // CHECK: @_ZTI1C = linkonce_odr dso_local
-// CHECK: @_ZTI1B = linkonce_odr dso_local constant { i8*, i8*, i32, i32, i8*, i64 }
-// CHECK-SAME:  i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2) to i8*),
-// CHECK-SAME:  i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1B, i32 0, i32 0),
+// CHECK: @_ZTI1B = linkonce_odr dso_local constant { ptr, ptr, i32, i32, ptr, i64 }
+// CHECK-SAME:  ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv121__vmi_class_type_infoE, i64 2),
+// CHECK-SAME:  ptr @_ZTS1B,
 // CHECK-SAME:  i32 0,
 // CHECK-SAME:  i32 1,
-// CHECK-SAME:  i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*),
+// CHECK-SAME:  ptr @_ZTI1A,
 //    This i64 is important, it should be an i64, not an i32.
 // CHECK-SAME:  i64 -6141 }, comdat

diff  --git a/clang/test/CodeGenCXX/rtti-qualfn.cpp b/clang/test/CodeGenCXX/rtti-qualfn.cpp
index b7fe984d666cb..248a4511d185a 100644
--- a/clang/test/CodeGenCXX/rtti-qualfn.cpp
+++ b/clang/test/CodeGenCXX/rtti-qualfn.cpp
@@ -1,13 +1,13 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1z -I%S %s -triple x86_64-linux-gnu -emit-llvm -o - -fcxx-exceptions | FileCheck %s
+// RUN: %clang_cc1 -std=c++1z -I%S %s -triple x86_64-linux-gnu -emit-llvm -o - -fcxx-exceptions | FileCheck %s
 
 #include "typeinfo"
 
 struct A {};
 
-// CHECK-DAG: @_ZTIFvvE = linkonce_odr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv120__function_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @_ZTSFvvE, i32 0, i32 0) }, comdat
-// CHECK-DAG: @_ZTIPDoFvvE = linkonce_odr constant { i8*, i8*, i32, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv119__pointer_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @_ZTSPDoFvvE, i32 0, i32 0), i32 64, i8* bitcast ({ i8*, i8* }* @_ZTIFvvE to i8*) }, comdat
+// CHECK-DAG: @_ZTIFvvE = linkonce_odr constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv120__function_type_infoE, i64 2), ptr @_ZTSFvvE }, comdat
+// CHECK-DAG: @_ZTIPDoFvvE = linkonce_odr constant { ptr, ptr, i32, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv119__pointer_type_infoE, i64 2), ptr @_ZTSPDoFvvE, i32 64, ptr @_ZTIFvvE }, comdat
 auto &ti_noexcept_ptr = typeid(void (A::*)() noexcept);
-// CHECK-DAG: @_ZTIM1ADoFvvE = linkonce_odr constant { i8*, i8*, i32, i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv129__pointer_to_member_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @_ZTSM1ADoFvvE, i32 0, i32 0), i32 64, i8* bitcast ({ i8*, i8* }* @_ZTIFvvE to i8*), i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*) }, comdat
+// CHECK-DAG: @_ZTIM1ADoFvvE = linkonce_odr constant { ptr, ptr, i32, ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv129__pointer_to_member_type_infoE, i64 2), ptr @_ZTSM1ADoFvvE, i32 64, ptr @_ZTIFvvE, ptr @_ZTI1A }, comdat
 auto &ti_noexcept_memptr = typeid(void (A::*)() noexcept);
 
 // CHECK-LABEL: define{{.*}} void @_Z1fv(

diff  --git a/clang/test/CodeGenCXX/runtime-dllstorage.cpp b/clang/test/CodeGenCXX/runtime-dllstorage.cpp
index a65cfb7b6f7c8..c5d33f8e7466a 100644
--- a/clang/test/CodeGenCXX/runtime-dllstorage.cpp
+++ b/clang/test/CodeGenCXX/runtime-dllstorage.cpp
@@ -1,21 +1,21 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-msvc -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-MS -check-prefix CHECK-MS-DYNAMIC
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-msvc -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-MS -check-prefix CHECK-MS-STATIC
-
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-NODECL-IA
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-NODECL-IA
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -DIMPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-IMPORT-IA
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -DIMPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-IMPORT-IA
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -DEXPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -DEXPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -DDECL -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-DECL-IA
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -DDECL -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-DECL-IA
-// %clang_cc1 -no-opaque-pointers -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -fno-use-cxa-atexit -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-IA-ATEXIT
-// %clang_cc1 -no-opaque-pointers -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -fno-use-cxa-atexit -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-IA-ATEXIT
-
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-gnu -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-gnu -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-cygnus -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
-// RUN: %clang_cc1 -no-opaque-pointers -triple i686-windows-cygnus -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
+// RUN: %clang_cc1 -triple i686-windows-msvc -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-MS -check-prefix CHECK-MS-DYNAMIC
+// RUN: %clang_cc1 -triple i686-windows-msvc -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-MS -check-prefix CHECK-MS-STATIC
+
+// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-NODECL-IA
+// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-NODECL-IA
+// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -DIMPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-IMPORT-IA
+// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -DIMPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-IMPORT-IA
+// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -DEXPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA
+// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -DEXPORT_DECLARATIONS -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
+// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -DDECL -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-DECL-IA
+// RUN: %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -DDECL -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-DECL-IA
+// %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -fno-use-cxa-atexit -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-DYNAMIC-IA -check-prefix CHECK-DYNAMIC-IA-ATEXIT
+// %clang_cc1 -triple i686-windows-itanium -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -fno-use-cxa-atexit -emit-llvm -o - %s | FileCheck %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA -check-prefix CHECK-STATIC-IA-ATEXIT
+
+// RUN: %clang_cc1 -triple i686-windows-gnu -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
+// RUN: %clang_cc1 -triple i686-windows-gnu -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
+// RUN: %clang_cc1 -triple i686-windows-cygnus -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
+// RUN: %clang_cc1 -triple i686-windows-cygnus -std=c++11 -fdeclspec -fms-compatibility -fexceptions -fcxx-exceptions -flto-visibility-public-std -emit-llvm -o - %s | FileCheck -allow-deprecated-dag-overlap %s -check-prefix CHECK-IA -check-prefix CHECK-STATIC-IA
 
 #if defined(IMPORT_DECLARATIONS)
 namespace __cxxabiv1 {
@@ -106,52 +106,52 @@ void l() {
 }
 
 // CHECK-MS-DAG: @_Init_thread_epoch = external thread_local global i32
-// CHECK-MS-DAG: declare dso_local i32 @__tlregdtor(void ()*)
-// CHECK-MS-DAG: declare dso_local i32 @atexit(void ()*)
+// CHECK-MS-DAG: declare dso_local i32 @__tlregdtor(ptr)
+// CHECK-MS-DAG: declare dso_local i32 @atexit(ptr)
 // CHECK-MS-DYNAMIC-DAG: declare {{.*}} void @_CxxThrowException
 // CHECK-MS-STATIC-DAG: declare {{.*}} void @_CxxThrowException
-// CHECK-MS-DAG: declare dso_local noundef nonnull i8* @"??2 at YAPAXI@Z"
-// CHECK-MS-DAG: declare dso_local void @_Init_thread_header(i32*)
-// CHECK-MS-DAG: declare dso_local void @_Init_thread_footer(i32*)
+// CHECK-MS-DAG: declare dso_local noundef nonnull ptr @"??2 at YAPAXI@Z"
+// CHECK-MS-DAG: declare dso_local void @_Init_thread_header(ptr)
+// CHECK-MS-DAG: declare dso_local void @_Init_thread_footer(ptr)
 
-// CHECK-IA-DAG: @_ZTH1t = dso_local alias void (), void ()* @__tls_init
+// CHECK-IA-DAG: @_ZTH1t = dso_local alias void (), ptr @__tls_init
 // CHECK-IA-DAG: declare dso_local i32 @__gxx_personality_v0(...)
-// CHECK-IA-DAG: define linkonce_odr hidden void @__clang_call_terminate(i8* %0)
-
-// CHECK-DYNAMIC-IA-DAG: declare dllimport i32 @__cxa_thread_atexit(void (i8*)*, i8*, i8*)
-// CHECK-DYNAMIC-IA-DAG: declare dllimport i32 @__cxa_atexit(void (i8*)*, i8*, i8*)
-// CHECK-DYNAMIC-IA-DECL-DAG: declare i8* @__cxa_allocate_exception(i32 noundef)
-// CHECK-DYNAMIC-IA-NODECL-DAG: declare dllimport i8* @__cxa_allocate_exception(i32 noundef)
-// CHECK-DYNAMIC-IA-IMPORT-DAG: declare dllimport i8* @__cxa_allocate_exception(i32 noundef)
-// CHECK-DYNAMIC-IA-EXPORT-DAG: declare dllimport i8* @__cxa_allocate_exception(i32 noundef)
-// CHECK-DYNAMIC-IA-DAG: declare dllimport void @__cxa_throw(i8*, i8*, i8*)
-// CHECK-DYNAMIC-DECL-IA-DAG: declare dllimport i32 @__cxa_guard_acquire(i64*)
-// CHECK-DYNAMIC-NODECL-IA-DAG: declare dllimport i32 @__cxa_guard_acquire(i64*)
-// CHECK-DYNAMIC-IMPORT-IA-DAG: declare dllimport i32 @__cxa_guard_acquire(i64*)
-// CHECK-DYNAMIC-EXPORT-IA-DAG: declare dllexport i32 @__cxa_guard_acquire(i64*)
-// CHECK-IA-DAG: declare dso_local noundef nonnull i8* @_Znwj(i32 noundef)
-// CHECK-DYNAMIC-DECL-IA-DAG: declare dllimport void @__cxa_guard_release(i64*)
-// CHECK-DYNAMIC-NODECL-IA-DAG: declare dllimport void @__cxa_guard_release(i64*)
-// CHECK-DYNAMIC-IMPORT-IA-DAG: declare dllimport void @__cxa_guard_release(i64*)
-// CHECK-DYNAMIC-EXPORT-IA-DAG: declare dllimport void @__cxa_guard_release(i64*)
+// CHECK-IA-DAG: define linkonce_odr hidden void @__clang_call_terminate(ptr %0)
+
+// CHECK-DYNAMIC-IA-DAG: declare dllimport i32 @__cxa_thread_atexit(ptr, ptr, ptr)
+// CHECK-DYNAMIC-IA-DAG: declare dllimport i32 @__cxa_atexit(ptr, ptr, ptr)
+// CHECK-DYNAMIC-IA-DECL-DAG: declare ptr @__cxa_allocate_exception(i32 noundef)
+// CHECK-DYNAMIC-IA-NODECL-DAG: declare dllimport ptr @__cxa_allocate_exception(i32 noundef)
+// CHECK-DYNAMIC-IA-IMPORT-DAG: declare dllimport ptr @__cxa_allocate_exception(i32 noundef)
+// CHECK-DYNAMIC-IA-EXPORT-DAG: declare dllimport ptr @__cxa_allocate_exception(i32 noundef)
+// CHECK-DYNAMIC-IA-DAG: declare dllimport void @__cxa_throw(ptr, ptr, ptr)
+// CHECK-DYNAMIC-DECL-IA-DAG: declare dllimport i32 @__cxa_guard_acquire(ptr)
+// CHECK-DYNAMIC-NODECL-IA-DAG: declare dllimport i32 @__cxa_guard_acquire(ptr)
+// CHECK-DYNAMIC-IMPORT-IA-DAG: declare dllimport i32 @__cxa_guard_acquire(ptr)
+// CHECK-DYNAMIC-EXPORT-IA-DAG: declare dllexport i32 @__cxa_guard_acquire(ptr)
+// CHECK-IA-DAG: declare dso_local noundef nonnull ptr @_Znwj(i32 noundef)
+// CHECK-DYNAMIC-DECL-IA-DAG: declare dllimport void @__cxa_guard_release(ptr)
+// CHECK-DYNAMIC-NODECL-IA-DAG: declare dllimport void @__cxa_guard_release(ptr)
+// CHECK-DYNAMIC-IMPORT-IA-DAG: declare dllimport void @__cxa_guard_release(ptr)
+// CHECK-DYNAMIC-EXPORT-IA-DAG: declare dllimport void @__cxa_guard_release(ptr)
 // CHECK-DYANMIC-IA-DAG: declare dllimport void @_ZSt9terminatev()
 // CHECK-DYNAMIC-NODECL-IA-DAG: declare dso_local void @_ZSt9terminatev()
 // CHECK-DYNAMIC-IMPORT-IA-DAG: declare dllimport void @_ZSt9terminatev()
 // CHECK-DYNAMIC-EXPORT-IA-DAG: declare dso_local dllexport void @_ZSt9terminatev()
 
-// CHECK-STATIC-IA-DAG: declare dso_local i32 @__cxa_thread_atexit(void (i8*)*, i8*, i8*)
-// CHECK-STATIC-IA-DAG: declare dso_local i32 @__cxa_atexit(void (i8*)*, i8*, i8*)
-// CHECK-STATIC-IA-DAG: declare dso_local i8* @__cxa_allocate_exception(i32)
-// CHECK-STATIC-IA-DAG: declare dso_local void @__cxa_throw(i8*, i8*, i8*)
-// CHECK-STATIC-DECL-IA-DAG: declare dso_local i32 @__cxa_guard_acquire(i64*)
-// CHECK-STATIC-NODECL-IA-DAG: declare dso_local i32 @__cxa_guard_acquire(i64*)
-// CHECK-STATIC-IMPORT-IA-DAG: declare dso_local i32 @__cxa_guard_acquire(i64*)
-// CHECK-STATIC-EXPORT-IA-DAG: declare dso_local i32 @__cxa_guard_acquire(i64*)
-// CHECK-IA-DAG: declare dso_local noundef nonnull i8* @_Znwj(i32 noundef)
-// CHECK-STATIC-DECL-IA-DAG: declare dso_local void @__cxa_guard_release(i64*)
-// CHECK-STATIC-NODECL-IA-DAG: declare dso_local void @__cxa_guard_release(i64*)
-// CHECK-STATIC-IMPORT-IA-DAG: declare dso_local void @__cxa_guard_release(i64*)
-// CHECK-STATIC-EXPORT-IA-DAG: declare dso_local void @__cxa_guard_release(i64*)
+// CHECK-STATIC-IA-DAG: declare dso_local i32 @__cxa_thread_atexit(ptr, ptr, ptr)
+// CHECK-STATIC-IA-DAG: declare dso_local i32 @__cxa_atexit(ptr, ptr, ptr)
+// CHECK-STATIC-IA-DAG: declare dso_local ptr @__cxa_allocate_exception(i32)
+// CHECK-STATIC-IA-DAG: declare dso_local void @__cxa_throw(ptr, ptr, ptr)
+// CHECK-STATIC-DECL-IA-DAG: declare dso_local i32 @__cxa_guard_acquire(ptr)
+// CHECK-STATIC-NODECL-IA-DAG: declare dso_local i32 @__cxa_guard_acquire(ptr)
+// CHECK-STATIC-IMPORT-IA-DAG: declare dso_local i32 @__cxa_guard_acquire(ptr)
+// CHECK-STATIC-EXPORT-IA-DAG: declare dso_local i32 @__cxa_guard_acquire(ptr)
+// CHECK-IA-DAG: declare dso_local noundef nonnull ptr @_Znwj(i32 noundef)
+// CHECK-STATIC-DECL-IA-DAG: declare dso_local void @__cxa_guard_release(ptr)
+// CHECK-STATIC-NODECL-IA-DAG: declare dso_local void @__cxa_guard_release(ptr)
+// CHECK-STATIC-IMPORT-IA-DAG: declare dso_local void @__cxa_guard_release(ptr)
+// CHECK-STATIC-EXPORT-IA-DAG: declare dso_local void @__cxa_guard_release(ptr)
 // CHECK-STATIC-IA-DAG: declare dso_local void @_ZSt9terminatev()
 // CHECK-STATIC-NODECL-IA-DAG: declare dso_local void @_ZSt9terminatev()
 // CHECK-STATIC-IMPORT-IA-DAG: declare dso_local void @_ZSt9terminatev()

diff  --git a/clang/test/CodeGenCXX/runtimecc.cpp b/clang/test/CodeGenCXX/runtimecc.cpp
index 71df4ed3b546a..0c6a12f253325 100644
--- a/clang/test/CodeGenCXX/runtimecc.cpp
+++ b/clang/test/CodeGenCXX/runtimecc.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=armv7-apple-darwin10 -emit-llvm -o - -fexceptions -fcxx-exceptions | FileCheck %s
+// RUN: %clang_cc1 %s -triple=armv7-apple-darwin10 -emit-llvm -o - -fexceptions -fcxx-exceptions | FileCheck %s
 
 // Check that we annotate all compiler-synthesized runtime calls and
 // functions with the actual ABI-determined CC.  This usually doesn't
@@ -21,12 +21,12 @@ namespace test0 {
 
   A global;
 // CHECK-LABEL:    define internal void @__cxx_global_var_init()
-// CHECK:      call noundef [[A]]* @_ZN5test01AC1Ev([[A]]* {{[^,]*}} @_ZN5test06globalE)
-// CHECK-NEXT: call i32 @__cxa_atexit(void (i8*)* bitcast ([[A]]* ([[A]]*)* @_ZN5test01AD1Ev to void (i8*)*), i8* bitcast ([[A]]* @_ZN5test06globalE to i8*), i8* @__dso_handle) [[NOUNWIND:#[0-9]+]]
+// CHECK:      call noundef ptr @_ZN5test01AC1Ev(ptr {{[^,]*}} @_ZN5test06globalE)
+// CHECK-NEXT: call i32 @__cxa_atexit(ptr @_ZN5test01AD1Ev, ptr @_ZN5test06globalE, ptr @__dso_handle) [[NOUNWIND:#[0-9]+]]
 // CHECK-NEXT: ret void
 }
 
-// CHECK: declare i32 @__cxa_atexit(void (i8*)*, i8*, i8*) [[NOUNWIND]]
+// CHECK: declare i32 @__cxa_atexit(ptr, ptr, ptr) [[NOUNWIND]]
 
 namespace test1 {
   void test() {
@@ -34,16 +34,15 @@ namespace test1 {
   }
 
 // CHECK-LABEL:    define{{.*}} void @_ZN5test14testEv()
-// CHECK:      [[T0:%.*]] = call i8* @__cxa_allocate_exception(i32 4) [[NOUNWIND]]
-// CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to i32*
-// CHECK-NEXT: store i32 0, i32* [[T1]]
-// CHECK-NEXT: call void @__cxa_throw(i8* [[T0]], i8* bitcast (i8** @_ZTIi to i8*), i8* null) [[NORETURN:#[0-9]+]]
+// CHECK:      [[T0:%.*]] = call ptr @__cxa_allocate_exception(i32 4) [[NOUNWIND]]
+// CHECK-NEXT: store i32 0, ptr [[T0]]
+// CHECK-NEXT: call void @__cxa_throw(ptr [[T0]], ptr @_ZTIi, ptr null) [[NORETURN:#[0-9]+]]
 // CHECK-NEXT: unreachable
 }
 
-// CHECK: declare i8* @__cxa_allocate_exception(i32)
+// CHECK: declare ptr @__cxa_allocate_exception(i32)
 
-// CHECK: declare void @__cxa_throw(i8*, i8*, i8*)
+// CHECK: declare void @__cxa_throw(ptr, ptr, ptr)
 
 // CHECK-LABEL: define internal void @_GLOBAL__sub_I_runtimecc.cpp()
 // CHECK:   call void @__cxx_global_var_init()

diff  --git a/clang/test/CodeGenCXX/sanitize-dtor-trivial-base.cpp b/clang/test/CodeGenCXX/sanitize-dtor-trivial-base.cpp
index 07df5632c754b..c4062cff3d19f 100644
--- a/clang/test/CodeGenCXX/sanitize-dtor-trivial-base.cpp
+++ b/clang/test/CodeGenCXX/sanitize-dtor-trivial-base.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++11 -triple=x86_64-pc-linux -emit-llvm -debug-info-kind=line-tables-only -o - %s | FileCheck %s --implicit-check-not="call void @__sanitizer_"
-// RUN: %clang_cc1 -no-opaque-pointers -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++11 -triple=x86_64-pc-linux -emit-llvm -debug-info-kind=line-tables-only -o - %s | FileCheck %s --implicit-check-not="call void @__sanitizer_"
+// RUN: %clang_cc1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++11 -triple=x86_64-pc-linux -emit-llvm -debug-info-kind=line-tables-only -o - %s | FileCheck %s --implicit-check-not="call void @__sanitizer_"
+// RUN: %clang_cc1 -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++11 -triple=x86_64-pc-linux -emit-llvm -debug-info-kind=line-tables-only -o - %s | FileCheck %s --implicit-check-not="call void @__sanitizer_"
 
 // Base class has trivial dtor => complete dtor poisons base class memory directly.
 
@@ -19,7 +19,7 @@ Derived d;
 
 // Poison members, then poison the trivial base class.
 // CHECK-LABEL: define {{.*}}DerivedD2Ev
-// CHECK: %[[GEP:[0-9a-z]+]] = getelementptr i8, i8* {{.*}}, i64 16
+// CHECK: %[[GEP:[0-9a-z]+]] = getelementptr i8, ptr {{.*}}, i64 16
 // CHECK: call void @__sanitizer_dtor_callback_fields({{.*}}%[[GEP]], i64 4{{.*}}, !dbg ![[DI1:[0-9]+]]
 // CHECK: call void @__sanitizer_dtor_callback_fields({{.*}}, i64 16{{.*}}, !dbg ![[DI2:[0-9]+]]
 // CHECK: ret void

diff  --git a/clang/test/CodeGenCXX/sanitize-dtor-zero-size-field.cpp b/clang/test/CodeGenCXX/sanitize-dtor-zero-size-field.cpp
index 7aba27e6b8d19..41d4314e42037 100644
--- a/clang/test/CodeGenCXX/sanitize-dtor-zero-size-field.cpp
+++ b/clang/test/CodeGenCXX/sanitize-dtor-zero-size-field.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++20 -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s --implicit-check-not "call void @__sanitizer_dtor_callback_fields"
-// RUN: %clang_cc1 -no-opaque-pointers -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++20 -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s --implicit-check-not "call void @__sanitizer_dtor_callback_fields"
+// RUN: %clang_cc1 -O0 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++20 -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s --implicit-check-not "call void @__sanitizer_dtor_callback_fields"
+// RUN: %clang_cc1 -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-passes -std=c++20 -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s --implicit-check-not "call void @__sanitizer_dtor_callback_fields"
 
 struct Empty {};
 
@@ -30,7 +30,7 @@ struct Struct {
 static_assert(sizeof(Struct) == 16);
 } // namespace T0
 // CHECK-LABEL: define {{.*}} @_ZN2T06StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 13)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 13)
 // CHECK-NEXT:    ret void
 
 namespace empty {
@@ -45,7 +45,7 @@ static_assert(sizeof(Struct) == 24);
 } // namespace T1
 // CHECK-LABEL: define {{.*}} @_ZN5empty2T16StructD2Ev(
 // CHECK:         [[GEP:%.+]] = getelementptr i8, {{.*}}, i64 8{{$}}
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* [[GEP]], i64 13)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr [[GEP]], i64 13)
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
 // CHECK-NEXT:    ret void
 
@@ -60,10 +60,10 @@ static_assert(sizeof(Struct) == 24);
 } // namespace T2
 // CHECK-LABEL: define {{.*}} @_ZN5empty2T26StructD2Ev(
 // CHECK:         [[GEP1:%.+]] = getelementptr i8, {{.*}}, i64 16{{$}}
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* [[GEP1]], i64 5)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr [[GEP1]], i64 5)
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
 // CHECK:         [[GEP2:%.+]] = getelementptr i8, {{.*}}, i64 0{{$}}
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* [[GEP2]], i64 8)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr [[GEP2]], i64 8)
 // CHECK-NEXT:    ret void
 
 namespace T3 {
@@ -77,10 +77,10 @@ static_assert(sizeof(Struct) == 24);
 } // namespace T3
 // CHECK-LABEL: define {{.*}} @_ZN5empty2T36StructD2Ev(
 // CHECK:         [[GEP1:%.+]] = getelementptr i8, {{.*}}, i64 20{{$}}
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* [[GEP1]], i64 1)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr [[GEP1]], i64 1)
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
 // CHECK:         [[GEP2:%.+]] = getelementptr i8, {{.*}}, i64 0{{$}}
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* [[GEP2]], i64 12)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr [[GEP2]], i64 12)
 // CHECK-NEXT:    ret void
 
 namespace T4 {
@@ -93,7 +93,7 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T4
 // CHECK-LABEL: define {{.*}} @_ZN5empty2T46StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 16)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 16)
 // CHECK-NEXT:    ret void
 
 namespace T5 {
@@ -107,7 +107,7 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T5
 // CHECK-LABEL: define {{.*}} @_ZN5empty2T56StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 13)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 13)
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
 // CHECK-NEXT:    ret void
 
@@ -122,7 +122,7 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T6
 // CHECK-LABEL: define {{.*}} @_ZN5empty2T66StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 13)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 13)
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
 // CHECK-NEXT:    ret void
 
@@ -137,9 +137,9 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T7
 // CHECK-LABEL: define {{.*}} @_ZN5empty2T76StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 5)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 5)
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 8)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 8)
 // CHECK-NEXT:    ret void
 
 namespace T8 {
@@ -153,8 +153,8 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T8
 // CHECK-LABEL: define {{.*}} @_ZN5empty2T86StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 5)
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 8)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 5)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 8)
 // CHECK-NEXT:    ret void
 
 namespace T9 {
@@ -168,8 +168,8 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T9
 // CHECK-LABEL: define {{.*}} @_ZN5empty2T96StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 1)
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 12)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 1)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 12)
 // CHECK-NEXT:    ret void
 
 namespace T10 {
@@ -183,8 +183,8 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T10
 // CHECK-LABEL: define {{.*}} @_ZN5empty3T106StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 1)
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 12)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 1)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 12)
 // CHECK-NEXT:    ret void
 
 namespace T11 {
@@ -198,7 +198,7 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T11
 // CHECK-LABEL: define {{.*}} @_ZN5empty3T116StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 16)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 16)
 // CHECK-NEXT:    ret void
 
 namespace T12 {
@@ -214,7 +214,7 @@ static_assert(sizeof(Struct) == 24);
 } // namespace empty
 // CHECK-LABEL: define {{.*}} @_ZN5empty3T126StructD2Ev(
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 16)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 16)
 // CHECK-NEXT:    ret void
 
 namespace empty_non_trivial {
@@ -228,7 +228,7 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T1
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial2T16StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 13)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 13)
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
 // CHECK-NEXT:    ret void
 
@@ -242,8 +242,8 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T2
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial2T26StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 5)
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 8)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 5)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 8)
 // CHECK-NEXT:    ret void
 
 namespace T3 {
@@ -256,8 +256,8 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T3
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial2T36StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 1)
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 12)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 1)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 12)
 // CHECK-NEXT:    ret void
 
 namespace T4 {
@@ -270,7 +270,7 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T4
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial2T46StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 16)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 16)
 // CHECK-NEXT:    ret void
 
 namespace T5 {
@@ -284,7 +284,7 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T5
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial2T56StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 13)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 13)
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
 // CHECK:         call void @_ZN15EmptyNonTrivialD1Ev(
 // CHECK-NEXT:    ret void
@@ -300,7 +300,7 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T6
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial2T66StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 13)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 13)
 // CHECK:         call void @_ZN15EmptyNonTrivialD1Ev(
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
 // CHECK-NEXT:    ret void
@@ -316,10 +316,10 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T7
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial2T76StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 5)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 5)
 // CHECK:         call void @_ZN15EmptyNonTrivialD1Ev(
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 8)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 8)
 // CHECK-NEXT:    ret void
 
 namespace T8 {
@@ -333,9 +333,9 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T8
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial2T86StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 5)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 5)
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 8)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 8)
 // CHECK:         call void @_ZN15EmptyNonTrivialD1Ev(
 // CHECK-NEXT:    ret void
 
@@ -350,10 +350,10 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T9
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial2T96StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 1)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 1)
 // CHECK:         call void @_ZN15EmptyNonTrivialD1Ev(
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 12)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 12)
 // CHECK-NEXT:    ret void
 
 namespace T10 {
@@ -367,9 +367,9 @@ struct Struct {
 static_assert(sizeof(Struct) == 24);
 } // namespace T10
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial3T106StructD2Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 1)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 1)
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 12)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 12)
 // CHECK:         call void @_ZN15EmptyNonTrivialD1Ev(
 // CHECK-NEXT:    ret void
 
@@ -386,7 +386,7 @@ static_assert(sizeof(Struct) == 24);
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial3T116StructD2Ev(
 // CHECK:         call void @_ZN15EmptyNonTrivialD1Ev(
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 16)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 16)
 // CHECK-NEXT:    ret void
 
 namespace T12 {
@@ -402,6 +402,6 @@ static_assert(sizeof(Struct) == 24);
 } // namespace empty_non_trivial
 // CHECK-LABEL: define {{.*}} @_ZN17empty_non_trivial3T126StructD2Ev(
 // CHECK:         call void @_ZN10NonTrivialD1Ev(
-// CHECK:         call void @__sanitizer_dtor_callback_fields(i8* {{.*}}, i64 16)
+// CHECK:         call void @__sanitizer_dtor_callback_fields(ptr {{.*}}, i64 16)
 // CHECK:         call void @_ZN15EmptyNonTrivialD1Ev(
 // CHECK:         ret void

diff  --git a/clang/test/CodeGenCXX/sections.cpp b/clang/test/CodeGenCXX/sections.cpp
index a714dac7058ae..32e7d9402e316 100644
--- a/clang/test/CodeGenCXX/sections.cpp
+++ b/clang/test/CodeGenCXX/sections.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple i686-pc-win32 -fms-extensions -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple i686-pc-win32 -fms-extensions -o - %s | FileCheck %s
 
 extern "C" {
 
@@ -80,7 +80,7 @@ __declspec(allocate("short_section")) short short_var = 42;
 //CHECK: @a = dso_local global i32 1, section ".data"
 //CHECK: @b = dso_local constant i32 1, section ".my_const"
 //CHECK: @[[MYSTR:.*]] = {{.*}} unnamed_addr constant [11 x i8] c"my string!\00"
-//CHECK: @s = dso_local global i8* getelementptr inbounds ([11 x i8], [11 x i8]* @[[MYSTR]], i32 0, i32 0), section ".data2"
+//CHECK: @s = dso_local global ptr @[[MYSTR]], section ".data2"
 //CHECK: @c = dso_local global i32 1, section ".my_seg"
 //CHECK: @d = dso_local global i32 1, section ".data"
 //CHECK: @e = dso_local global i32 0, section ".my_bss"

diff  --git a/clang/test/CodeGenCXX/sizeof-unwind-exception.cpp b/clang/test/CodeGenCXX/sizeof-unwind-exception.cpp
index a492d33ed8821..4fb977a5367e7 100644
--- a/clang/test/CodeGenCXX/sizeof-unwind-exception.cpp
+++ b/clang/test/CodeGenCXX/sizeof-unwind-exception.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions %s -O2 -o - | FileCheck %s --check-prefix=X86-64
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions %s -O2 -o - | FileCheck %s --check-prefix=X86-32
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions %s -O2 -o - | FileCheck %s --check-prefix=ARM-DARWIN
-// RUN: %clang_cc1 -no-opaque-pointers -triple arm-unknown-gnueabi -emit-llvm -fcxx-exceptions -fexceptions %s -O2 -o - | FileCheck %s --check-prefix=ARM-EABI
-// RUN: %clang_cc1 -no-opaque-pointers -triple mipsel-unknown-unknown -emit-llvm -fcxx-exceptions -fexceptions %s -O2 -o - | FileCheck %s --check-prefix=MIPS
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions %s -O2 -o - | FileCheck %s --check-prefix=X86-64
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions %s -O2 -o - | FileCheck %s --check-prefix=X86-32
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions %s -O2 -o - | FileCheck %s --check-prefix=ARM-DARWIN
+// RUN: %clang_cc1 -triple arm-unknown-gnueabi -emit-llvm -fcxx-exceptions -fexceptions %s -O2 -o - | FileCheck %s --check-prefix=ARM-EABI
+// RUN: %clang_cc1 -triple mipsel-unknown-unknown -emit-llvm -fcxx-exceptions -fexceptions %s -O2 -o - | FileCheck %s --check-prefix=MIPS
 
 void foo();
 void test() {
@@ -15,16 +15,16 @@ void test() {
 
 // PR10789: 
diff erent platforms have 
diff erent sizes for struct UnwindException.
 
-// X86-64:          [[T0:%.*]] = tail call i8* @__cxa_begin_catch(i8* [[EXN:%.*]]) [[NUW:#[0-9]+]]
-// X86-64-NEXT:     [[T1:%.*]] = getelementptr i8, i8* [[EXN]], i64 32
-// X86-32:          [[T0:%.*]] = tail call i8* @__cxa_begin_catch(i8* [[EXN:%.*]]) [[NUW:#[0-9]+]]
-// X86-32-NEXT:     [[T1:%.*]] = getelementptr i8, i8* [[EXN]], i64 32
-// ARM-DARWIN:      [[T0:%.*]] = tail call i8* @__cxa_begin_catch(i8* [[EXN:%.*]]) [[NUW:#[0-9]+]]
-// ARM-DARWIN-NEXT: [[T1:%.*]] = getelementptr i8, i8* [[EXN]], i64 32
-// ARM-EABI:        [[T0:%.*]] = tail call i8* @__cxa_begin_catch(i8* [[EXN:%.*]]) [[NUW:#[0-9]+]]
-// ARM-EABI-NEXT:   [[T1:%.*]] = getelementptr i8, i8* [[EXN]], i32 88
-// MIPS:            [[T0:%.*]] = tail call i8* @__cxa_begin_catch(i8* [[EXN:%.*]]) [[NUW:#[0-9]+]]
-// MIPS-NEXT:       [[T1:%.*]] = getelementptr i8, i8* [[EXN]], i32 24
+// X86-64:          [[T0:%.*]] = tail call ptr @__cxa_begin_catch(ptr [[EXN:%.*]]) [[NUW:#[0-9]+]]
+// X86-64-NEXT:     [[T1:%.*]] = getelementptr i8, ptr [[EXN]], i64 32
+// X86-32:          [[T0:%.*]] = tail call ptr @__cxa_begin_catch(ptr [[EXN:%.*]]) [[NUW:#[0-9]+]]
+// X86-32-NEXT:     [[T1:%.*]] = getelementptr i8, ptr [[EXN]], i64 32
+// ARM-DARWIN:      [[T0:%.*]] = tail call ptr @__cxa_begin_catch(ptr [[EXN:%.*]]) [[NUW:#[0-9]+]]
+// ARM-DARWIN-NEXT: [[T1:%.*]] = getelementptr i8, ptr [[EXN]], i64 32
+// ARM-EABI:        [[T0:%.*]] = tail call ptr @__cxa_begin_catch(ptr [[EXN:%.*]]) [[NUW:#[0-9]+]]
+// ARM-EABI-NEXT:   [[T1:%.*]] = getelementptr i8, ptr [[EXN]], i32 88
+// MIPS:            [[T0:%.*]] = tail call ptr @__cxa_begin_catch(ptr [[EXN:%.*]]) [[NUW:#[0-9]+]]
+// MIPS-NEXT:       [[T1:%.*]] = getelementptr i8, ptr [[EXN]], i32 24
 
 // X86-64: attributes [[NUW]] = { nounwind }
 // X86-32: attributes [[NUW]] = { nounwind }

diff  --git a/clang/test/CodeGenCXX/skip-vtable-pointer-initialization.cpp b/clang/test/CodeGenCXX/skip-vtable-pointer-initialization.cpp
index 1b481e7bb9891..eb8f21b57aa7b 100644
--- a/clang/test/CodeGenCXX/skip-vtable-pointer-initialization.cpp
+++ b/clang/test/CodeGenCXX/skip-vtable-pointer-initialization.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
 
 // See Test9 for test description.
 // CHECK: @_ZTTN5Test91BE = linkonce_odr unnamed_addr constant
@@ -11,7 +11,7 @@ struct A {
 };
 
 // CHECK-LABEL: define{{.*}} void @_ZN5Test11AD2Ev
-// CHECK-NOT: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5Test11AE, i64 0, i64 2) to i32 (...)**), i32 (...)***
+// CHECK-NOT: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5Test11AE, i64 0, i64 2), ptr
 A::~A() 
 {
 }
@@ -27,7 +27,7 @@ struct A {
 };
 
 // CHECK-LABEL: define{{.*}} void @_ZN5Test21AD2Ev
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5Test21AE, i32 0, inrange i32 0, i32 2) to i32 (...)**), i32 (...)***
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5Test21AE, i32 0, inrange i32 0, i32 2), ptr
 A::~A() {
   f();
 }
@@ -50,7 +50,7 @@ struct A {
 };
 
 // CHECK-LABEL: define{{.*}} void @_ZN5Test31AD2Ev
-// CHECK-NOT: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5Test31AE, i32 0, inrange i32 0, i32 2) to i32 (...)**), i32 (...)***
+// CHECK-NOT: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5Test31AE, i32 0, inrange i32 0, i32 2), ptr
 A::~A() {
   
 }
@@ -76,7 +76,7 @@ struct A {
 };
 
 // CHECK-LABEL: define{{.*}} void @_ZN5Test41AD2Ev
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5Test41AE, i32 0, inrange i32 0, i32 2) to i32 (...)**), i32 (...)***
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5Test41AE, i32 0, inrange i32 0, i32 2), ptr
 A::~A()
 {
 }
@@ -100,7 +100,7 @@ struct A {
 };
 
 // CHECK-LABEL: define{{.*}} void @_ZN5Test51AD2Ev
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5Test51AE, i32 0, inrange i32 0, i32 2) to i32 (...)**), i32 (...)***
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5Test51AE, i32 0, inrange i32 0, i32 2), ptr
 A::~A()
 {
 }
@@ -128,7 +128,7 @@ struct A {
 };
 
 // CHECK-LABEL: define{{.*}} void @_ZN5Test61AD2Ev
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5Test61AE, i32 0, inrange i32 0, i32 2) to i32 (...)**), i32 (...)***
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5Test61AE, i32 0, inrange i32 0, i32 2), ptr
 A::~A()
 {
 }
@@ -154,7 +154,7 @@ struct A {
 };
 
 // CHECK-LABEL: define{{.*}} void @_ZN5Test71AD2Ev
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5Test71AE, i32 0, inrange i32 0, i32 2) to i32 (...)**), i32 (...)***
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5Test71AE, i32 0, inrange i32 0, i32 2), ptr
 A::~A()
 {
 }
@@ -180,7 +180,7 @@ struct A {
 };
 
 // CHECK-LABEL: define{{.*}} void @_ZN5Test81AD2Ev
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5Test81AE, i32 0, inrange i32 0, i32 2) to i32 (...)**), i32 (...)***
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5Test81AE, i32 0, inrange i32 0, i32 2), ptr
 A::~A()
 {
 }

diff  --git a/clang/test/CodeGenCXX/sparcv9-abi.cpp b/clang/test/CodeGenCXX/sparcv9-abi.cpp
index 3ac08ae029a45..2ff9559e6cb25 100644
--- a/clang/test/CodeGenCXX/sparcv9-abi.cpp
+++ b/clang/test/CodeGenCXX/sparcv9-abi.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple sparcv9-unknown-unknown -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple sparcv9-unknown-unknown -emit-llvm %s -o - | FileCheck %s
 
 struct pod {
   int a, b;
@@ -16,7 +16,7 @@ void f2(struct notpod);
 
 // CHECK-LABEL: caller
 // CHECK: call void @_Z2f13pod(i64
-// CHECK: call void @_Z2f26notpod(%struct.notpod*
+// CHECK: call void @_Z2f26notpod(ptr
 void caller()
 {
   pod p1;

diff  --git a/clang/test/CodeGenCXX/stack-reuse-miscompile.cpp b/clang/test/CodeGenCXX/stack-reuse-miscompile.cpp
index 3ee9fd8cb05d9..dbeea5e32cfb8 100644
--- a/clang/test/CodeGenCXX/stack-reuse-miscompile.cpp
+++ b/clang/test/CodeGenCXX/stack-reuse-miscompile.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple armv7l-unknown-linux-gnueabihf -emit-llvm -O1 -disable-llvm-passes -std=c++03 %s -o - | FileCheck %s --implicit-check-not=llvm.lifetime
+// RUN: %clang_cc1 -triple armv7l-unknown-linux-gnueabihf -emit-llvm -O1 -disable-llvm-passes -std=c++03 %s -o - | FileCheck %s --implicit-check-not=llvm.lifetime
 
 class S {
   char *ptr;
@@ -28,24 +28,21 @@ const char * f(S s)
 //
 // FIXME: We could defer starting the lifetime of the return object of concat
 // until the call.
-// CHECK: [[T1i8:%.*]] = bitcast %class.T* [[T1]] to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* [[T1i8]])
+// CHECK: call void @llvm.lifetime.start.p0(i64 16, ptr [[T1]])
 //
-// CHECK: [[T2i8:%.*]] = bitcast %class.T* [[T2]] to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* [[T2i8]])
-// CHECK: [[T4:%.*]] = call noundef %class.T* @_ZN1TC1EPKc(%class.T* {{[^,]*}} [[T2]], i8* noundef getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i32 0, i32 0))
+// CHECK: call void @llvm.lifetime.start.p0(i64 16, ptr [[T2]])
+// CHECK: [[T4:%.*]] = call noundef ptr @_ZN1TC1EPKc(ptr {{[^,]*}} [[T2]], ptr noundef @.str)
 //
-// CHECK: [[T3i8:%.*]] = bitcast %class.T* [[T3]] to i8*
-// CHECK: call void @llvm.lifetime.start.p0i8(i64 16, i8* [[T3i8]])
-// CHECK: [[T5:%.*]] = call noundef %class.T* @_ZN1TC1E1S(%class.T* {{[^,]*}} [[T3]], [2 x i32] %{{.*}})
+// CHECK: call void @llvm.lifetime.start.p0(i64 16, ptr [[T3]])
+// CHECK: [[T5:%.*]] = call noundef ptr @_ZN1TC1E1S(ptr {{[^,]*}} [[T3]], [2 x i32] %{{.*}})
 //
-// CHECK: call void @_ZNK1T6concatERKS_(%class.T* sret(%class.T) align 4 [[T1]], %class.T* {{[^,]*}} [[T2]], %class.T* noundef nonnull align 4 dereferenceable(16) [[T3]])
-// CHECK: [[T6:%.*]] = call noundef i8* @_ZNK1T3strEv(%class.T* {{[^,]*}} [[T1]])
+// CHECK: call void @_ZNK1T6concatERKS_(ptr sret(%class.T) align 4 [[T1]], ptr {{[^,]*}} [[T2]], ptr noundef nonnull align 4 dereferenceable(16) [[T3]])
+// CHECK: [[T6:%.*]] = call noundef ptr @_ZNK1T3strEv(ptr {{[^,]*}} [[T1]])
 //
-// CHECK: call void @llvm.lifetime.end.p0i8(
-// CHECK: call void @llvm.lifetime.end.p0i8(
-// CHECK: call void @llvm.lifetime.end.p0i8(
-// CHECK: ret i8* [[T6]]
+// CHECK: call void @llvm.lifetime.end.p0(
+// CHECK: call void @llvm.lifetime.end.p0(
+// CHECK: call void @llvm.lifetime.end.p0(
+// CHECK: ret ptr [[T6]]
 
   return T("[").concat(T(s)).str();
 }

diff  --git a/clang/test/CodeGenCXX/static-data-member-single-emission.cpp b/clang/test/CodeGenCXX/static-data-member-single-emission.cpp
index fe302f06bc433..781f5e4ec5744 100644
--- a/clang/test/CodeGenCXX/static-data-member-single-emission.cpp
+++ b/clang/test/CodeGenCXX/static-data-member-single-emission.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
 
 template <typename T>
 struct HasStaticInit {
@@ -23,9 +23,9 @@ void useit() {
 template struct HasStaticInit<int>;
 
 // There should only be one entry, not 3.
-// CHECK: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }]
+// CHECK: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }]
 
 // There should only be one update to @the_count.
-// CHECK-NOT: store i32 %{{.*}}, i32* @the_count
-// CHECK: store i32 %{{.*}}, i32* @the_count
-// CHECK-NOT: store i32 %{{.*}}, i32* @the_count
+// CHECK-NOT: store i32 %{{.*}}, ptr @the_count
+// CHECK: store i32 %{{.*}}, ptr @the_count
+// CHECK-NOT: store i32 %{{.*}}, ptr @the_count

diff  --git a/clang/test/CodeGenCXX/static-data-member.cpp b/clang/test/CodeGenCXX/static-data-member.cpp
index 2b1491418b1dc..b08fc55ce2f29 100644
--- a/clang/test/CodeGenCXX/static-data-member.cpp
+++ b/clang/test/CodeGenCXX/static-data-member.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -emit-llvm -o - %s | \
+// RUN: %clang_cc1 -triple x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -emit-llvm -o - %s | \
 // RUN: FileCheck --check-prefix=MACHO %s
 
 // CHECK: @_ZN5test11A1aE ={{.*}} constant i32 10, align 4
@@ -48,7 +48,7 @@ namespace test2 {
 
   // CHECK-LABEL: define internal void @__cxx_global_var_init()
   // CHECK:      [[TMP:%.*]] = call noundef i32 @_ZN5test23fooEv()
-  // CHECK-NEXT: store i32 [[TMP]], i32* @_ZN5test212_GLOBAL__N_11AIiE1xE, align 4
+  // CHECK-NEXT: store i32 [[TMP]], ptr @_ZN5test212_GLOBAL__N_11AIiE1xE, align 4
   // CHECK-NEXT: ret void
 }
 
@@ -67,12 +67,12 @@ namespace test3 {
   // CHECK-LABEL: define internal void @__cxx_global_var_init.1() {{.*}} comdat($_ZN5test31AIiE1xE)
   // MACHO-LABEL: define internal void @__cxx_global_var_init.1()
   // MACHO-NOT: comdat
-  // CHECK:      [[GUARDBYTE:%.*]] = load i8, i8* bitcast (i64* @_ZGVN5test31AIiE1xE to i8*)
+  // CHECK:      [[GUARDBYTE:%.*]] = load i8, ptr @_ZGVN5test31AIiE1xE
   // CHECK-NEXT: [[UNINITIALIZED:%.*]] = icmp eq i8 [[GUARDBYTE]], 0
   // CHECK-NEXT: br i1 [[UNINITIALIZED]]
   // CHECK:      [[TMP:%.*]] = call noundef i32 @_ZN5test33fooEv()
-  // CHECK-NEXT: store i32 [[TMP]], i32* @_ZN5test31AIiE1xE, align 4
-  // CHECK-NEXT: store i8 1, i8* bitcast (i64* @_ZGVN5test31AIiE1xE to i8*)
+  // CHECK-NEXT: store i32 [[TMP]], ptr @_ZN5test31AIiE1xE, align 4
+  // CHECK-NEXT: store i8 1, ptr @_ZGVN5test31AIiE1xE
   // CHECK-NEXT: br label
   // CHECK:      ret void
 }
@@ -104,7 +104,7 @@ namespace test5 {
   const int U::k1 = (k0 = 9, 42);
   const int U::k2;
 
-  // CHECK: store i32 9, i32* @_ZN5test51U2k0E
-  // CHECK: store i32 {{.*}}, i32* @_ZN5test51U2k1E
-  // CHECK-NOT: store {{.*}} i32* @_ZN5test51U2k2E
+  // CHECK: store i32 9, ptr @_ZN5test51U2k0E
+  // CHECK: store i32 {{.*}}, ptr @_ZN5test51U2k1E
+  // CHECK-NOT: store {{.*}} ptr @_ZN5test51U2k2E
 }

diff  --git a/clang/test/CodeGenCXX/static-destructor.cpp b/clang/test/CodeGenCXX/static-destructor.cpp
index 6a719b4bb9603..eea5a2e176553 100644
--- a/clang/test/CodeGenCXX/static-destructor.cpp
+++ b/clang/test/CodeGenCXX/static-destructor.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-pc-linux -emit-llvm -o - | FileCheck --check-prefix=X86 %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=wasm32 -emit-llvm -o - | FileCheck --check-prefix=WASM %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=armv7-apple-darwin9 -emit-llvm -o - | FileCheck --check-prefix=ARM %s
+// RUN: %clang_cc1 %s -triple=x86_64-pc-linux -emit-llvm -o - | FileCheck --check-prefix=X86 %s
+// RUN: %clang_cc1 %s -triple=wasm32 -emit-llvm -o - | FileCheck --check-prefix=WASM %s
+// RUN: %clang_cc1 %s -triple=armv7-apple-darwin9 -emit-llvm -o - | FileCheck --check-prefix=ARM %s
 
 // Test that destructors are not passed directly to __cxa_atexit when their
 // signatures do not match the type of its first argument.
@@ -17,17 +17,17 @@ Foo global;
 
 // X86 destructors have void return, and are registered directly with __cxa_atexit.
 // X86: define internal void @__cxx_global_var_init()
-// X86:   call i32 @__cxa_atexit(void (i8*)* bitcast (void (%class.Foo*)* @_ZN3FooD1Ev to void (i8*)*), i8* getelementptr inbounds (%class.Foo, %class.Foo* @global, i32 0, i32 0), i8* @__dso_handle)
+// X86:   call i32 @__cxa_atexit(ptr @_ZN3FooD1Ev, ptr @global, ptr @__dso_handle)
 
 // ARM destructors return this, but can be registered directly with __cxa_atexit
 // because the calling conventions tolerate the mismatch.
 // ARM: define internal void @__cxx_global_var_init()
-// ARM:   call i32 @__cxa_atexit(void (i8*)* bitcast (%class.Foo* (%class.Foo*)* @_ZN3FooD1Ev to void (i8*)*), i8* getelementptr inbounds (%class.Foo, %class.Foo* @global, i32 0, i32 0), i8* @__dso_handle)
+// ARM:   call i32 @__cxa_atexit(ptr @_ZN3FooD1Ev, ptr @global, ptr @__dso_handle)
 
 // Wasm destructors return this, and use a wrapper function, which is registered
 // with __cxa_atexit.
 // WASM: define internal void @__cxx_global_var_init()
-// WASM: call i32 @__cxa_atexit(void (i8*)* @__cxx_global_array_dtor, i8* null, i8* @__dso_handle)
+// WASM: call i32 @__cxa_atexit(ptr @__cxx_global_array_dtor, ptr null, ptr @__dso_handle)
 
-// WASM: define internal void @__cxx_global_array_dtor(i8* noundef %0)
-// WASM: %call = call noundef %class.Foo* @_ZN3FooD1Ev(%class.Foo* {{[^,]*}} @global)
+// WASM: define internal void @__cxx_global_array_dtor(ptr noundef %0)
+// WASM: %call = call noundef ptr @_ZN3FooD1Ev(ptr {{[^,]*}} @global)

diff  --git a/clang/test/CodeGenCXX/static-init-3.cpp b/clang/test/CodeGenCXX/static-init-3.cpp
index dbda21eec9710..3260ab1eb9a62 100644
--- a/clang/test/CodeGenCXX/static-init-3.cpp
+++ b/clang/test/CodeGenCXX/static-init-3.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple x86_64-apple-darwin10.0.0 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple x86_64-apple-darwin10.0.0 -o - %s | FileCheck %s
 
 // PR7050
 template<class T> struct X0 : public T { };
@@ -16,8 +16,8 @@ struct X1
     }
 };
 
-// CHECK: @_ZN2X1I2X2I1BEE8instanceE = linkonce_odr global %struct.X2* null, align 8
-// CHECJ: @_ZN2X1I2X2I1AEE8instanceE = linkonce_odr global %struct.X2* null, align 8
+// CHECK: @_ZN2X1I2X2I1BEE8instanceE = linkonce_odr global ptr null, align 8
+// CHECJ: @_ZN2X1I2X2I1AEE8instanceE = linkonce_odr global ptr null, align 8
 template<class T> T & X1<T>::instance = X1<T>::get();
 
 class A { };

diff  --git a/clang/test/CodeGenCXX/static-init-wasm.cpp b/clang/test/CodeGenCXX/static-init-wasm.cpp
index ad3361ef4b8bc..1406dcbd5ffc2 100644
--- a/clang/test/CodeGenCXX/static-init-wasm.cpp
+++ b/clang/test/CodeGenCXX/static-init-wasm.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple=wasm32-unknown-unknown -target-feature +atomics -target-feature +bulk-memory -o - %s \
+// RUN: %clang_cc1 -emit-llvm -triple=wasm32-unknown-unknown -target-feature +atomics -target-feature +bulk-memory -o - %s \
 // RUN:   | FileCheck %s -check-prefix=WEBASSEMBLY32
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple=wasm64-unknown-unknown -target-feature +atomics -target-feature +bulk-memory -o - %s \
+// RUN: %clang_cc1 -emit-llvm -triple=wasm64-unknown-unknown -target-feature +atomics -target-feature +bulk-memory -o - %s \
 // RUN:   | FileCheck %s -check-prefix=WEBASSEMBLY64
 
 // Test that we don't create common blocks.
@@ -17,7 +17,7 @@ void g() {
   static int a = f();
 }
 // WEBASSEMBLY32-LABEL: @_Z1gv()
-// WEBASSEMBLY32:       %[[R0:.+]] = load atomic i8, i8* bitcast (i32* @_ZGVZ1gvE1a to i8*) acquire, align 4
+// WEBASSEMBLY32:       %[[R0:.+]] = load atomic i8, ptr @_ZGVZ1gvE1a acquire, align 4
 // WEBASSEMBLY32-NEXT:  %[[R1:.+]] = and i8 %[[R0]], 1
 // WEBASSEMBLY32-NEXT:  %[[R2:.+]] = icmp eq i8 %[[R1]], 0
 // WEBASSEMBLY32-NEXT:  br i1 %[[R2]], label %[[CHECK:.+]], label %[[END:.+]],
@@ -27,7 +27,7 @@ void g() {
 // WEBASSEMBLY32:       call void @__cxa_guard_release
 //
 // WEBASSEMBLY64-LABEL: @_Z1gv()
-// WEBASSEMBLY64:       %[[R0:.+]] = load atomic i8, i8* bitcast (i64* @_ZGVZ1gvE1a to i8*) acquire, align 8
+// WEBASSEMBLY64:       %[[R0:.+]] = load atomic i8, ptr @_ZGVZ1gvE1a acquire, align 8
 // WEBASSEMBLY64-NEXT:  %[[R1:.+]] = and i8 %[[R0]], 1
 // WEBASSEMBLY64-NEXT:  %[[R2:.+]] = icmp eq i8 %[[R1]], 0
 // WEBASSEMBLY64-NEXT:  br i1 %[[R2]], label %[[CHECK:.+]], label %[[END:.+]],
@@ -44,22 +44,22 @@ struct A {
 A theA;
 
 // WEBASSEMBLY32: define internal void @__cxx_global_var_init() #3 {
-// WEBASSEMBLY32: call noundef %struct.A* @_ZN1AC1Ev(%struct.A* {{[^,]*}} @theA)
+// WEBASSEMBLY32: call noundef ptr @_ZN1AC1Ev(ptr {{[^,]*}} @theA)
 // WEBASSEMBLY32: define internal void @_GLOBAL__sub_I_static_init_wasm.cpp() #3 {
 // WEBASSEMBLY32: call void @__cxx_global_var_init()
 //
 // WEBASSEMBLY64: define internal void @__cxx_global_var_init() #3 {
-// WEBASSEMBLY64: call noundef %struct.A* @_ZN1AC1Ev(%struct.A* {{[^,]*}} @theA)
+// WEBASSEMBLY64: call noundef ptr @_ZN1AC1Ev(ptr {{[^,]*}} @theA)
 // WEBASSEMBLY64: define internal void @_GLOBAL__sub_I_static_init_wasm.cpp() #3 {
 // WEBASSEMBLY64: call void @__cxx_global_var_init()
 
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple=wasm32-unknown-unknown -target-feature +bulk-memory -o - %s \
+// RUN: %clang_cc1 -emit-llvm -triple=wasm32-unknown-unknown -target-feature +bulk-memory -o - %s \
 // RUN:   | FileCheck %s -check-prefix=NOATOMICS
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple=wasm64-unknown-unknown -target-feature +bulk-memory -o - %s \
+// RUN: %clang_cc1 -emit-llvm -triple=wasm64-unknown-unknown -target-feature +bulk-memory -o - %s \
 // RUN:   | FileCheck %s -check-prefix=NOATOMICS
 
 // NOATOMICS-LABEL: @_Z1gv()
-// NOATOMICS:       %[[R0:.+]] = load i8, i8* @_ZGVZ1gvE1a, align 1
+// NOATOMICS:       %[[R0:.+]] = load i8, ptr @_ZGVZ1gvE1a, align 1
 // NOATOMICS-NEXT:  %guard.uninitialized = icmp eq i8 %[[R0]], 0
 // NOATOMICS-NEXT:  br i1 %guard.uninitialized, label %[[CHECK:.+]], label %[[END:.+]],
 // NOATOMICS:       [[CHECK]]:
@@ -67,13 +67,13 @@ A theA;
 // NOATOMICS:       [[END]]:
 // NOATOMICS-NEXT:  ret void
 
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple=wasm32-unknown-unknown -target-feature +atomics -o - %s \
+// RUN: %clang_cc1 -emit-llvm -triple=wasm32-unknown-unknown -target-feature +atomics -o - %s \
 // RUN:   | FileCheck %s -check-prefix=NOBULKMEM
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple=wasm64-unknown-unknown -target-feature +atomics -o - %s \
+// RUN: %clang_cc1 -emit-llvm -triple=wasm64-unknown-unknown -target-feature +atomics -o - %s \
 // RUN:   | FileCheck %s -check-prefix=NOBULKMEM
 
 // NOBULKMEM-LABEL: @_Z1gv()
-// NOBULKMEM:       %[[R0:.+]] = load i8, i8* @_ZGVZ1gvE1a, align 1
+// NOBULKMEM:       %[[R0:.+]] = load i8, ptr @_ZGVZ1gvE1a, align 1
 // NOBULKMEM-NEXT:  %guard.uninitialized = icmp eq i8 %[[R0]], 0
 // NOBULKMEM-NEXT:  br i1 %guard.uninitialized, label %[[CHECK:.+]], label %[[END:.+]],
 // NOBULKMEM:       [[CHECK]]:

diff  --git a/clang/test/CodeGenCXX/static-initializer-branch-weights.cpp b/clang/test/CodeGenCXX/static-initializer-branch-weights.cpp
index 0955974b90b1d..121b9b2029959 100644
--- a/clang/test/CodeGenCXX/static-initializer-branch-weights.cpp
+++ b/clang/test/CodeGenCXX/static-initializer-branch-weights.cpp
@@ -1,34 +1,34 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -std=c++1z %s -o - -triple=x86_64-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -std=c++1z %s -o - -triple=x86_64-linux-gnu | FileCheck %s
 
 struct S { S(); ~S(); };
 
 // CHECK-LABEL: define {{.*}}global_var_init
 // CHECK-NOT: br
-// CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @global)
+// CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @global)
 S global;
 
 // CHECK-LABEL: define {{.*}}global_var_init
 // FIXME: Do we really need thread-safe initialization here? We don't run
 // global ctors on multiple threads. (If we were to do so, we'd need thread-safe
 // init for B<int>::member and B<int>::inline_member too.)
-// CHECK: load atomic i8, i8* bitcast (i64* @_ZGV13inline_global to i8*) acquire, align 8
+// CHECK: load atomic i8, ptr @_ZGV13inline_global acquire, align 8
 // CHECK: icmp eq i8 {{.*}}, 0
 // CHECK: br i1
 // CHECK-NOT: !prof
-// CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @inline_global)
+// CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @inline_global)
 inline S inline_global;
 
 // CHECK-LABEL: define {{.*}}global_var_init
 // CHECK-NOT: br
-// CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @thread_local_global)
+// CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @thread_local_global)
 thread_local S thread_local_global;
 
 // CHECK-LABEL: define {{.*}}global_var_init
-// CHECK: load i8, i8* bitcast (i64* @_ZGV26thread_local_inline_global to i8*)
+// CHECK: load i8, ptr @_ZGV26thread_local_inline_global
 // CHECK: icmp eq i8 {{.*}}, 0
 // CHECK: br i1
 // CHECK-NOT: !prof
-// CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @thread_local_inline_global)
+// CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @thread_local_inline_global)
 thread_local inline S thread_local_inline_global;
 
 struct A {
@@ -36,30 +36,30 @@ struct A {
   static thread_local S thread_local_member;
 
   // CHECK-LABEL: define {{.*}}global_var_init
-  // CHECK: load atomic i8, i8* bitcast (i64* @_ZGVN1A13inline_memberE to i8*) acquire, align 8
+  // CHECK: load atomic i8, ptr @_ZGVN1A13inline_memberE acquire, align 8
   // CHECK: icmp eq i8 {{.*}}, 0
   // CHECK: br i1
   // CHECK-NOT: !prof
-  // CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @_ZN1A13inline_memberE)
+  // CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @_ZN1A13inline_memberE)
   static inline S inline_member;
 
   // CHECK-LABEL: define {{.*}}global_var_init
-  // CHECK: load i8, i8* bitcast (i64* @_ZGVN1A26thread_local_inline_memberE to i8*)
+  // CHECK: load i8, ptr @_ZGVN1A26thread_local_inline_memberE
   // CHECK: icmp eq i8 {{.*}}, 0
   // CHECK: br i1
   // CHECK-NOT: !prof
-  // CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @_ZN1A26thread_local_inline_memberE)
+  // CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @_ZN1A26thread_local_inline_memberE)
   static thread_local inline S thread_local_inline_member;
 };
 
 // CHECK-LABEL: define{{.*}} void @_Z1fv()
 void f() {
-  // CHECK: load atomic i8, i8* bitcast (i64* @_ZGVZ1fvE12static_local to i8*) acquire, align 8
+  // CHECK: load atomic i8, ptr @_ZGVZ1fvE12static_local acquire, align 8
   // CHECK: icmp eq i8 {{.*}}, 0
   // CHECK: br i1 {{.*}}, !prof ![[WEIGHTS_LOCAL:[0-9]*]]
   static S static_local;
 
-  // CHECK: load i8, i8* @_ZGVZ1fvE19static_thread_local,
+  // CHECK: load i8, ptr @_ZGVZ1fvE19static_thread_local,
   // CHECK: icmp eq i8 {{.*}}, 0
   // CHECK: br i1 {{.*}}, !prof ![[WEIGHTS_THREAD_LOCAL:[0-9]*]]
   static thread_local S static_thread_local;
@@ -67,45 +67,45 @@ void f() {
 
 // CHECK-LABEL: define {{.*}}global_var_init
 // CHECK-NOT: br
-// CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @_ZN1A6memberE)
+// CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @_ZN1A6memberE)
 S A::member;
 
 // CHECK-LABEL: define {{.*}}global_var_init
 // CHECK-NOT: br
-// CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @_ZN1A19thread_local_memberE)
+// CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @_ZN1A19thread_local_memberE)
 thread_local S A::thread_local_member;
 
 template <typename T> struct B {
   // CHECK-LABEL: define {{.*}}global_var_init
-  // CHECK: load i8, i8* bitcast (i64* @_ZGVN1BIiE6memberE to i8*)
+  // CHECK: load i8, ptr @_ZGVN1BIiE6memberE
   // CHECK: icmp eq i8 {{.*}}, 0
   // CHECK: br i1
   // CHECK-NOT: !prof
-  // CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @_ZN1BIiE6memberE)
+  // CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @_ZN1BIiE6memberE)
   static S member;
 
   // CHECK-LABEL: define {{.*}}global_var_init
-  // CHECK: load i8, i8* bitcast (i64* @_ZGVN1BIiE13inline_memberE to i8*)
+  // CHECK: load i8, ptr @_ZGVN1BIiE13inline_memberE
   // CHECK: icmp eq i8 {{.*}}, 0
   // CHECK: br i1
   // CHECK-NOT: !prof
-  // CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @_ZN1BIiE13inline_memberE)
+  // CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @_ZN1BIiE13inline_memberE)
   static inline S inline_member;
 
   // CHECK-LABEL: define {{.*}}global_var_init
-  // CHECK: load i8, i8* bitcast (i64* @_ZGVN1BIiE19thread_local_memberE to i8*)
+  // CHECK: load i8, ptr @_ZGVN1BIiE19thread_local_memberE
   // CHECK: icmp eq i8 {{.*}}, 0
   // CHECK: br i1
   // CHECK-NOT: !prof
-  // CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @_ZN1BIiE19thread_local_memberE)
+  // CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @_ZN1BIiE19thread_local_memberE)
   static thread_local S thread_local_member;
 
   // CHECK-LABEL: define {{.*}}global_var_init
-  // CHECK: load i8, i8* bitcast (i64* @_ZGVN1BIiE26thread_local_inline_memberE to i8*)
+  // CHECK: load i8, ptr @_ZGVN1BIiE26thread_local_inline_memberE
   // CHECK: icmp eq i8 {{.*}}, 0
   // CHECK: br i1
   // CHECK-NOT: !prof
-  // CHECK: call void @_ZN1SC1Ev({{.*}}* {{[^,]*}} @_ZN1BIiE26thread_local_inline_memberE)
+  // CHECK: call void @_ZN1SC1Ev(ptr {{[^,]*}} @_ZN1BIiE26thread_local_inline_memberE)
   static thread_local inline S thread_local_inline_member;
 };
 template<typename T> S B<T>::member;
@@ -118,7 +118,7 @@ void use_b() {
 }
 
 // CHECK-LABEL: define {{.*}}tls_init()
-// CHECK: load i8, i8* @__tls_guard, align 1
+// CHECK: load i8, ptr @__tls_guard, align 1
 // CHECK: icmp eq i8 {{.*}}, 0
 // CHECK: br i1 {{.*}}, !prof ![[WEIGHTS_THREAD_LOCAL]]
 

diff  --git a/clang/test/CodeGenCXX/static-local-in-local-class.cpp b/clang/test/CodeGenCXX/static-local-in-local-class.cpp
index 74e9b17f1e424..dd760b4b529d5 100644
--- a/clang/test/CodeGenCXX/static-local-in-local-class.cpp
+++ b/clang/test/CodeGenCXX/static-local-in-local-class.cpp
@@ -1,10 +1,10 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux -fblocks -emit-llvm -o - %s -std=c++1y | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-linux -fblocks -emit-llvm -o - %s -std=c++1y | FileCheck %s
 
 // CHECK: @"_ZZZNK17pr18020_constexpr3$_1clEvENKUlvE_clEvE2l2" =
-// CHECK: internal global i32* @"_ZZNK17pr18020_constexpr3$_1clEvE2l1"
+// CHECK: internal global ptr @"_ZZNK17pr18020_constexpr3$_1clEvE2l1"
 // CHECK: @_ZZL14deduced_returnvE1n = internal global i32 42
 // CHECK: @_ZZZL20block_deduced_returnvEUb_E1n = internal global i32 42
-// CHECK: @_ZZ18static_local_labelPvE1q = linkonce_odr global i8* blockaddress(@_Z18static_local_labelPv, %{{.*}})
+// CHECK: @_ZZ18static_local_labelPvE1q = linkonce_odr global ptr blockaddress(@_Z18static_local_labelPv, %{{.*}})
 // CHECK: @"_ZZNK3$_2clEvE1x" = internal global i32 42
 
 namespace pr6769 {
@@ -56,7 +56,7 @@ int f() { return x()(); }
 }
 
 // CHECK-LABEL: define internal noundef i32 @"_ZZNK14pr18020_lambda3$_0clEvENKUlvE_clEv"
-// CHECK: load i32, i32* @"_ZZNK14pr18020_lambda3$_0clEvE2l1"
+// CHECK: load i32, ptr @"_ZZNK14pr18020_lambda3$_0clEvE2l1"
 
 namespace pr18020_constexpr {
 // Taking the address of l1 in a constant expression used to crash.
@@ -71,7 +71,7 @@ int f() { return x()(); }
 }
 
 // CHECK-LABEL: define internal noundef i32 @"_ZZNK17pr18020_constexpr3$_1clEvENKUlvE_clEv"
-// CHECK: load i32*, i32** @"_ZZZNK17pr18020_constexpr3$_1clEvENKUlvE_clEvE2l2"
+// CHECK: load ptr, ptr @"_ZZZNK17pr18020_constexpr3$_1clEvENKUlvE_clEvE2l2"
 
 // Lambda-less reduction that references l1 before emitting it.  This didn't
 // crash if you put it in a namespace.
@@ -88,7 +88,7 @@ static pr18020_class x;
 int pr18020_f() { return x()(); }
 
 // CHECK-LABEL: define linkonce_odr noundef i32 @_ZZN13pr18020_classclEvEN1UclEv
-// CHECK: load i32, i32* @_ZZN13pr18020_classclEvE2l1
+// CHECK: load i32, ptr @_ZZN13pr18020_classclEvE2l1
 
 // In this test case, the function containing the static local will not be
 // emitted because it is unneeded. However, the operator call of the inner class
@@ -103,12 +103,12 @@ extern "C" int call_deduced_return_operator() {
 }
 
 // CHECK-LABEL: define{{.*}} i32 @call_deduced_return_operator()
-// CHECK: call noundef i32* @_ZZL14deduced_returnvEN1SclEv(
-// CHECK: load i32, i32* %
+// CHECK: call noundef ptr @_ZZL14deduced_returnvEN1SclEv(
+// CHECK: load i32, ptr %
 // CHECK: ret i32 %
 
-// CHECK-LABEL: define internal noundef i32* @_ZZL14deduced_returnvEN1SclEv(%struct.S* {{[^,]*}} %this)
-// CHECK: ret i32* @_ZZL14deduced_returnvE1n
+// CHECK-LABEL: define internal noundef ptr @_ZZL14deduced_returnvEN1SclEv(ptr {{[^,]*}} %this)
+// CHECK: ret ptr @_ZZL14deduced_returnvE1n
 
 static auto block_deduced_return() {
   auto (^b)() = ^() {
@@ -123,12 +123,12 @@ extern "C" int call_block_deduced_return() {
 }
 
 // CHECK-LABEL: define{{.*}} i32 @call_block_deduced_return()
-// CHECK: call noundef i32* @_ZZZL20block_deduced_returnvEUb_EN1SclEv(
-// CHECK: load i32, i32* %
+// CHECK: call noundef ptr @_ZZZL20block_deduced_returnvEUb_EN1SclEv(
+// CHECK: load i32, ptr %
 // CHECK: ret i32 %
 
-// CHECK-LABEL: define internal noundef i32* @_ZZZL20block_deduced_returnvEUb_EN1SclEv(%struct.S.6* {{[^,]*}} %this) #1 align 2 {
-// CHECK: ret i32* @_ZZZL20block_deduced_returnvEUb_E1n
+// CHECK-LABEL: define internal noundef ptr @_ZZZL20block_deduced_returnvEUb_EN1SclEv(ptr {{[^,]*}} %this) #1 align 2 {
+// CHECK: ret ptr @_ZZZL20block_deduced_returnvEUb_E1n
 
 inline auto static_local_label(void *p) {
   if (p)
@@ -141,9 +141,9 @@ inline auto static_local_label(void *p) {
 }
 void *global_label = decltype(static_local_label(0))::get();
 
-// CHECK-LABEL: define linkonce_odr noundef i8* @_ZZ18static_local_labelPvEN1S3getEv()
-// CHECK: %[[lbl:[^ ]*]] = load i8*, i8** @_ZZ18static_local_labelPvE1q
-// CHECK: ret i8* %[[lbl]]
+// CHECK-LABEL: define linkonce_odr noundef ptr @_ZZ18static_local_labelPvEN1S3getEv()
+// CHECK: %[[lbl:[^ ]*]] = load ptr, ptr @_ZZ18static_local_labelPvE1q
+// CHECK: ret ptr %[[lbl]]
 
 auto global_lambda = []() {
   static int x = 42;
@@ -154,7 +154,7 @@ extern "C" int use_global_lambda() {
   return *decltype(global_lambda())::get();
 }
 // CHECK-LABEL: define{{.*}} i32 @use_global_lambda()
-// CHECK: call noundef i32* @"_ZZNK3$_2clEvEN1S3getEv"()
+// CHECK: call noundef ptr @"_ZZNK3$_2clEvEN1S3getEv"()
 
-// CHECK-LABEL: define internal noundef i32* @"_ZZNK3$_2clEvEN1S3getEv"()
-// CHECK: ret i32* @"_ZZNK3$_2clEvE1x"
+// CHECK-LABEL: define internal noundef ptr @"_ZZNK3$_2clEvEN1S3getEv"()
+// CHECK: ret ptr @"_ZZNK3$_2clEvE1x"

diff  --git a/clang/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp b/clang/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp
index e65139b05c695..de6e86fe56aa1 100644
--- a/clang/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp
+++ b/clang/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++1y -triple=x86_64-pc-linux -emit-llvm -o - | FileCheck --check-prefix=ELF --check-prefix=ALL %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++1y -triple=x86_64-apple-darwin -emit-llvm -o - | FileCheck --check-prefix=MACHO --check-prefix=ALL %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -std=c++1y -triple=x86_64-pc-linux -emit-llvm -fdeclspec -DSELECTANY -o - | FileCheck --check-prefix=ELF-SELECTANY %s
+// RUN: %clang_cc1 %s -std=c++1y -triple=x86_64-pc-linux -emit-llvm -o - | FileCheck --check-prefix=ELF --check-prefix=ALL %s
+// RUN: %clang_cc1 %s -std=c++1y -triple=x86_64-apple-darwin -emit-llvm -o - | FileCheck --check-prefix=MACHO --check-prefix=ALL %s
+// RUN: %clang_cc1 %s -std=c++1y -triple=x86_64-pc-linux -emit-llvm -fdeclspec -DSELECTANY -o - | FileCheck --check-prefix=ELF-SELECTANY %s
 
 #ifdef SELECTANY
 struct S {
@@ -10,8 +10,8 @@ struct S {
 
 int f();
 
-// ELF-SELECTANY: @llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @__cxx_global_var_init, i8* bitcast (i32* @selectany to i8*) }]
-// ELF-SELECTANY: @llvm.used = appending global [1 x i8*] [i8* bitcast (i32* @selectany to i8*)]
+// ELF-SELECTANY: @llvm.global_ctors = appending global [1 x { i32, ptr, ptr }] [{ i32, ptr, ptr } { i32 65535, ptr @__cxx_global_var_init, ptr @selectany }]
+// ELF-SELECTANY: @llvm.used = appending global [1 x ptr] [ptr @selectany]
 int __declspec(selectany) selectany = f();
 
 #else
@@ -29,32 +29,32 @@ template<> int A<char>::a;
 // ALL: @_ZN1AIbE1aE ={{.*}} global i32 10
 template<> int A<bool>::a = 10;
 
-// ALL: @llvm.global_ctors = appending global [8 x { i32, void ()*, i8* }]
+// ALL: @llvm.global_ctors = appending global [8 x { i32, ptr, ptr }]
 
-// ELF: [{ i32, void ()*, i8* } { i32 65535, void ()* @[[unordered1:[^,]*]], i8* bitcast (i32* @_ZN1AIsE1aE to i8*) },
-// MACHO: [{ i32, void ()*, i8* } { i32 65535, void ()* @[[unordered1:[^,]*]], i8* null },
+// ELF: [{ i32, ptr, ptr } { i32 65535, ptr @[[unordered1:[^,]*]], ptr @_ZN1AIsE1aE },
+// MACHO: [{ i32, ptr, ptr } { i32 65535, ptr @[[unordered1:[^,]*]], ptr null },
 
-// ELF:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered2:[^,]*]], i8* bitcast (i16* @_Z1xIsE to i8*) },
-// MACHO:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered2:[^,]*]], i8* null },
+// ELF:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered2:[^,]*]], ptr @_Z1xIsE },
+// MACHO:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered2:[^,]*]], ptr null },
 
-// ELF:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered3:[^,]*]], i8* bitcast (i32* @_ZN2ns1aIiE1iE to i8*) },
-// MACHO:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered3:[^,]*]], i8* null },
+// ELF:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered3:[^,]*]], ptr @_ZN2ns1aIiE1iE },
+// MACHO:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered3:[^,]*]], ptr null },
 
-// ELF:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered4:[^,]*]], i8* bitcast (i32* @_ZN2ns1b1iIiEE to i8*) },
-// MACHO:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered4:[^,]*]], i8* null },
+// ELF:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered4:[^,]*]], ptr @_ZN2ns1b1iIiEE },
+// MACHO:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered4:[^,]*]], ptr null },
 
-// ELF:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered5:[^,]*]], i8* bitcast (i32* @_ZN1AIvE1aE to i8*) },
-// MACHO:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered5:[^,]*]], i8* null },
+// ELF:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered5:[^,]*]], ptr @_ZN1AIvE1aE },
+// MACHO:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered5:[^,]*]], ptr null },
 
-// ELF:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered6:[^,]*]], i8* @_Z1xIcE },
-// MACHO:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered6:[^,]*]], i8* null },
+// ELF:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered6:[^,]*]], ptr @_Z1xIcE },
+// MACHO:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered6:[^,]*]], ptr null },
 
-// ALL:  { i32, void ()*, i8* } { i32 65535, void ()* @[[unordered7:[^,]*]], i8* null },
+// ALL:  { i32, ptr, ptr } { i32 65535, ptr @[[unordered7:[^,]*]], ptr null },
 
-// ALL:  { i32, void ()*, i8* } { i32 65535, void ()* @_GLOBAL__sub_I_static_member_variable_explicit_specialization.cpp, i8* null }]
+// ALL:  { i32, ptr, ptr } { i32 65535, ptr @_GLOBAL__sub_I_static_member_variable_explicit_specialization.cpp, ptr null }]
 
 /// llvm.used ensures SHT_INIT_ARRAY in a section group cannot be GCed.
-// ELF: @llvm.used = appending global [6 x i8*] [i8* bitcast (i32* @_ZN1AIsE1aE to i8*), i8* bitcast (i16* @_Z1xIsE to i8*), i8* bitcast (i32* @_ZN2ns1aIiE1iE to i8*), i8* bitcast (i32* @_ZN2ns1b1iIiEE to i8*), i8* bitcast (i32* @_ZN1AIvE1aE to i8*), i8* @_Z1xIcE]
+// ELF: @llvm.used = appending global [6 x ptr] [ptr @_ZN1AIsE1aE, ptr @_Z1xIsE, ptr @_ZN2ns1aIiE1iE, ptr @_ZN2ns1b1iIiEE, ptr @_ZN1AIvE1aE, ptr @_Z1xIcE]
 
 template int A<short>::a;  // Unordered
 int b = foo();

diff  --git a/clang/test/CodeGenCXX/std-byte.cpp b/clang/test/CodeGenCXX/std-byte.cpp
index 605c414680561..63f41e6f1e16a 100644
--- a/clang/test/CodeGenCXX/std-byte.cpp
+++ b/clang/test/CodeGenCXX/std-byte.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++1z -Werror -triple i386-unknown-unknown -emit-llvm -O1 -disable-llvm-passes -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++1z -Werror -triple i386-unknown-unknown -emit-llvm -O1 -disable-llvm-passes -o - %s | FileCheck %s
 
 // std::byte should be considered equivalent to char for aliasing.
 
@@ -8,10 +8,10 @@ enum byte : unsigned char {};
 
 // CHECK-LABEL: define{{.*}} void @test0(
 extern "C" void test0(std::byte *sb, int *i) {
-  // CHECK: store i8 0, i8* %{{.*}} !tbaa [[TAG_CHAR:!.*]]
+  // CHECK: store i8 0, ptr %{{.*}} !tbaa [[TAG_CHAR:!.*]]
   *sb = std::byte{0};
 
-  // CHECK: store i32 1, i32* %{{.*}} !tbaa [[TAG_INT:!.*]]
+  // CHECK: store i32 1, ptr %{{.*}} !tbaa [[TAG_INT:!.*]]
   *i = 1;
 }
 
@@ -30,7 +30,7 @@ extern "C" void test1(::byte *b, ::my::byte *mb, ::my::std::byte *msb) {
   *b = ::byte{0};
   *mb = ::my::byte{0};
   *msb = ::my::std::byte{0};
-  // CHECK-NOT: store i8 0, i8* %{{.*}} !tbaa [[TAG_CHAR]]
+  // CHECK-NOT: store i8 0, ptr %{{.*}} !tbaa [[TAG_CHAR]]
 }
 
 // CHECK:  !"any pointer", [[TYPE_CHAR:!.*]],

diff  --git a/clang/test/CodeGenCXX/stmtexpr.cpp b/clang/test/CodeGenCXX/stmtexpr.cpp
index 8f95e36b071b6..cc34613fe7ce3 100644
--- a/clang/test/CodeGenCXX/stmtexpr.cpp
+++ b/clang/test/CodeGenCXX/stmtexpr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -Wno-unused-value -triple i686-linux-gnu -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -Wno-unused-value -triple i686-linux-gnu -emit-llvm -o - %s | FileCheck %s
 // rdar: //8540501
 extern "C" int printf(...);
 extern "C" void abort();
@@ -101,13 +101,13 @@ extern "C" int cleanup_exit_scalar(bool b) {
 // CHECK: call {{.*}} @_ZN1AC1Ei
 //    Spill after bar.
 // CHECK: %[[v:[^ ]*]] = call{{.*}} i32 @_Z3bar1Ai({{.*}})
-// CHECK-NEXT: store i32 %[[v]], i32* %[[tmp:[^, ]*]]
+// CHECK-NEXT: store i32 %[[v]], ptr %[[tmp:[^, ]*]]
 //    Do cleanup.
 // CHECK: call {{.*}} @_ZN1AD1Ev
 // CHECK: switch
 //    Reload before v assignment.
-// CHECK: %[[v:[^ ]*]] = load i32, i32* %[[tmp]]
-// CHECK-NEXT: store i32 %[[v]], i32* %v
+// CHECK: %[[v:[^ ]*]] = load i32, ptr %[[tmp]]
+// CHECK-NEXT: store i32 %[[v]], ptr %v
 
 // No need to spill when the expression result is a constant, constants don't
 // have dominance problems.
@@ -117,7 +117,7 @@ extern "C" int cleanup_exit_scalar_constant(bool b) {
 }
 
 // CHECK-LABEL: define{{.*}} i32 @cleanup_exit_scalar_constant({{.*}})
-// CHECK: store i32 13, i32* %v
+// CHECK: store i32 13, ptr %v
 
 // Check for the same bug for lvalue expression evaluation kind.
 // FIXME: What about non-reference lvalues, like bitfield lvalues and vector
@@ -130,14 +130,14 @@ extern "C" int cleanup_exit_lvalue(bool cond) {
 // CHECK-LABEL: define{{.*}} i32 @cleanup_exit_lvalue({{.*}})
 // CHECK: call {{.*}} @_ZN1AC1Ei
 //    Spill after bar.
-// CHECK: %[[v:[^ ]*]] = call noundef nonnull align 4 dereferenceable(4) i32* @_Z6getrefv({{.*}})
-// CHECK-NEXT: store i32* %[[v]], i32** %[[tmp:[^, ]*]]
+// CHECK: %[[v:[^ ]*]] = call noundef nonnull align 4 dereferenceable(4) ptr @_Z6getrefv({{.*}})
+// CHECK-NEXT: store ptr %[[v]], ptr %[[tmp:[^, ]*]]
 //    Do cleanup.
 // CHECK: call {{.*}} @_ZN1AD1Ev
 // CHECK: switch
 //    Reload before v assignment.
-// CHECK: %[[v:[^ ]*]] = load i32*, i32** %[[tmp]]
-// CHECK-NEXT: store i32* %[[v]], i32** %r
+// CHECK: %[[v:[^ ]*]] = load ptr, ptr %[[tmp]]
+// CHECK-NEXT: store ptr %[[v]], ptr %r
 
 // Bind the reference to a byval argument. It is not an instruction or Constant,
 // so it's a bit of a corner case.
@@ -146,11 +146,11 @@ extern "C" int cleanup_exit_lvalue_byval(bool cond, ByVal arg) {
   ByVal &r = (A(1), ({ if (cond) return 0; (void)ByVal(); }), arg);
   return r.x[0];
 }
-// CHECK-LABEL: define{{.*}} i32 @cleanup_exit_lvalue_byval({{.*}}, %struct.ByVal* noundef byval(%struct.ByVal) align 4 %arg)
+// CHECK-LABEL: define{{.*}} i32 @cleanup_exit_lvalue_byval({{.*}}, ptr noundef byval(%struct.ByVal) align 4 %arg)
 // CHECK: call {{.*}} @_ZN1AC1Ei
 // CHECK: call {{.*}} @_ZN1AD1Ev
 // CHECK: switch
-// CHECK: store %struct.ByVal* %arg, %struct.ByVal** %r
+// CHECK: store ptr %arg, ptr %r
 
 // Bind the reference to a local variable. We don't need to spill it. Binding a
 // reference to it doesn't generate any instructions.
@@ -161,12 +161,12 @@ extern "C" int cleanup_exit_lvalue_local(bool cond) {
 }
 // CHECK-LABEL: define{{.*}} i32 @cleanup_exit_lvalue_local({{.*}})
 // CHECK: %local = alloca i32
-// CHECK: store i32 42, i32* %local
+// CHECK: store i32 42, ptr %local
 // CHECK: call {{.*}} @_ZN1AC1Ei
-// CHECK-NOT: store i32* %local
+// CHECK-NOT: store ptr %local
 // CHECK: call {{.*}} @_ZN1AD1Ev
 // CHECK: switch
-// CHECK: store i32* %local, i32** %r, align 4
+// CHECK: store ptr %local, ptr %r, align 4
 
 // We handle ExprWithCleanups for complex evaluation type separately, and it had
 // the same bug.
@@ -180,16 +180,16 @@ extern "C" int cleanup_exit_complex(bool b) {
 // CHECK: call {{.*}} @_ZN1AC1Ei
 //    Spill after bar.
 // CHECK: call {{.*}} @_Z11bar_complex1Ai({{.*}})
-// CHECK: store float %{{.*}}, float* %[[tmp1:[^, ]*]]
-// CHECK: store float %{{.*}}, float* %[[tmp2:[^, ]*]]
+// CHECK: store float %{{.*}}, ptr %[[tmp1:[^, ]*]]
+// CHECK: store float %{{.*}}, ptr %[[tmp2:[^, ]*]]
 //    Do cleanup.
 // CHECK: call {{.*}} @_ZN1AD1Ev
 // CHECK: switch
 //    Reload before v assignment.
-// CHECK: %[[v1:[^ ]*]] = load float, float* %[[tmp1]]
-// CHECK: %[[v2:[^ ]*]] = load float, float* %[[tmp2]]
-// CHECK: store float %[[v1]], float* %v.realp
-// CHECK: store float %[[v2]], float* %v.imagp
+// CHECK: %[[v1:[^ ]*]] = load float, ptr %[[tmp1]]
+// CHECK: %[[v2:[^ ]*]] = load float, ptr %[[tmp2]]
+// CHECK: store float %[[v1]], ptr %v.realp
+// CHECK: store float %[[v2]], ptr %v.imagp
 
 extern "C" void then(int);
 

diff  --git a/clang/test/CodeGenCXX/switch-case-folding-2.cpp b/clang/test/CodeGenCXX/switch-case-folding-2.cpp
index 5f5b6b5d31509..b46b983c5cc96 100644
--- a/clang/test/CodeGenCXX/switch-case-folding-2.cpp
+++ b/clang/test/CodeGenCXX/switch-case-folding-2.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | FileCheck %s
 
 extern int printf(const char*, ...);
 
@@ -8,7 +8,7 @@ int test(int val){
  case 4:
    do {
      switch (6) {
-       // CHECK: call noundef i32 (i8*, ...) @_Z6printfPKcz
+       // CHECK: call noundef i32 (ptr, ...) @_Z6printfPKcz
        case 6: do { case 5: printf("bad\n"); } while (0);
      };
    } while (0);
@@ -94,8 +94,8 @@ int hidden_var() {
   switch (1) {
   // CHECK: %[[N:.*]] = alloca i32
   case 0: int n;
-  // CHECK: store i32 0, i32* %[[N]]
-  // CHECK: load i32, i32* %[[N]]
+  // CHECK: store i32 0, ptr %[[N]]
+  // CHECK: load i32, ptr %[[N]]
   // CHECK: ret
   default: n = 0; return n;
   }

diff  --git a/clang/test/CodeGenCXX/temp-order.cpp b/clang/test/CodeGenCXX/temp-order.cpp
index 0a3e678b4a879..3650f33d21336 100644
--- a/clang/test/CodeGenCXX/temp-order.cpp
+++ b/clang/test/CodeGenCXX/temp-order.cpp
@@ -1,5 +1,5 @@
 // Output file should have no calls to error() with folding.
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown -mllvm -inline-threshold=1024 -O3 -emit-llvm -o %t %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -mllvm -inline-threshold=1024 -O3 -emit-llvm -o %t %s
 // RUN: FileCheck %s < %t
 
 static unsigned pow(unsigned Base, unsigned Power) {
@@ -157,47 +157,47 @@ extern "C" void print(const char *Name, unsigned N);
 #define ORDER5(a, b, c, d, e) (ORDER4(a, b, c, d) * pow(e, 5))
 #define ORDER6(a, b, c, d, e, f) (ORDER5(a, b, c, d, e) * pow(f, 6))
 void test() {
-// CHECK: call void @print(i8* noundef {{.*}}, i32 noundef 1176)
+// CHECK: call void @print(ptr noundef {{.*}}, i32 noundef 1176)
   print("f0", f0());
   if (f0() != ORDER3(3, 7, 2))
     error();
 
-// CHECK: call void @print(i8* noundef {{.*}}, i32 noundef 411600)
+// CHECK: call void @print(ptr noundef {{.*}}, i32 noundef 411600)
   print("f1", f1());
   if (f1() != ORDER4(3, 5, 7, 2))
     error();
 
-// CHECK: call void @print(i8* noundef {{.*}}, i32 noundef 246960)
+// CHECK: call void @print(ptr noundef {{.*}}, i32 noundef 246960)
   print("f2", f2());
   if (f2() != ORDER4(5, 3, 7, 2))
     error();
 
-// CHECK: call void @print(i8* noundef {{.*}}, i32 noundef 1341648)
+// CHECK: call void @print(ptr noundef {{.*}}, i32 noundef 1341648)
   print("f3", f3());
   if (f3() != ORDER4(7, 3, 11, 2))
     error();
 
-// CHECK: call void @print(i8* noundef {{.*}}, i32 noundef 1176)
+// CHECK: call void @print(ptr noundef {{.*}}, i32 noundef 1176)
   print("f4", f4());
   if (f4() != ORDER3(3, 7, 2))
     error();
 
-// CHECK: call void @print(i8* noundef {{.*}}, i32 noundef 246960)
+// CHECK: call void @print(ptr noundef {{.*}}, i32 noundef 246960)
   print("f5", f5());
   if (f5() != ORDER4(5, 3, 7, 2))
     error();
 
-// CHECK: call void @print(i8* noundef {{.*}}, i32 noundef 1251552576)
+// CHECK: call void @print(ptr noundef {{.*}}, i32 noundef 1251552576)
   print("f6", f6());
   if (f6() != ORDER6(3, 7, 11, 5, 13, 2))
     error();
 
-//  CHECK: call void @print(i8* noundef {{.*}}, i32 noundef 20)
+//  CHECK: call void @print(ptr noundef {{.*}}, i32 noundef 20)
   print("f7", f7());
   if (f7() != ORDER2(5, 2))
     error();
 
-//  CHECK: call void @print(i8* noundef {{.*}}, i32 noundef 20)
+//  CHECK: call void @print(ptr noundef {{.*}}, i32 noundef 20)
   print("f8", f8());
   if (f8() != ORDER2(5, 2))
     error();

diff  --git a/clang/test/CodeGenCXX/template-anonymous-types.cpp b/clang/test/CodeGenCXX/template-anonymous-types.cpp
index 45f6fe8abcd30..b124644246454 100644
--- a/clang/test/CodeGenCXX/template-anonymous-types.cpp
+++ b/clang/test/CodeGenCXX/template-anonymous-types.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple x86_64-unknown-linux-gnu -emit-llvm -w -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple x86_64-unknown-linux-gnu -emit-llvm -w -o - | FileCheck %s
 
 struct S {
   enum { FOO = 42 };
@@ -27,10 +27,10 @@ void test() {
   // Now check for the class template instantiations.
   //
   // BAR's instantiation of X:
-  // CHECK-LABEL: define linkonce_odr noundef i32 @_ZN1XIN1SUt_EE1fEv(%struct.X* {{[^,]*}} %this)
-  // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt_EEC2ES1_(%struct.X* {{[^,]*}} %this, i32 noundef %t) unnamed_addr
+  // CHECK-LABEL: define linkonce_odr noundef i32 @_ZN1XIN1SUt_EE1fEv(ptr {{[^,]*}} %this)
+  // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt_EEC2ES1_(ptr {{[^,]*}} %this, i32 noundef %t) unnamed_addr
   //
   // FOO's instantiation of X:
-  // CHECK-LABEL: define linkonce_odr noundef i32 @_ZN1XIN1SUt0_EE1fEv(%struct.X.0* {{[^,]*}} %this)
-  // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt0_EEC2ES1_(%struct.X.0* {{[^,]*}} %this, i32 noundef %t) unnamed_addr
+  // CHECK-LABEL: define linkonce_odr noundef i32 @_ZN1XIN1SUt0_EE1fEv(ptr {{[^,]*}} %this)
+  // CHECK-LABEL: define linkonce_odr void @_ZN1XIN1SUt0_EEC2ES1_(ptr {{[^,]*}} %this, i32 noundef %t) unnamed_addr
 }

diff  --git a/clang/test/CodeGenCXX/template-instantiation.cpp b/clang/test/CodeGenCXX/template-instantiation.cpp
index c677187d76916..15d409447c117 100644
--- a/clang/test/CodeGenCXX/template-instantiation.cpp
+++ b/clang/test/CodeGenCXX/template-instantiation.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -O1 -disable-llvm-passes -triple=x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -O1 -disable-llvm-passes -triple=x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - | FileCheck %s --check-prefix=CHECK2
+// RUN: %clang_cc1 %s -O1 -disable-llvm-passes -triple=x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -O1 -disable-llvm-passes -triple=x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - | FileCheck %s --check-prefix=CHECK2
 
 // Instantiation order varies on 
diff erent C++ dialects (IE, between C++98 and C++11).
 // CHECK-DAG: @_ZN7PR100011xE ={{.*}} global
@@ -18,7 +18,7 @@
 // CHECK2-NOT: _ZTVN5test31SIiEE
 // CHECK2-NOT: _ZTSN5test31SIiEE
 
-// CHECK-LABEL: define linkonce_odr void @_ZN5test21CIiEC1Ev(%"class.test2::C"* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN5test21CIiEC1Ev(ptr {{[^,]*}} %this) unnamed_addr
 // CHECK-LABEL: define linkonce_odr void @_ZN5test21CIiE6foobarIdEEvT_(
 // CHECK-LABEL: define available_externally void @_ZN5test21CIiE6zedbarEd(
 

diff  --git a/clang/test/CodeGenCXX/template-linkage.cpp b/clang/test/CodeGenCXX/template-linkage.cpp
index 8aebc99d25e93..fa6839d5bd44b 100644
--- a/clang/test/CodeGenCXX/template-linkage.cpp
+++ b/clang/test/CodeGenCXX/template-linkage.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
 
 // CHECK: Outer5Inner{{.*}}localE6memberE = external global
 
@@ -40,7 +40,7 @@ template<typename T> void X1<T>::blarg() { }
 extern template struct X0<char>;
 extern template struct X1<char>;
 
-// CHECK-LABEL: define linkonce_odr void @_ZN2X1IcED1Ev(%struct.X1* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN2X1IcED1Ev(ptr {{[^,]*}} %this) unnamed_addr
 void test_X1() {
   X1<char> i1c;
 }

diff  --git a/clang/test/CodeGenCXX/thinlto-distributed-type-metadata.cpp b/clang/test/CodeGenCXX/thinlto-distributed-type-metadata.cpp
index bf875403f8bc7..766591f510937 100644
--- a/clang/test/CodeGenCXX/thinlto-distributed-type-metadata.cpp
+++ b/clang/test/CodeGenCXX/thinlto-distributed-type-metadata.cpp
@@ -4,7 +4,7 @@
 
 // Ensure that a distributed backend invocation of ThinLTO lowers the type test
 // as expected.
-// RUN: %clang_cc1 -no-opaque-pointers -flto=thin -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm-bc -o %t.o %s
+// RUN: %clang_cc1 -flto=thin -flto-unit -triple x86_64-unknown-linux -fwhole-program-vtables -emit-llvm-bc -o %t.o %s
 // RUN: llvm-dis %t.o -o - | FileCheck --check-prefix=TT %s
 // RUN: llvm-lto -thinlto -o %t2 %t.o
 // RUN: %clang -target x86_64-unknown-linux -O2 -o %t3.o -x ir %t.o -c -fthinlto-index=%t2.thinlto.bc -save-temps=obj
@@ -21,7 +21,7 @@
 // OPT-NOT: @llvm.public.type.test
 // We should have only one @llvm.assume call, the one that was expanded
 // from the builtin in the IR below, not the one fed by the type test.
-// OPT: %cmp = icmp ne %struct.A* %{{.*}}, null
+// OPT: %cmp = icmp ne ptr %{{.*}}, null
 // OPT: void @llvm.assume(i1 %cmp)
 // Check after the builtin assume again that we don't have any type tests
 // OPT-NOT: @llvm.type.test

diff  --git a/clang/test/CodeGenCXX/this-nonnull.cpp b/clang/test/CodeGenCXX/this-nonnull.cpp
index f0a891f333215..d1f8e0b2e34a8 100644
--- a/clang/test/CodeGenCXX/this-nonnull.cpp
+++ b/clang/test/CodeGenCXX/this-nonnull.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -S -emit-llvm -o - -triple=x86_64-linux-gnu %s | FileCheck %s -check-prefix=CHECK-YES
-// RUN: %clang_cc1 -no-opaque-pointers -S -emit-llvm -o - -fno-delete-null-pointer-checks -triple=x86_64-linux-gnu %s | FileCheck %s -check-prefix=CHECK-NO
+// RUN: %clang_cc1 -S -emit-llvm -o - -triple=x86_64-linux-gnu %s | FileCheck %s -check-prefix=CHECK-YES
+// RUN: %clang_cc1 -S -emit-llvm -o - -fno-delete-null-pointer-checks -triple=x86_64-linux-gnu %s | FileCheck %s -check-prefix=CHECK-NO
 
 struct Struct {
   int many;
@@ -11,10 +11,10 @@ struct Struct {
 void TestReturnsVoid(Struct &s) {
   s.ReturnsVoid();
 
-  // CHECK-YES: call void @_ZN6Struct11ReturnsVoidEv(%struct.Struct* noundef nonnull align 4 dereferenceable(12) %0)
+  // CHECK-YES: call void @_ZN6Struct11ReturnsVoidEv(ptr noundef nonnull align 4 dereferenceable(12) %0)
   /// FIXME Use dereferenceable after dereferenceable respects NullPointerIsValid.
-  // CHECK-NO: call void @_ZN6Struct11ReturnsVoidEv(%struct.Struct* noundef align 4 dereferenceable_or_null(12) %0)
+  // CHECK-NO: call void @_ZN6Struct11ReturnsVoidEv(ptr noundef align 4 dereferenceable_or_null(12) %0)
 }
 
-// CHECK-YES: declare void @_ZN6Struct11ReturnsVoidEv(%struct.Struct* noundef nonnull align 4 dereferenceable(12))
-// CHECK-NO: declare void @_ZN6Struct11ReturnsVoidEv(%struct.Struct* noundef align 4 dereferenceable_or_null(12))
+// CHECK-YES: declare void @_ZN6Struct11ReturnsVoidEv(ptr noundef nonnull align 4 dereferenceable(12))
+// CHECK-NO: declare void @_ZN6Struct11ReturnsVoidEv(ptr noundef align 4 dereferenceable_or_null(12))

diff  --git a/clang/test/CodeGenCXX/thiscall-struct-return.cpp b/clang/test/CodeGenCXX/thiscall-struct-return.cpp
index 187ded3bb2a5e..c29ec56b41c1a 100644
--- a/clang/test/CodeGenCXX/thiscall-struct-return.cpp
+++ b/clang/test/CodeGenCXX/thiscall-struct-return.cpp
@@ -1,7 +1,7 @@
 // For MSVC ABI compatibility, all structures returned by value using the
 // thiscall calling convention must use the hidden parameter.
 //
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-PC-Win32 %s -fms-compatibility -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple i386-PC-Win32 %s -fms-compatibility -emit-llvm -o - | FileCheck %s
 
 // This structure would normally be returned via EAX
 struct S {
@@ -31,11 +31,11 @@ class C {
 
 // CHECK-LABEL: define{{.*}} void @_Z4testv()
 void test( void ) {
-// CHECK: call void @_ZN1CC1Ev(%class.C* {{[^,]*}} [[C:%.+]])
+// CHECK: call void @_ZN1CC1Ev(ptr {{[^,]*}} [[C:%.+]])
   C c;
 
-// CHECK: call x86_thiscallcc void @_ZNK1C5SmallEv(%struct.S* sret(%struct.S) align 4 %{{.+}}, %class.C* {{[^,]*}} [[C]])
+// CHECK: call x86_thiscallcc void @_ZNK1C5SmallEv(ptr sret(%struct.S) align 4 %{{.+}}, ptr {{[^,]*}} [[C]])
   (void)c.Small();
-// CHECK: call x86_thiscallcc void @_ZNK1C6MediumEv(%struct.M* sret(%struct.M) align 4 %{{.+}}, %class.C* {{[^,]*}} [[C]])
+// CHECK: call x86_thiscallcc void @_ZNK1C6MediumEv(ptr sret(%struct.M) align 4 %{{.+}}, ptr {{[^,]*}} [[C]])
   (void)c.Medium();
 }

diff  --git a/clang/test/CodeGenCXX/threadsafe-statics-exceptions.cpp b/clang/test/CodeGenCXX/threadsafe-statics-exceptions.cpp
index 0a13a5216c6a3..30199fd4c8602 100644
--- a/clang/test/CodeGenCXX/threadsafe-statics-exceptions.cpp
+++ b/clang/test/CodeGenCXX/threadsafe-statics-exceptions.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -o - -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 %s | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -o - -fcxx-exceptions -fexceptions -triple x86_64-apple-darwin10 %s | FileCheck %s
 
 struct X {
   X();
@@ -8,22 +8,22 @@ struct X {
 struct Y { };
 
 // CHECK-LABEL: define{{.*}} void @_Z1fv
-// CHECK-SAME:  personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+// CHECK-SAME:  personality ptr @__gxx_personality_v0
 void f() {
-  // CHECK: call i32 @__cxa_guard_acquire(i64* @_ZGVZ1fvE1x)
+  // CHECK: call i32 @__cxa_guard_acquire(ptr @_ZGVZ1fvE1x)
   // CHECK: invoke void @_ZN1XC1Ev
   // CHECK: call i32 @__cxa_atexit
-  // CHECK-NEXT: call void @__cxa_guard_release(i64* @_ZGVZ1fvE1x)
+  // CHECK-NEXT: call void @__cxa_guard_release(ptr @_ZGVZ1fvE1x)
   // CHECK: br
   static X x;
 
-  // CHECK: call i8* @__cxa_allocate_exception
+  // CHECK: call ptr @__cxa_allocate_exception
   // CHECK: call void @__cxa_throw
   throw Y();
 
   // Finally, the landing pad.
-  // CHECK: landingpad { i8*, i32 }
+  // CHECK: landingpad { ptr, i32 }
   // CHECK:   cleanup
-  // CHECK: call void @__cxa_guard_abort(i64* @_ZGVZ1fvE1x)
-  // CHECK: resume { i8*, i32 }
+  // CHECK: call void @__cxa_guard_abort(ptr @_ZGVZ1fvE1x)
+  // CHECK: resume { ptr, i32 }
 }

diff  --git a/clang/test/CodeGenCXX/thunk-returning-memptr.cpp b/clang/test/CodeGenCXX/thunk-returning-memptr.cpp
index 30c27a55b79cb..aaa5c8605f23e 100644
--- a/clang/test/CodeGenCXX/thunk-returning-memptr.cpp
+++ b/clang/test/CodeGenCXX/thunk-returning-memptr.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple=i686 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple=i686 -emit-llvm -o - %s | FileCheck %s
 
 
 struct X;
@@ -23,5 +23,5 @@ C::C() {}
 // Because of the tail call, the return value cannot be copied into a local
 // alloca. (PR39901)
 
-// CHECK-LABEL: define linkonce_odr void @_ZThn4_N1C1fEv({ i32, i32 }* noalias sret({ i32, i32 }) align 4 %agg.result, %struct.C* noundef %this)
-// CHECK: tail call void @_ZN1C1fEv({ i32, i32 }* sret({ i32, i32 }) align 4 %agg.result
+// CHECK-LABEL: define linkonce_odr void @_ZThn4_N1C1fEv(ptr noalias sret({ i32, i32 }) align 4 %agg.result, ptr noundef %this)
+// CHECK: tail call void @_ZN1C1fEv(ptr sret({ i32, i32 }) align 4 %agg.result

diff  --git a/clang/test/CodeGenCXX/thunks-ehspec.cpp b/clang/test/CodeGenCXX/thunks-ehspec.cpp
index 823e41ac50be1..4c95a47111408 100644
--- a/clang/test/CodeGenCXX/thunks-ehspec.cpp
+++ b/clang/test/CodeGenCXX/thunks-ehspec.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -fexceptions -fcxx-exceptions %s -triple=x86_64-pc-linux-gnu -funwind-tables=2 -emit-llvm -o - -O1 -disable-llvm-passes | FileCheck %s
+// RUN: %clang_cc1 -fexceptions -fcxx-exceptions %s -triple=x86_64-pc-linux-gnu -funwind-tables=2 -emit-llvm -o - -O1 -disable-llvm-passes | FileCheck %s
 
 // When generating the thunk for secondary, do not push terminate scopes for
 // either the varargs or non-varargs case. Related to PR44987.
@@ -17,13 +17,13 @@ class C : A, B {
 };
 void C::primary_key() {}
 
-// CHECK-LABEL: define available_externally void @_ZThn8_N1C9secondaryEv(%class.C* noundef %this) {{.*}} #2
+// CHECK-LABEL: define available_externally void @_ZThn8_N1C9secondaryEv(ptr noundef %this) {{.*}} #2
 // CHECK-NOT: invoke
-// CHECK: tail call void @_ZN1C9secondaryEv(%class.C* {{[^,]*}} %{{.*}})
+// CHECK: tail call void @_ZN1C9secondaryEv(ptr {{[^,]*}} %{{.*}})
 // CHECK-NOT: invoke
 // CHECK: ret void
 
-// CHECK-LABEL: define available_externally void @_ZThn8_N1C16secondary_varargEiz(%class.C* noundef %this, i32 noundef %0, ...) {{.*}} #2
+// CHECK-LABEL: define available_externally void @_ZThn8_N1C16secondary_varargEiz(ptr noundef %this, i32 noundef %0, ...) {{.*}} #2
 // CHECK-NOT: invoke
-// CHECK:  musttail call void (%class.C*, i32, ...) @_ZN1C16secondary_varargEiz(%class.C* {{[^,]*}} %{{.*}}, i32 noundef %{{.*}}, ...) #3
+// CHECK:  musttail call void (ptr, i32, ...) @_ZN1C16secondary_varargEiz(ptr {{[^,]*}} %{{.*}}, i32 noundef %{{.*}}, ...) #3
 // CHECK-NEXT:  ret void

diff  --git a/clang/test/CodeGenCXX/tls-init-funcs.cpp b/clang/test/CodeGenCXX/tls-init-funcs.cpp
index 28ee63b1d20fc..5f66f6f952596 100644
--- a/clang/test/CodeGenCXX/tls-init-funcs.cpp
+++ b/clang/test/CodeGenCXX/tls-init-funcs.cpp
@@ -1,18 +1,18 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.8 -std=c++1y -S -emit-llvm %s -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-windows-gnu -std=c++1y -S -emit-llvm %s -o - | FileCheck %s --check-prefix=MINGW
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.8 -std=c++1y -S -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-windows-gnu -std=c++1y -S -emit-llvm %s -o - | FileCheck %s --check-prefix=MINGW
 
 // CHECK: @a = internal thread_local global
 // CHECK: @_Z2vtIiE = linkonce_odr thread_local global i32 5
 // CHECK: @_ZZ3inlvE3loc = linkonce_odr thread_local global i32 0
 // CHECK: @_tlv_atexit({{.*}}@_ZN1AD1Ev
-// CHECK: call cxx_fast_tlscc i32* @_ZTW3ext()
-// CHECK: declare cxx_fast_tlscc noundef i32* @_ZTW3ext()
-// CHECK-DAG: define weak_odr hidden cxx_fast_tlscc noundef i32* @_ZTW2vtIiE()
-// CHECK-DAG: define weak_odr hidden cxx_fast_tlscc noundef i32* @_ZTW2vtIvE()
+// CHECK: call cxx_fast_tlscc ptr @_ZTW3ext()
+// CHECK: declare cxx_fast_tlscc noundef ptr @_ZTW3ext()
+// CHECK-DAG: define weak_odr hidden cxx_fast_tlscc noundef ptr @_ZTW2vtIiE()
+// CHECK-DAG: define weak_odr hidden cxx_fast_tlscc noundef ptr @_ZTW2vtIvE()
 // CHECK-DAG: define {{.*}} @_ZTW1a
 
-// MINGW-DAG: define weak_odr hidden noundef i32* @_ZTW2vtIiE() {{.*}} comdat
-// MINGW-DAG: define weak_odr hidden noundef i32* @_ZTW2vtIvE() {{.*}} comdat
+// MINGW-DAG: define weak_odr hidden noundef ptr @_ZTW2vtIiE() {{.*}} comdat
+// MINGW-DAG: define weak_odr hidden noundef ptr @_ZTW2vtIvE() {{.*}} comdat
 
 struct A {
   ~A();

diff  --git a/clang/test/CodeGenCXX/type-cache-3.cpp b/clang/test/CodeGenCXX/type-cache-3.cpp
index 9835de51502bb..cc54849bb9288 100644
--- a/clang/test/CodeGenCXX/type-cache-3.cpp
+++ b/clang/test/CodeGenCXX/type-cache-3.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple i386-pc-windows-msvc19.16.0 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple i386-pc-windows-msvc19.16.0 | FileCheck %s
 // REQUIRES: asserts, x86-registered-target
 
 // CHECK-LABEL: define {{.*}}@"?f@@YAXXZ"(
 // CHECK: call void @"?dc at z@@SAXU1@@Z"
 
 // CHECK-LABEL: define {{.*}}@"?dc at z@@SAXU1@@Z"(
-// CHECK: store void ({}*)* %{{.*}}, void ({}*)** %{{.*}}
+// CHECK: store ptr %{{.*}}, ptr %{{.*}}
 struct z {
   static void dc(z) {}
   void (*p)(z);

diff  --git a/clang/test/CodeGenCXX/type-cache.cpp b/clang/test/CodeGenCXX/type-cache.cpp
index d3d21b7c5904d..191b769ff8f52 100644
--- a/clang/test/CodeGenCXX/type-cache.cpp
+++ b/clang/test/CodeGenCXX/type-cache.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple i386-pc-windows-msvc19.16.0 | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple i386-pc-windows-msvc19.16.0 | FileCheck %s
 // REQUIRES: asserts, x86-registered-target
 
-// CHECK: call {}* @"?f@@YA?AUz@@XZ"()
+// CHECK: call ptr @"?f@@YA?AUz@@XZ"()
 
 struct z {
   z (*p)();

diff  --git a/clang/test/CodeGenCXX/typeid.cpp b/clang/test/CodeGenCXX/typeid.cpp
index d3ce615d3e076..0c6f0367948e9 100644
--- a/clang/test/CodeGenCXX/typeid.cpp
+++ b/clang/test/CodeGenCXX/typeid.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s
+// RUN: %clang_cc1 -I%S %s -triple x86_64-apple-darwin10 -emit-llvm -fcxx-exceptions -fexceptions -o - | FileCheck %s
 #include <typeinfo>
 
 namespace Test1 {
@@ -6,20 +6,20 @@ namespace Test1 {
 // PR7400
 struct A { virtual void f(); };
 
-// CHECK: @_ZN5Test16int_tiE ={{.*}} constant %"class.std::type_info"* bitcast (i8** @_ZTIi to %"class.std::type_info"*), align 8
+// CHECK: @_ZN5Test16int_tiE ={{.*}} constant ptr @_ZTIi, align 8
 const std::type_info &int_ti = typeid(int);
 
-// CHECK: @_ZN5Test14A_tiE ={{.*}} constant %"class.std::type_info"* bitcast (i8** @_ZTIN5Test11AE to %"class.std::type_info"*), align 8
+// CHECK: @_ZN5Test14A_tiE ={{.*}} constant ptr @_ZTIN5Test11AE, align 8
 const std::type_info &A_ti = typeid(const volatile A &);
 
 volatile char c;
 
-// CHECK: @_ZN5Test14c_tiE ={{.*}} constant %"class.std::type_info"* bitcast (i8** @_ZTIc to %"class.std::type_info"*), align 8
+// CHECK: @_ZN5Test14c_tiE ={{.*}} constant ptr @_ZTIc, align 8
 const std::type_info &c_ti = typeid(c);
 
 extern const double &d;
 
-// CHECK: @_ZN5Test14d_tiE ={{.*}} constant %"class.std::type_info"* bitcast (i8** @_ZTId to %"class.std::type_info"*), align 8
+// CHECK: @_ZN5Test14d_tiE ={{.*}} constant ptr @_ZTId, align 8
 const std::type_info &d_ti = typeid(d);
 
 extern A &a;
@@ -27,19 +27,19 @@ extern A &a;
 // CHECK: @_ZN5Test14a_tiE ={{.*}} global
 const std::type_info &a_ti = typeid(a);
 
-// CHECK: @_ZN5Test18A10_c_tiE ={{.*}} constant %"class.std::type_info"* bitcast ({ i8*, i8* }* @_ZTIA10_c to %"class.std::type_info"*), align 8
+// CHECK: @_ZN5Test18A10_c_tiE ={{.*}} constant ptr @_ZTIA10_c, align 8
 const std::type_info &A10_c_ti = typeid(char const[10]);
 
-// CHECK-LABEL: define{{.*}} i8* @_ZN5Test11fEv
-// CHECK-SAME:  personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
+// CHECK-LABEL: define{{.*}} ptr @_ZN5Test11fEv
+// CHECK-SAME:  personality ptr @__gxx_personality_v0
 const char *f() {
   try {
     // CHECK: br i1
     // CHECK: invoke void @__cxa_bad_typeid() [[NR:#[0-9]+]]
     return typeid(*static_cast<A *>(0)).name();
   } catch (...) {
-    // CHECK:      landingpad { i8*, i32 }
-    // CHECK-NEXT:   catch i8* null
+    // CHECK:      landingpad { ptr, i32 }
+    // CHECK-NEXT:   catch ptr null
   }
 
   return 0;

diff  --git a/clang/test/CodeGenCXX/ubsan-bitfields.cpp b/clang/test/CodeGenCXX/ubsan-bitfields.cpp
index 32ff2703be4f4..af61b7817854f 100644
--- a/clang/test/CodeGenCXX/ubsan-bitfields.cpp
+++ b/clang/test/CodeGenCXX/ubsan-bitfields.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=bool,enum | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=bool,enum | FileCheck %s
 
 enum E {
   a = 1,
@@ -12,7 +12,7 @@ struct S {
 
 // CHECK-LABEL: define{{.*}} i32 @_Z4loadP1S
 E load(S *s) {
-  // CHECK: [[LOAD:%.*]] = load i16, i16* {{.*}}
+  // CHECK: [[LOAD:%.*]] = load i16, ptr {{.*}}
   // CHECK: [[CLEAR:%.*]] = and i16 [[LOAD]], 1023
   // CHECK: [[CAST:%.*]] = zext i16 [[CLEAR]] to i32
   // CHECK: icmp ule i32 [[CAST]], 3, !nosanitize

diff  --git a/clang/test/CodeGenCXX/ubsan-function-noexcept.cpp b/clang/test/CodeGenCXX/ubsan-function-noexcept.cpp
index 2084f2c00da72..7fbf4970e249f 100644
--- a/clang/test/CodeGenCXX/ubsan-function-noexcept.cpp
+++ b/clang/test/CodeGenCXX/ubsan-function-noexcept.cpp
@@ -1,8 +1,8 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++17 -fsanitize=function -emit-llvm -triple x86_64-linux-gnu %s -o - | FileCheck %s
+// RUN: %clang_cc1 -std=c++17 -fsanitize=function -emit-llvm -triple x86_64-linux-gnu %s -o - | FileCheck %s
 
 // Check that typeinfo recorded in function prolog doesn't have "Do" noexcept
 // qualifier in its mangled name.
-// CHECK: [[PROXY:@.*]] = private unnamed_addr constant i8* bitcast ({ i8*, i8* }* @_ZTIFvvE to i8*)
+// CHECK: [[PROXY:@.*]] = private unnamed_addr constant ptr @_ZTIFvvE
 // CHECK: define{{.*}} void @_Z1fv() #{{.*}} !func_sanitize ![[FUNCSAN:.*]] {
 void f() noexcept {}
 
@@ -10,8 +10,8 @@ void f() noexcept {}
 void g(void (*p)() noexcept) {
   // Check that reference typeinfo at call site doesn't have "Do" noexcept
   // qualifier in its mangled name, either.
-  // CHECK: icmp eq i8* %{{.*}}, bitcast ({ i8*, i8* }* @_ZTIFvvE to i8*), !nosanitize
+  // CHECK: icmp eq ptr %{{.*}}, @_ZTIFvvE, !nosanitize
   p();
 }
 
-// CHECK: ![[FUNCSAN]] = !{i32 846595819, i8** [[PROXY]]}
+// CHECK: ![[FUNCSAN]] = !{i32 846595819, ptr [[PROXY]]}

diff  --git a/clang/test/CodeGenCXX/ubsan-global-alignment.cpp b/clang/test/CodeGenCXX/ubsan-global-alignment.cpp
index 88f9301e55652..d1623f99ea4b7 100644
--- a/clang/test/CodeGenCXX/ubsan-global-alignment.cpp
+++ b/clang/test/CodeGenCXX/ubsan-global-alignment.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=alignment | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=alignment | FileCheck %s
 
 struct S {
   int I;
@@ -11,16 +11,16 @@ extern S array_S[];
 int load_extern_global() {
   // FIXME: The IR builder constant-folds the alignment check away to 'true'
   // here, so we never call the diagnostic. This is PR32630.
-  // CHECK-NOT: ptrtoint i32* {{.*}} to i32, !nosanitize
-  // CHECK: [[I:%.*]] = load i32, i32* getelementptr inbounds (%struct.S, %struct.S* @g_S, i32 0, i32 0), align 4
+  // CHECK-NOT: ptrtoint ptr {{.*}} to i32, !nosanitize
+  // CHECK: [[I:%.*]] = load i32, ptr @g_S, align 4
   // CHECK-NEXT: ret i32 [[I]]
   return g_S.I;
 }
 
 // CHECK-LABEL: define{{.*}} i32 @_Z22load_from_extern_array
 int load_from_extern_array(int I) {
-  // CHECK: [[I:%.*]] = getelementptr inbounds %struct.S, %struct.S* {{.*}}, i32 0, i32 0
-  // CHECK-NEXT: [[PTRTOINT:%.*]] = ptrtoint i32* [[I]] to i64, !nosanitize
+  // CHECK: [[I:%.*]] = getelementptr inbounds %struct.S, ptr {{.*}}, i32 0, i32 0
+  // CHECK-NEXT: [[PTRTOINT:%.*]] = ptrtoint ptr [[I]] to i64, !nosanitize
   // CHECK-NEXT: [[AND:%.*]] = and i64 [[PTRTOINT]], 3, !nosanitize
   // CHECK-NEXT: [[ICMP:%.*]] = icmp eq i64 [[AND]], 0, !nosanitize
   // CHECK-NEXT: br i1 [[ICMP]]

diff  --git a/clang/test/CodeGenCXX/ubsan-new-checks.cpp b/clang/test/CodeGenCXX/ubsan-new-checks.cpp
index b24faeaded140..352f56b734de6 100644
--- a/clang/test/CodeGenCXX/ubsan-new-checks.cpp
+++ b/clang/test/CodeGenCXX/ubsan-new-checks.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-linux-gnu -std=c++11 -S -emit-llvm -fsanitize=alignment %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-linux-gnu -std=c++11 -S -emit-llvm -fsanitize=alignment %s -o - | FileCheck %s
 
 struct alignas(32) S1 {
   int x;
@@ -33,7 +33,7 @@ S1 *func_01() {
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
   // CHECK:       call void @_ZN2S1C1Ev(
   // CHECK-NOT:   and i64 %{{.*}}, 31
-  // CHECK:       ret %struct.S1*
+  // CHECK:       ret ptr
   return new S1[20];
 }
 
@@ -41,7 +41,7 @@ S2 *func_02() {
   // CHECK-LABEL: define {{.*}} @_Z7func_02v
   // CHECK:       and i64 %{{.*}}, 31, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
-  // CHECK:       ret %struct.S2*
+  // CHECK:       ret ptr
   return new S2;
 }
 
@@ -50,7 +50,7 @@ S2 *func_03() {
   // CHECK:       and i64 %{{.*}}, 31, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
   // CHECK-NOT:   and i64 %{{.*}}, 31
-  // CHECK:       ret %struct.S2*
+  // CHECK:       ret ptr
   return new S2[20];
 }
 
@@ -58,7 +58,7 @@ float32x8_t *func_04() {
   // CHECK-LABEL: define {{.*}} @_Z7func_04v
   // CHECK:       and i64 %{{.*}}, 31, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
-  // CHECK:       ret <8 x float>*
+  // CHECK:       ret ptr
   return new float32x8_t;
 }
 
@@ -67,7 +67,7 @@ float32x8_t *func_05() {
   // CHECK:       and i64 %{{.*}}, 31, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
   // CHECK-NOT:   and i64 %{{.*}}, 31
-  // CHECK:       ret <8 x float>*
+  // CHECK:       ret ptr
   return new float32x8_t[20];
 }
 
@@ -77,7 +77,7 @@ S3 *func_07() {
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
   // CHECK:       and i64 %{{.*}}, 3, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
-  // CHECK:       ret %struct.S3*
+  // CHECK:       ret ptr
   return new S3;
 }
 
@@ -87,7 +87,7 @@ S3 *func_08() {
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
   // CHECK:       and i64 %{{.*}}, 3, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
-  // CHECK:       ret %struct.S3*
+  // CHECK:       ret ptr
   return new S3[10];
 }
 
@@ -96,7 +96,7 @@ S2 *func_10(void *p) {
   // CHECK-LABEL: define {{.*}} @_Z7func_10Pv
   // CHECK:       and i64 %{{.*}}, 31, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
-  // CHECK:       ret %struct.S2*
+  // CHECK:       ret ptr
   return new(p) S2;
 }
 
@@ -106,7 +106,7 @@ S2 *func_11(void *p) {
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
   // CHECK-NOT:   and i64 %{{.*}}, 31, !nosanitize
   // CHECK-NOT:   icmp eq i64 %{{.*}}, 0, !nosanitize
-  // CHECK:       ret %struct.S2*
+  // CHECK:       ret ptr
   return new(p) S2[10];
 }
 
@@ -114,7 +114,7 @@ float32x8_t *func_12() {
   // CHECK-LABEL: define {{.*}} @_Z7func_12v
   // CHECK:       and i64 %{{.*}}, 31, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
-  // CHECK:       ret <8 x float>*
+  // CHECK:       ret ptr
   return new float32x8_t;
 }
 
@@ -123,7 +123,7 @@ float32x8_t *func_13() {
   // CHECK:       and i64 %{{.*}}, 31, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
   // CHECK-NOT:   and i64 %{{.*}}, 31
-  // CHECK:       ret <8 x float>*
+  // CHECK:       ret ptr
   return new float32x8_t[20];
 }
 
@@ -132,7 +132,7 @@ S4 *func_14() {
   // CHECK:       and i64 %{{.*}}, 31, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
   // CHECK-NOT:   and i64 %{{.*}}, 31
-  // CHECK:       ret %struct.S4*
+  // CHECK:       ret ptr
   return new S4;
 }
 
@@ -141,6 +141,6 @@ S5 *func_15(const S5 *ptr) {
   // CHECK:       and i64 %{{.*}}, 31, !nosanitize
   // CHECK:       icmp eq i64 %{{.*}}, 0, !nosanitize
   // CHECK-NOT:   and i64
-  // CHECK:       ret %struct.S5*
+  // CHECK:       ret ptr
   return new S5(*ptr);
 }

diff  --git a/clang/test/CodeGenCXX/ubsan-nullability-arg.cpp b/clang/test/CodeGenCXX/ubsan-nullability-arg.cpp
index bc51aaca04b2c..4cff87ca32ebd 100644
--- a/clang/test/CodeGenCXX/ubsan-nullability-arg.cpp
+++ b/clang/test/CodeGenCXX/ubsan-nullability-arg.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=nullability-arg | FileCheck %s -check-prefixes=ITANIUM,ALL
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ -triple x86_64-pc-windows-msvc -emit-llvm -o - %s -fsanitize=nullability-arg | FileCheck %s -check-prefixes=MSVC,ALL
+// RUN: %clang_cc1 -x c++ -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=nullability-arg | FileCheck %s -check-prefixes=ITANIUM,ALL
+// RUN: %clang_cc1 -x c++ -triple x86_64-pc-windows-msvc -emit-llvm -o - %s -fsanitize=nullability-arg | FileCheck %s -check-prefixes=MSVC,ALL
 
 namespace method_ptr {
 
@@ -10,7 +10,7 @@ struct S0 {
 void foo1(void (S0::*_Nonnull f)());
 
 // ITANIUM-LABEL: @_ZN10method_ptr5test1Ev(){{.*}} {
-// ITANIUM: br i1 icmp ne (i64 ptrtoint (void (%"struct.method_ptr::S0"*)* @_ZN10method_ptr2S04foo1Ev to i64), i64 0), label %[[CONT:.*]], label %[[FAIL:[^,]*]]
+// ITANIUM: br i1 icmp ne (i64 ptrtoint (ptr @_ZN10method_ptr2S04foo1Ev to i64), i64 0), label %[[CONT:.*]], label %[[FAIL:[^,]*]]
 // ITANIUM-EMPTY:
 // ITANIUM-NEXT: [[FAIL]]:
 // ITANIUM-NEXT:   call void @__ubsan_handle_nullability_arg

diff  --git a/clang/test/CodeGenCXX/ubsan-nullability-assign.cpp b/clang/test/CodeGenCXX/ubsan-nullability-assign.cpp
index 3921f5b70e269..08c7f0090220e 100644
--- a/clang/test/CodeGenCXX/ubsan-nullability-assign.cpp
+++ b/clang/test/CodeGenCXX/ubsan-nullability-assign.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=nullability-assign | FileCheck %s
+// RUN: %clang_cc1 -x c++ -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=nullability-assign | FileCheck %s
 
 struct S1 {
   int *_Nonnull p;
@@ -17,13 +17,13 @@ union U1 {
 void f1(int *p) {
   U1 u;
 
-  // CHECK: [[ICMP:%.*]] = icmp ne i32* {{.*}}, null, !nosanitize
+  // CHECK: [[ICMP:%.*]] = icmp ne ptr {{.*}}, null, !nosanitize
   // CHECK-NEXT: br i1 [[ICMP]], {{.*}}, !nosanitize
   // CHECK: call void @__ubsan_handle_type_mismatch{{.*}} !nosanitize
   // CHECK: store
   u.s1.p = p;
 
-  // CHECK: [[ICMP:%.*]] = icmp ne i32* {{.*}}, null, !nosanitize
+  // CHECK: [[ICMP:%.*]] = icmp ne ptr {{.*}}, null, !nosanitize
   // CHECK-NEXT: br i1 [[ICMP]], {{.*}}, !nosanitize
   // CHECK: call void @__ubsan_handle_type_mismatch{{.*}} !nosanitize
   // CHECK: store

diff  --git a/clang/test/CodeGenCXX/ubsan-suppress-checks.cpp b/clang/test/CodeGenCXX/ubsan-suppress-checks.cpp
index 2bebc0713bd9f..da7a60bddee33 100644
--- a/clang/test/CodeGenCXX/ubsan-suppress-checks.cpp
+++ b/clang/test/CodeGenCXX/ubsan-suppress-checks.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=alignment | FileCheck %s --check-prefixes=CHECK,ALIGN
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=null | FileCheck %s --check-prefixes=CHECK,NULL
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=alignment,null -DCHECK_LAMBDA | FileCheck %s --check-prefixes=LAMBDA
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=alignment | FileCheck %s --check-prefixes=CHECK,ALIGN
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=null | FileCheck %s --check-prefixes=CHECK,NULL
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=alignment,null -DCHECK_LAMBDA | FileCheck %s --check-prefixes=LAMBDA
 
 // CHECK-LABEL: define{{.*}} void @_Z22load_non_null_pointersv
 void load_non_null_pointers() {
@@ -33,10 +33,10 @@ struct A {
 
   // CHECK-LABEL: define linkonce_odr void @_ZN1A10do_nothingEv
   void do_nothing() {
-    // ALIGN: %[[THISINT1:[0-9]+]] = ptrtoint %struct.A* %{{.*}} to i64, !nosanitize
+    // ALIGN: %[[THISINT1:[0-9]+]] = ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %[[THISINT1]], 3, !nosanitize
-    // NULL: icmp ne %struct.A* %[[THIS1:[a-z0-9]+]], null, !nosanitize
-    // NULL: ptrtoint %struct.A* %[[THIS1]] to i64, !nosanitize
+    // NULL: icmp ne ptr %[[THIS1:[a-z0-9]+]], null, !nosanitize
+    // NULL: ptrtoint ptr %[[THIS1]] to i64, !nosanitize
     // CHECK: call void @__ubsan_handle_type_mismatch
     // CHECK-NOT: call void @__ubsan_handle_type_mismatch
     // CHECK: ret void
@@ -45,8 +45,8 @@ struct A {
 #ifdef CHECK_LAMBDA
   // LAMBDA-LABEL: define linkonce_odr void @_ZN1A22do_nothing_with_lambdaEv
   void do_nothing_with_lambda() {
-    // LAMBDA: icmp ne %struct.A* %[[THIS2:[a-z0-9]+]], null, !nosanitize
-    // LAMBDA: %[[THISINT2:[0-9]+]] = ptrtoint %struct.A* %[[THIS2]] to i64, !nosanitize
+    // LAMBDA: icmp ne ptr %[[THIS2:[a-z0-9]+]], null, !nosanitize
+    // LAMBDA: %[[THISINT2:[0-9]+]] = ptrtoint ptr %[[THIS2]] to i64, !nosanitize
     // LAMBDA: and i64 %[[THISINT2]], 3, !nosanitize
     // LAMBDA: call void @__ubsan_handle_type_mismatch
 
@@ -69,10 +69,10 @@ struct A {
 
   // CHECK-LABEL: define linkonce_odr noundef i32 @_ZN1A11load_memberEv
   int load_member() {
-    // ALIGN: %[[THISINT3:[0-9]+]] = ptrtoint %struct.A* %{{.*}} to i64, !nosanitize
+    // ALIGN: %[[THISINT3:[0-9]+]] = ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %[[THISINT3]], 3, !nosanitize
-    // NULL: icmp ne %struct.A* %[[THIS3:[a-z0-9]+]], null, !nosanitize
-    // NULL: ptrtoint %struct.A* %[[THIS3]] to i64, !nosanitize
+    // NULL: icmp ne ptr %[[THIS3:[a-z0-9]+]], null, !nosanitize
+    // NULL: ptrtoint ptr %[[THIS3]] to i64, !nosanitize
     // CHECK: call void @__ubsan_handle_type_mismatch
     // CHECK-NOT: call void @__ubsan_handle_type_mismatch
     return foo;
@@ -81,10 +81,10 @@ struct A {
 
   // CHECK-LABEL: define linkonce_odr noundef i32 @_ZN1A11call_methodEv
   int call_method() {
-    // ALIGN: %[[THISINT4:[0-9]+]] = ptrtoint %struct.A* %{{.*}} to i64, !nosanitize
+    // ALIGN: %[[THISINT4:[0-9]+]] = ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %[[THISINT4]], 3, !nosanitize
-    // NULL: icmp ne %struct.A* %[[THIS4:[a-z0-9]+]], null, !nosanitize
-    // NULL: ptrtoint %struct.A* %[[THIS4]] to i64, !nosanitize
+    // NULL: icmp ne ptr %[[THIS4:[a-z0-9]+]], null, !nosanitize
+    // NULL: ptrtoint ptr %[[THIS4]] to i64, !nosanitize
     // CHECK: call void @__ubsan_handle_type_mismatch
     // CHECK-NOT: call void @__ubsan_handle_type_mismatch
     return load_member();
@@ -93,10 +93,10 @@ struct A {
 
   // CHECK-LABEL: define linkonce_odr void @_ZN1A15assign_member_1Ev
   void assign_member_1() {
-    // ALIGN: %[[THISINT5:[0-9]+]] = ptrtoint %struct.A* %{{.*}} to i64, !nosanitize
+    // ALIGN: %[[THISINT5:[0-9]+]] = ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %[[THISINT5]], 3, !nosanitize
-    // NULL: icmp ne %struct.A* %[[THIS5:[a-z0-9]+]], null, !nosanitize
-    // NULL: ptrtoint %struct.A* %[[THIS5]] to i64, !nosanitize
+    // NULL: icmp ne ptr %[[THIS5:[a-z0-9]+]], null, !nosanitize
+    // NULL: ptrtoint ptr %[[THIS5]] to i64, !nosanitize
     // CHECK: call void @__ubsan_handle_type_mismatch
     // CHECK-NOT: call void @__ubsan_handle_type_mismatch
     foo = 0;
@@ -105,10 +105,10 @@ struct A {
 
   // CHECK-LABEL: define linkonce_odr void @_ZN1A15assign_member_2Ev
   void assign_member_2() {
-    // ALIGN: %[[THISINT6:[0-9]+]] = ptrtoint %struct.A* %{{.*}} to i64, !nosanitize
+    // ALIGN: %[[THISINT6:[0-9]+]] = ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %[[THISINT6]], 3, !nosanitize
-    // NULL: icmp ne %struct.A* %[[THIS6:[a-z0-9]+]], null, !nosanitize
-    // NULL: ptrtoint %struct.A* %[[THIS6]] to i64, !nosanitize
+    // NULL: icmp ne ptr %[[THIS6:[a-z0-9]+]], null, !nosanitize
+    // NULL: ptrtoint ptr %[[THIS6]] to i64, !nosanitize
     // CHECK: call void @__ubsan_handle_type_mismatch
     // CHECK-NOT: call void @__ubsan_handle_type_mismatch
     (__extension__ (this))->foo = 0;
@@ -117,10 +117,10 @@ struct A {
 
   // CHECK-LABEL: define linkonce_odr void @_ZNK1A15assign_member_3Ev
   void assign_member_3() const {
-    // ALIGN: %[[THISINT7:[0-9]+]] = ptrtoint %struct.A* %{{.*}} to i64, !nosanitize
+    // ALIGN: %[[THISINT7:[0-9]+]] = ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %[[THISINT7]], 3, !nosanitize
-    // NULL: icmp ne %struct.A* %[[THIS7:[a-z0-9]+]], null, !nosanitize
-    // NULL: ptrtoint %struct.A* %[[THIS7]] to i64, !nosanitize
+    // NULL: icmp ne ptr %[[THIS7:[a-z0-9]+]], null, !nosanitize
+    // NULL: ptrtoint ptr %[[THIS7]] to i64, !nosanitize
     // CHECK: call void @__ubsan_handle_type_mismatch
     // CHECK-NOT: call void @__ubsan_handle_type_mismatch
     const_cast<A *>(this)->foo = 0;
@@ -129,7 +129,7 @@ struct A {
 
   // CHECK-LABEL: define linkonce_odr noundef i32 @_ZN1A22call_through_referenceERS_
   static int call_through_reference(A &a) {
-    // ALIGN: %[[OBJINT:[0-9]+]] = ptrtoint %struct.A* %{{.*}} to i64, !nosanitize
+    // ALIGN: %[[OBJINT:[0-9]+]] = ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %[[OBJINT]], 3, !nosanitize
     // ALIGN: call void @__ubsan_handle_type_mismatch
     // NULL-NOT: call void @__ubsan_handle_type_mismatch
@@ -173,11 +173,11 @@ struct Derived : public Base {
 
   // CHECK-LABEL: define linkonce_odr noundef i32 @_ZN7Derived13load_member_2Ev
   int load_member_2() {
-    // ALIGN: %[[THISINT8:[0-9]+]] = ptrtoint %struct.Derived* %{{.*}} to i64, !nosanitize
+    // ALIGN: %[[THISINT8:[0-9]+]] = ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %[[THISINT8]], 7, !nosanitize
     // ALIGN: call void @__ubsan_handle_type_mismatch
-    // NULL: icmp ne %struct.Derived* %[[THIS8:[a-z0-9]+]], null, !nosanitize
-    // NULL: ptrtoint %struct.Derived* %[[THIS8]] to i64, !nosanitize
+    // NULL: icmp ne ptr %[[THIS8:[a-z0-9]+]], null, !nosanitize
+    // NULL: ptrtoint ptr %[[THIS8]] to i64, !nosanitize
     // CHECK: call void @__ubsan_handle_type_mismatch
     //
     // Check the result of the cast before using it.
@@ -190,12 +190,12 @@ struct Derived : public Base {
 
   // CHECK-LABEL: define linkonce_odr noundef i32 @_ZN7Derived13load_member_3Ev
   int load_member_3() {
-    // ALIGN: %[[THISINT9:[0-9]+]] = ptrtoint %struct.Derived* %{{.*}} to i64, !nosanitize
+    // ALIGN: %[[THISINT9:[0-9]+]] = ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %[[THISINT9]], 7, !nosanitize
     // ALIGN: call void @__ubsan_handle_type_mismatch
     // ALIGN: call void @__ubsan_handle_type_mismatch
-    // NULL: icmp ne %struct.Derived* %[[THIS9:[a-z0-9]+]], null, !nosanitize
-    // NULL: ptrtoint %struct.Derived* %[[THIS9]] to i64, !nosanitize
+    // NULL: icmp ne ptr %[[THIS9:[a-z0-9]+]], null, !nosanitize
+    // NULL: ptrtoint ptr %[[THIS9]] to i64, !nosanitize
     // CHECK: call void @__ubsan_handle_type_mismatch
     // CHECK-NOT: call void @__ubsan_handle_type_mismatch
     return reinterpret_cast<Derived *>(static_cast<Base *>(this))->foo;
@@ -204,11 +204,11 @@ struct Derived : public Base {
 
   // CHECK-LABEL: define linkonce_odr noundef i32 @_ZN7Derived13load_member_1Ev
   int load_member_1() override {
-    // ALIGN: %[[THISINT10:[0-9]+]] = ptrtoint %struct.Derived* %{{.*}} to i64, !nosanitize
+    // ALIGN: %[[THISINT10:[0-9]+]] = ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %[[THISINT10]], 7, !nosanitize
     // ALIGN: call void @__ubsan_handle_type_mismatch
-    // NULL: icmp ne %struct.Derived* %[[THIS10:[a-z0-9]+]], null, !nosanitize
-    // NULL: ptrtoint %struct.Derived* %[[THIS10]] to i64, !nosanitize
+    // NULL: icmp ne ptr %[[THIS10:[a-z0-9]+]], null, !nosanitize
+    // NULL: ptrtoint ptr %[[THIS10]] to i64, !nosanitize
     // CHECK: call void @__ubsan_handle_type_mismatch
     // CHECK-NOT: call void @__ubsan_handle_type_mismatch
     return foo + bar;

diff  --git a/clang/test/CodeGenCXX/ubsan-type-checks.cpp b/clang/test/CodeGenCXX/ubsan-type-checks.cpp
index aa78c5144c4f6..cf2118c9bd963 100644
--- a/clang/test/CodeGenCXX/ubsan-type-checks.cpp
+++ b/clang/test/CodeGenCXX/ubsan-type-checks.cpp
@@ -1,15 +1,15 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=alignment | FileCheck %s -check-prefixes=ALIGN,COMMON
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=null | FileCheck %s -check-prefixes=NULL,COMMON
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=object-size | FileCheck %s -check-prefixes=OBJSIZE,COMMON
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=null,vptr | FileCheck %s -check-prefixes=VPTR
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=vptr | FileCheck %s -check-prefixes=VPTR_NO_NULL
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=alignment | FileCheck %s -check-prefixes=ALIGN,COMMON
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=null | FileCheck %s -check-prefixes=NULL,COMMON
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=object-size | FileCheck %s -check-prefixes=OBJSIZE,COMMON
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=null,vptr | FileCheck %s -check-prefixes=VPTR
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin10 -emit-llvm -o - %s -fsanitize=vptr | FileCheck %s -check-prefixes=VPTR_NO_NULL
 
 struct A {
   // COMMON-LABEL: define linkonce_odr void @_ZN1A10do_nothingEv
   void do_nothing() {
-    // ALIGN-NOT: ptrtoint %struct.A* %{{.*}} to i64, !nosanitize
+    // ALIGN-NOT: ptrtoint ptr %{{.*}} to i64, !nosanitize
  
-    // NULL: icmp ne %struct.A* %{{.*}}, null, !nosanitize
+    // NULL: icmp ne ptr %{{.*}}, null, !nosanitize
  
     // OBJSIZE-NOT: call i64 @llvm.objectsize
   }
@@ -20,10 +20,10 @@ struct B {
 
   // COMMON-LABEL: define linkonce_odr void @_ZN1B10do_nothingEv
   void do_nothing() {
-    // ALIGN: ptrtoint %struct.B* %{{.*}} to i64, !nosanitize
+    // ALIGN: ptrtoint ptr %{{.*}} to i64, !nosanitize
     // ALIGN: and i64 %{{.*}}, 3, !nosanitize
 
-    // NULL: icmp ne %struct.B* %{{.*}}, null, !nosanitize
+    // NULL: icmp ne ptr %{{.*}}, null, !nosanitize
 
     // OBJSIZE-NOT: call i64 @llvm.objectsize
     // OBJSIZE: ret void
@@ -46,10 +46,10 @@ struct Dog : Animal {
 void invalid_cast(Cat *cat = nullptr) {
   // If -fsanitize=null is available, we'll reuse its check:
   //
-  // VPTR: [[ICMP:%.*]] = icmp ne %struct.Dog* {{.*}}, null
+  // VPTR: [[ICMP:%.*]] = icmp ne ptr {{.*}}, null
   // VPTR-NEXT: br i1 [[ICMP]]
   // VPTR: call void @__ubsan_handle_type_mismatch
-  // VPTR-NOT: icmp ne %struct.Dog* {{.*}}, null
+  // VPTR-NOT: icmp ne ptr {{.*}}, null
   // VPTR: br i1 [[ICMP]]
   // VPTR: call void @__ubsan_handle_dynamic_type_cache_miss
   //
@@ -57,7 +57,7 @@ void invalid_cast(Cat *cat = nullptr) {
   // available.
   //
   // VPTR_NO_NULL-NOT: call void @__ubsan_handle_type_mismatch
-  // VPTR_NO_NULL: [[ICMP:%.*]] = icmp ne %struct.Dog* {{.*}}, null
+  // VPTR_NO_NULL: [[ICMP:%.*]] = icmp ne ptr {{.*}}, null
   // VPTR_NO_NULL-NEXT: br i1 [[ICMP]]
   // VPTR_NO_NULL: call void @__ubsan_handle_dynamic_type_cache_miss
   auto *badDog = reinterpret_cast<Dog *>(cat);

diff  --git a/clang/test/CodeGenCXX/ubsan-unreachable.cpp b/clang/test/CodeGenCXX/ubsan-unreachable.cpp
index d936dfdb45d0f..5c8567ec7a96f 100644
--- a/clang/test/CodeGenCXX/ubsan-unreachable.cpp
+++ b/clang/test/CodeGenCXX/ubsan-unreachable.cpp
@@ -4,7 +4,7 @@ void abort() __attribute__((noreturn));
 
 // CHECK-LABEL: define{{.*}} void @_Z14calls_noreturnv()
 void calls_noreturn() {
-  // Check absence ([^#]*) of call site attributes (including noreturn)
+  // Check absence (ptr) of call site attributes (including noreturn)
   // CHECK: call void @_Z5abortv(){{[^#]*}}
   abort();
 

diff  --git a/clang/test/CodeGenCXX/uncopyable-args.cpp b/clang/test/CodeGenCXX/uncopyable-args.cpp
index e03c9970747a5..31192b65cc362 100644
--- a/clang/test/CodeGenCXX/uncopyable-args.cpp
+++ b/clang/test/CodeGenCXX/uncopyable-args.cpp
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=NEWABI
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-unknown-unknown -fclang-abi-compat=4.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=OLDABI
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-scei-ps4 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=OLDABI
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-sie-ps5  -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=NEWABI
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-msvc -emit-llvm -o - %s -fms-compatibility -fms-compatibility-version=18 | FileCheck %s -check-prefix=WIN64 -check-prefix=WIN64-18
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-windows-msvc -emit-llvm -o - %s -fms-compatibility -fms-compatibility-version=19 | FileCheck %s -check-prefix=WIN64 -check-prefix=WIN64-19
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=NEWABI
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-unknown -fclang-abi-compat=4.0 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=OLDABI
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-scei-ps4 -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=OLDABI
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-sie-ps5  -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK --check-prefix=NEWABI
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-msvc -emit-llvm -o - %s -fms-compatibility -fms-compatibility-version=18 | FileCheck %s -check-prefix=WIN64 -check-prefix=WIN64-18
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-windows-msvc -emit-llvm -o - %s -fms-compatibility -fms-compatibility-version=19 | FileCheck %s -check-prefix=WIN64 -check-prefix=WIN64-19
 
 namespace trivial {
 // Trivial structs should be passed directly.
@@ -16,9 +16,9 @@ void bar() {
 }
 // CHECK-LABEL: define{{.*}} void @_ZN7trivial3barEv()
 // CHECK: alloca %"struct.trivial::A"
-// CHECK: load i8*, i8**
-// CHECK: call void @_ZN7trivial3fooENS_1AE(i8* %{{.*}})
-// CHECK-LABEL: declare void @_ZN7trivial3fooENS_1AE(i8*)
+// CHECK: load ptr, ptr
+// CHECK: call void @_ZN7trivial3fooENS_1AE(ptr %{{.*}})
+// CHECK-LABEL: declare void @_ZN7trivial3fooENS_1AE(ptr)
 
 // WIN64-LABEL: declare dso_local void @"?foo at trivial@@YAXUA at 1@@Z"(i64)
 }
@@ -37,9 +37,9 @@ void bar() {
 // CHECK-LABEL: define{{.*}} void @_ZN12default_ctor3barEv()
 // CHECK: alloca %"struct.default_ctor::A"
 // CHECK: call void @_Z{{.*}}C1Ev(
-// CHECK: load i8*, i8**
-// CHECK: call void @_ZN12default_ctor3fooENS_1AE(i8* %{{.*}})
-// CHECK-LABEL: declare void @_ZN12default_ctor3fooENS_1AE(i8*)
+// CHECK: load ptr, ptr
+// CHECK: call void @_ZN12default_ctor3fooENS_1AE(ptr %{{.*}})
+// CHECK-LABEL: declare void @_ZN12default_ctor3fooENS_1AE(ptr)
 
 // WIN64-LABEL: declare dso_local void @"?foo at default_ctor@@YAXUA at 1@@Z"(i64)
 }
@@ -59,12 +59,12 @@ void bar() {
 // CHECK-LABEL: define{{.*}} void @_ZN9move_ctor3barEv()
 // CHECK: call void @_Z{{.*}}C1Ev(
 // CHECK-NOT: call
-// NEWABI: call void @_ZN9move_ctor3fooENS_1AE(%"struct.move_ctor::A"* noundef %{{.*}})
-// OLDABI: call void @_ZN9move_ctor3fooENS_1AE(i8* %{{.*}})
-// NEWABI-LABEL: declare void @_ZN9move_ctor3fooENS_1AE(%"struct.move_ctor::A"* noundef)
-// OLDABI-LABEL: declare void @_ZN9move_ctor3fooENS_1AE(i8*)
+// NEWABI: call void @_ZN9move_ctor3fooENS_1AE(ptr noundef %{{.*}})
+// OLDABI: call void @_ZN9move_ctor3fooENS_1AE(ptr %{{.*}})
+// NEWABI-LABEL: declare void @_ZN9move_ctor3fooENS_1AE(ptr noundef)
+// OLDABI-LABEL: declare void @_ZN9move_ctor3fooENS_1AE(ptr)
 
-// WIN64-LABEL: declare dso_local void @"?foo at move_ctor@@YAXUA at 1@@Z"(%"struct.move_ctor::A"* noundef)
+// WIN64-LABEL: declare dso_local void @"?foo at move_ctor@@YAXUA at 1@@Z"(ptr noundef)
 }
 
 namespace all_deleted {
@@ -81,12 +81,12 @@ void bar() {
 // CHECK-LABEL: define{{.*}} void @_ZN11all_deleted3barEv()
 // CHECK: call void @_Z{{.*}}C1Ev(
 // CHECK-NOT: call
-// NEWABI: call void @_ZN11all_deleted3fooENS_1AE(%"struct.all_deleted::A"* noundef %{{.*}})
-// OLDABI: call void @_ZN11all_deleted3fooENS_1AE(i8* %{{.*}})
-// NEWABI-LABEL: declare void @_ZN11all_deleted3fooENS_1AE(%"struct.all_deleted::A"* noundef)
-// OLDABI-LABEL: declare void @_ZN11all_deleted3fooENS_1AE(i8*)
+// NEWABI: call void @_ZN11all_deleted3fooENS_1AE(ptr noundef %{{.*}})
+// OLDABI: call void @_ZN11all_deleted3fooENS_1AE(ptr %{{.*}})
+// NEWABI-LABEL: declare void @_ZN11all_deleted3fooENS_1AE(ptr noundef)
+// OLDABI-LABEL: declare void @_ZN11all_deleted3fooENS_1AE(ptr)
 
-// WIN64-LABEL: declare dso_local void @"?foo at all_deleted@@YAXUA at 1@@Z"(%"struct.all_deleted::A"* noundef)
+// WIN64-LABEL: declare dso_local void @"?foo at all_deleted@@YAXUA at 1@@Z"(ptr noundef)
 }
 
 namespace implicitly_deleted {
@@ -102,14 +102,14 @@ void bar() {
 // CHECK-LABEL: define{{.*}} void @_ZN18implicitly_deleted3barEv()
 // CHECK: call void @_Z{{.*}}C1Ev(
 // CHECK-NOT: call
-// NEWABI: call void @_ZN18implicitly_deleted3fooENS_1AE(%"struct.implicitly_deleted::A"* noundef %{{.*}})
-// OLDABI: call void @_ZN18implicitly_deleted3fooENS_1AE(i8* %{{.*}})
-// NEWABI-LABEL: declare void @_ZN18implicitly_deleted3fooENS_1AE(%"struct.implicitly_deleted::A"* noundef)
-// OLDABI-LABEL: declare void @_ZN18implicitly_deleted3fooENS_1AE(i8*)
+// NEWABI: call void @_ZN18implicitly_deleted3fooENS_1AE(ptr noundef %{{.*}})
+// OLDABI: call void @_ZN18implicitly_deleted3fooENS_1AE(ptr %{{.*}})
+// NEWABI-LABEL: declare void @_ZN18implicitly_deleted3fooENS_1AE(ptr noundef)
+// OLDABI-LABEL: declare void @_ZN18implicitly_deleted3fooENS_1AE(ptr)
 
 // In MSVC 2013, the copy ctor is not deleted by a move assignment. In MSVC 2015, it is.
 // WIN64-18-LABEL: declare dso_local void @"?foo at implicitly_deleted@@YAXUA at 1@@Z"(i64
-// WIN64-19-LABEL: declare dso_local void @"?foo at implicitly_deleted@@YAXUA at 1@@Z"(%"struct.implicitly_deleted::A"* noundef)
+// WIN64-19-LABEL: declare dso_local void @"?foo at implicitly_deleted@@YAXUA at 1@@Z"(ptr noundef)
 }
 
 namespace one_deleted {
@@ -125,12 +125,12 @@ void bar() {
 // CHECK-LABEL: define{{.*}} void @_ZN11one_deleted3barEv()
 // CHECK: call void @_Z{{.*}}C1Ev(
 // CHECK-NOT: call
-// NEWABI: call void @_ZN11one_deleted3fooENS_1AE(%"struct.one_deleted::A"* noundef %{{.*}})
-// OLDABI: call void @_ZN11one_deleted3fooENS_1AE(i8* %{{.*}})
-// NEWABI-LABEL: declare void @_ZN11one_deleted3fooENS_1AE(%"struct.one_deleted::A"* noundef)
-// OLDABI-LABEL: declare void @_ZN11one_deleted3fooENS_1AE(i8*)
+// NEWABI: call void @_ZN11one_deleted3fooENS_1AE(ptr noundef %{{.*}})
+// OLDABI: call void @_ZN11one_deleted3fooENS_1AE(ptr %{{.*}})
+// NEWABI-LABEL: declare void @_ZN11one_deleted3fooENS_1AE(ptr noundef)
+// OLDABI-LABEL: declare void @_ZN11one_deleted3fooENS_1AE(ptr)
 
-// WIN64-LABEL: declare dso_local void @"?foo at one_deleted@@YAXUA at 1@@Z"(%"struct.one_deleted::A"* noundef)
+// WIN64-LABEL: declare dso_local void @"?foo at one_deleted@@YAXUA at 1@@Z"(ptr noundef)
 }
 
 namespace copy_defaulted {
@@ -146,9 +146,9 @@ void bar() {
 }
 // CHECK-LABEL: define{{.*}} void @_ZN14copy_defaulted3barEv()
 // CHECK: call void @_Z{{.*}}C1Ev(
-// CHECK: load i8*, i8**
-// CHECK: call void @_ZN14copy_defaulted3fooENS_1AE(i8* %{{.*}})
-// CHECK-LABEL: declare void @_ZN14copy_defaulted3fooENS_1AE(i8*)
+// CHECK: load ptr, ptr
+// CHECK: call void @_ZN14copy_defaulted3fooENS_1AE(ptr %{{.*}})
+// CHECK-LABEL: declare void @_ZN14copy_defaulted3fooENS_1AE(ptr)
 
 // WIN64-LABEL: declare dso_local void @"?foo at copy_defaulted@@YAXUA at 1@@Z"(i64)
 }
@@ -166,11 +166,11 @@ void bar() {
 }
 // CHECK-LABEL: define{{.*}} void @_ZN14move_defaulted3barEv()
 // CHECK: call void @_Z{{.*}}C1Ev(
-// CHECK: load i8*, i8**
-// CHECK: call void @_ZN14move_defaulted3fooENS_1AE(i8* %{{.*}})
-// CHECK-LABEL: declare void @_ZN14move_defaulted3fooENS_1AE(i8*)
+// CHECK: load ptr, ptr
+// CHECK: call void @_ZN14move_defaulted3fooENS_1AE(ptr %{{.*}})
+// CHECK-LABEL: declare void @_ZN14move_defaulted3fooENS_1AE(ptr)
 
-// WIN64-LABEL: declare dso_local void @"?foo at move_defaulted@@YAXUA at 1@@Z"(%"struct.move_defaulted::A"* noundef)
+// WIN64-LABEL: declare dso_local void @"?foo at move_defaulted@@YAXUA at 1@@Z"(ptr noundef)
 }
 
 namespace trivial_defaulted {
@@ -185,9 +185,9 @@ void bar() {
 }
 // CHECK-LABEL: define{{.*}} void @_ZN17trivial_defaulted3barEv()
 // CHECK: call void @_Z{{.*}}C1Ev(
-// CHECK: load i8*, i8**
-// CHECK: call void @_ZN17trivial_defaulted3fooENS_1AE(i8* %{{.*}})
-// CHECK-LABEL: declare void @_ZN17trivial_defaulted3fooENS_1AE(i8*)
+// CHECK: load ptr, ptr
+// CHECK: call void @_ZN17trivial_defaulted3fooENS_1AE(ptr %{{.*}})
+// CHECK-LABEL: declare void @_ZN17trivial_defaulted3fooENS_1AE(ptr)
 
 // WIN64-LABEL: declare dso_local void @"?foo at trivial_defaulted@@YAXUA at 1@@Z"(i64)
 }
@@ -207,12 +207,12 @@ void bar() {
 }
 // CHECK-LABEL: define{{.*}} void @_ZN14two_copy_ctors3barEv()
 // CHECK: call void @_Z{{.*}}C1Ev(
-// NEWABI: call void @_ZN14two_copy_ctors3fooENS_1BE(%"struct.two_copy_ctors::B"* noundef %{{.*}})
-// OLDABI: call void @_ZN14two_copy_ctors3fooENS_1BE(%"struct.two_copy_ctors::B"* noundef byval
-// NEWABI-LABEL: declare void @_ZN14two_copy_ctors3fooENS_1BE(%"struct.two_copy_ctors::B"* noundef)
-// OLDABI-LABEL: declare void @_ZN14two_copy_ctors3fooENS_1BE(%"struct.two_copy_ctors::B"* noundef byval
+// NEWABI: call void @_ZN14two_copy_ctors3fooENS_1BE(ptr noundef %{{.*}})
+// OLDABI: call void @_ZN14two_copy_ctors3fooENS_1BE(ptr noundef byval
+// NEWABI-LABEL: declare void @_ZN14two_copy_ctors3fooENS_1BE(ptr noundef)
+// OLDABI-LABEL: declare void @_ZN14two_copy_ctors3fooENS_1BE(ptr noundef byval
 
-// WIN64-LABEL: declare dso_local void @"?foo at two_copy_ctors@@YAXUB at 1@@Z"(%"struct.two_copy_ctors::B"* noundef)
+// WIN64-LABEL: declare dso_local void @"?foo at two_copy_ctors@@YAXUB at 1@@Z"(ptr noundef)
 }
 
 namespace definition_only {
@@ -222,9 +222,9 @@ struct A {
   void *p;
 };
 void *foo(A a) { return a.p; }
-// NEWABI-LABEL: define{{.*}} i8* @_ZN15definition_only3fooENS_1AE(%"struct.definition_only::A"*
-// OLDABI-LABEL: define{{.*}} i8* @_ZN15definition_only3fooENS_1AE(i8*
-// WIN64-LABEL: define dso_local noundef i8* @"?foo at definition_only@@YAPEAXUA at 1@@Z"(%"struct.definition_only::A"*
+// NEWABI-LABEL: define{{.*}} ptr @_ZN15definition_only3fooENS_1AE(ptr
+// OLDABI-LABEL: define{{.*}} ptr @_ZN15definition_only3fooENS_1AE(ptr
+// WIN64-LABEL: define dso_local noundef ptr @"?foo at definition_only@@YAPEAXUA at 1@@Z"(ptr
 }
 
 namespace deleted_by_member {
@@ -238,9 +238,9 @@ struct A {
   B b;
 };
 void *foo(A a) { return a.b.p; }
-// NEWABI-LABEL: define{{.*}} i8* @_ZN17deleted_by_member3fooENS_1AE(%"struct.deleted_by_member::A"*
-// OLDABI-LABEL: define{{.*}} i8* @_ZN17deleted_by_member3fooENS_1AE(i8*
-// WIN64-LABEL: define dso_local noundef i8* @"?foo at deleted_by_member@@YAPEAXUA at 1@@Z"(%"struct.deleted_by_member::A"*
+// NEWABI-LABEL: define{{.*}} ptr @_ZN17deleted_by_member3fooENS_1AE(ptr
+// OLDABI-LABEL: define{{.*}} ptr @_ZN17deleted_by_member3fooENS_1AE(ptr
+// WIN64-LABEL: define dso_local noundef ptr @"?foo at deleted_by_member@@YAPEAXUA at 1@@Z"(ptr
 }
 
 namespace deleted_by_base {
@@ -253,9 +253,9 @@ struct A : B {
   A();
 };
 void *foo(A a) { return a.p; }
-// NEWABI-LABEL: define{{.*}} i8* @_ZN15deleted_by_base3fooENS_1AE(%"struct.deleted_by_base::A"*
-// OLDABI-LABEL: define{{.*}} i8* @_ZN15deleted_by_base3fooENS_1AE(i8*
-// WIN64-LABEL: define dso_local noundef i8* @"?foo at deleted_by_base@@YAPEAXUA at 1@@Z"(%"struct.deleted_by_base::A"*
+// NEWABI-LABEL: define{{.*}} ptr @_ZN15deleted_by_base3fooENS_1AE(ptr
+// OLDABI-LABEL: define{{.*}} ptr @_ZN15deleted_by_base3fooENS_1AE(ptr
+// WIN64-LABEL: define dso_local noundef ptr @"?foo at deleted_by_base@@YAPEAXUA at 1@@Z"(ptr
 }
 
 namespace deleted_by_member_copy {
@@ -269,9 +269,9 @@ struct A {
   B b;
 };
 void *foo(A a) { return a.b.p; }
-// NEWABI-LABEL: define{{.*}} i8* @_ZN22deleted_by_member_copy3fooENS_1AE(%"struct.deleted_by_member_copy::A"*
-// OLDABI-LABEL: define{{.*}} i8* @_ZN22deleted_by_member_copy3fooENS_1AE(i8*
-// WIN64-LABEL: define dso_local noundef i8* @"?foo at deleted_by_member_copy@@YAPEAXUA at 1@@Z"(%"struct.deleted_by_member_copy::A"*
+// NEWABI-LABEL: define{{.*}} ptr @_ZN22deleted_by_member_copy3fooENS_1AE(ptr
+// OLDABI-LABEL: define{{.*}} ptr @_ZN22deleted_by_member_copy3fooENS_1AE(ptr
+// WIN64-LABEL: define dso_local noundef ptr @"?foo at deleted_by_member_copy@@YAPEAXUA at 1@@Z"(ptr
 }
 
 namespace deleted_by_base_copy {
@@ -284,9 +284,9 @@ struct A : B {
   A();
 };
 void *foo(A a) { return a.p; }
-// NEWABI-LABEL: define{{.*}} i8* @_ZN20deleted_by_base_copy3fooENS_1AE(%"struct.deleted_by_base_copy::A"*
-// OLDABI-LABEL: define{{.*}} i8* @_ZN20deleted_by_base_copy3fooENS_1AE(i8*
-// WIN64-LABEL: define dso_local noundef i8* @"?foo at deleted_by_base_copy@@YAPEAXUA at 1@@Z"(%"struct.deleted_by_base_copy::A"*
+// NEWABI-LABEL: define{{.*}} ptr @_ZN20deleted_by_base_copy3fooENS_1AE(ptr
+// OLDABI-LABEL: define{{.*}} ptr @_ZN20deleted_by_base_copy3fooENS_1AE(ptr
+// WIN64-LABEL: define dso_local noundef ptr @"?foo at deleted_by_base_copy@@YAPEAXUA at 1@@Z"(ptr
 }
 
 namespace explicit_delete {
@@ -295,9 +295,9 @@ struct A {
   A(const A &o) = delete;
   void *p;
 };
-// NEWABI-LABEL: define{{.*}} i8* @_ZN15explicit_delete3fooENS_1AE(%"struct.explicit_delete::A"*
-// OLDABI-LABEL: define{{.*}} i8* @_ZN15explicit_delete3fooENS_1AE(i8*
-// WIN64-LABEL: define dso_local noundef i8* @"?foo at explicit_delete@@YAPEAXUA at 1@@Z"(%"struct.explicit_delete::A"*
+// NEWABI-LABEL: define{{.*}} ptr @_ZN15explicit_delete3fooENS_1AE(ptr
+// OLDABI-LABEL: define{{.*}} ptr @_ZN15explicit_delete3fooENS_1AE(ptr
+// WIN64-LABEL: define dso_local noundef ptr @"?foo at explicit_delete@@YAPEAXUA at 1@@Z"(ptr
 void *foo(A a) { return a.p; }
 }
 
@@ -308,9 +308,9 @@ struct A {
   // Deleted copy ctor due to rvalue ref member.
   int &&ref;
 };
-// NEWABI-LABEL: define {{.*}} @_ZN28implicitly_deleted_copy_ctor3fooENS_1AE(%"struct.implicitly_deleted_copy_ctor::A"*
-// OLDABI-LABEL: define {{.*}} @_ZN28implicitly_deleted_copy_ctor3fooENS_1AE(i32*
-// WIN64-LABEL: define {{.*}} @"?foo at implicitly_deleted_copy_ctor@@YAAEAHUA at 1@@Z"(%"struct.implicitly_deleted_copy_ctor::A"*
+// NEWABI-LABEL: define {{.*}} @_ZN28implicitly_deleted_copy_ctor3fooENS_1AE(ptr
+// OLDABI-LABEL: define {{.*}} @_ZN28implicitly_deleted_copy_ctor3fooENS_1AE(ptr
+// WIN64-LABEL: define {{.*}} @"?foo at implicitly_deleted_copy_ctor@@YAAEAHUA at 1@@Z"(ptr
 int &foo(A a) { return a.ref; }
 
 struct B {
@@ -319,7 +319,7 @@ struct B {
   int &ref;
 };
 int &foo(B b) { return b.ref; }
-// CHECK-LABEL: define {{.*}} @_ZN28implicitly_deleted_copy_ctor3fooENS_1BE(i32*
+// CHECK-LABEL: define {{.*}} @_ZN28implicitly_deleted_copy_ctor3fooENS_1BE(ptr
 // WIN64-LABEL: define {{.*}} @"?foo at implicitly_deleted_copy_ctor@@YAAEAHUB at 1@@Z"(i64
 
 struct X { X(const X&); };
@@ -332,8 +332,8 @@ union C {
   int n;
 };
 int foo(C c) { return c.n; }
-// CHECK-LABEL: define {{.*}} @_ZN28implicitly_deleted_copy_ctor3fooENS_1CE(%"union.implicitly_deleted_copy_ctor::C"*
-// WIN64-LABEL: define {{.*}} @"?foo at implicitly_deleted_copy_ctor@@YAHTC at 1@@Z"(%"union.implicitly_deleted_copy_ctor::C"*
+// CHECK-LABEL: define {{.*}} @_ZN28implicitly_deleted_copy_ctor3fooENS_1CE(ptr
+// WIN64-LABEL: define {{.*}} @"?foo at implicitly_deleted_copy_ctor@@YAHTC at 1@@Z"(ptr
 
 struct D {
   D &operator=(const D&);
@@ -344,8 +344,8 @@ struct D {
   };
 };
 int foo(D d) { return d.n; }
-// CHECK-LABEL: define {{.*}} @_ZN28implicitly_deleted_copy_ctor3fooENS_1DE(%"struct.implicitly_deleted_copy_ctor::D"*
-// WIN64-LABEL: define {{.*}} @"?foo at implicitly_deleted_copy_ctor@@YAHUD at 1@@Z"(%"struct.implicitly_deleted_copy_ctor::D"*
+// CHECK-LABEL: define {{.*}} @_ZN28implicitly_deleted_copy_ctor3fooENS_1DE(ptr
+// WIN64-LABEL: define {{.*}} @"?foo at implicitly_deleted_copy_ctor@@YAHUD at 1@@Z"(ptr
 
 union E {
   // Passed direct: has non-deleted trivial copy ctor.

diff  --git a/clang/test/CodeGenCXX/unknown-anytype.cpp b/clang/test/CodeGenCXX/unknown-anytype.cpp
index 35957bc7b5547..3d5155e41f2b1 100644
--- a/clang/test/CodeGenCXX/unknown-anytype.cpp
+++ b/clang/test/CodeGenCXX/unknown-anytype.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -funknown-anytype -emit-llvm -o %t %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -funknown-anytype -emit-llvm -o %t %s
 // RUN: FileCheck -check-prefix COMMON %s < %t
 // RUN: FileCheck -check-prefix X86_64 %s < %t
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-apple-darwin10 -funknown-anytype -emit-llvm -o %t %s
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -funknown-anytype -emit-llvm -o %t %s
 // RUN: FileCheck -check-prefix COMMON %s < %t
 // RUN: FileCheck -check-prefix I386 %s < %t
 
@@ -12,7 +12,7 @@
 
 int test0() {
   extern __unknown_anytype test0_any;
-  // COMMON: load i32, i32* @test0_any
+  // COMMON: load i32, ptr @test0_any
   return (int) test0_any;
 }
 
@@ -38,7 +38,7 @@ float test2a() {
 
 float test3() {
   extern __unknown_anytype test3_any;
-  // COMMON: [[FN:%.*]] = load float (i32)*, float (i32)** @test3_any,
+  // COMMON: [[FN:%.*]] = load ptr, ptr @test3_any,
   // COMMON: call noundef float [[FN]](i32 noundef 5)
   return ((float(*)(int)) test3_any)(5);
 }
@@ -48,8 +48,8 @@ namespace test4 {
   extern __unknown_anytype test4_any2;
 
   int test() {
-    // COMMON: load i32, i32* @_ZN5test410test4_any1E
-    // COMMON: load i8, i8* @_ZN5test410test4_any2E
+    // COMMON: load i32, ptr @_ZN5test410test4_any1E
+    // COMMON: load i8, ptr @_ZN5test410test4_any2E
     return (int) test4_any1 + (char) test4_any2;
   }
 }
@@ -62,7 +62,7 @@ void test5() {
 
 extern "C" __unknown_anytype test6_any(float *);
 long test6() {
-  // COMMON: call i64 @test6_any(float* noundef null)
+  // COMMON: call i64 @test6_any(ptr noundef null)
   return (long long) test6_any(0);
 }
 
@@ -71,7 +71,7 @@ struct Test7 {
 };
 extern "C" __unknown_anytype test7_any(int);
 Test7 test7() {
-  // COMMON: call void @test7_any({{%.*}}* sret({{%.*}}) align 1 {{%.*}}, i32 noundef 5)
+  // COMMON: call void @test7_any(ptr sret({{%.*}}) align 1 {{%.*}}, i32 noundef 5)
   return (Test7) test7_any(5);
 }
 
@@ -106,7 +106,7 @@ void test8(Test8 *p) {
 
 extern "C" __unknown_anytype test9_foo;
 void *test9() {
-  // COMMON: ret i8* bitcast (i32* @test9_foo to i8*)
+  // COMMON: ret ptr @test9_foo
   return (int*) &test9_foo;
 }
 
@@ -119,7 +119,7 @@ void test10() {
 extern "C" __unknown_anytype malloc(...);
 void test11() {
   void *s = (void*)malloc(12);
-  // COMMON: call i8* (i32, ...) @malloc(i32 noundef 12)
+  // COMMON: call ptr (i32, ...) @malloc(i32 noundef 12)
   void *d = (void*)malloc(435);
-  // COMMON: call i8* (i32, ...) @malloc(i32 noundef 435)
+  // COMMON: call ptr (i32, ...) @malloc(i32 noundef 435)
 }

diff  --git a/clang/test/CodeGenCXX/vararg-conversion-ctor.cpp b/clang/test/CodeGenCXX/vararg-conversion-ctor.cpp
index ecea21aba3f0e..0c2d401f7fbe6 100644
--- a/clang/test/CodeGenCXX/vararg-conversion-ctor.cpp
+++ b/clang/test/CodeGenCXX/vararg-conversion-ctor.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o %t-64.ll
+// RUN: %clang_cc1 -triple x86_64-apple-darwin -std=c++11 -emit-llvm %s -o %t-64.ll
 // RUN: FileCheck -check-prefix CHECK-LPLL64 --input-file=%t-64.ll %s
 
 extern "C" int printf(...);
@@ -18,6 +18,6 @@ int main()
   A c[3];
 }
 
-// CHECK-LPLL64: call void (%struct.A*, ...)
-// CHECK-LPLL64: call void (%struct.A*, ...)
-// CHECK-LPLL64: call void (%struct.A*, ...)
+// CHECK-LPLL64: call void (ptr, ...)
+// CHECK-LPLL64: call void (ptr, ...)
+// CHECK-LPLL64: call void (ptr, ...)

diff  --git a/clang/test/CodeGenCXX/vararg-non-pod-ms-compat.cpp b/clang/test/CodeGenCXX/vararg-non-pod-ms-compat.cpp
index fa8b9ad566ca6..828c023a6cce0 100644
--- a/clang/test/CodeGenCXX/vararg-non-pod-ms-compat.cpp
+++ b/clang/test/CodeGenCXX/vararg-non-pod-ms-compat.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -Wno-error=non-pod-varargs -triple i686-pc-win32 -fms-compatibility -emit-llvm -o - %s | FileCheck %s -check-prefix=X86 -check-prefix=CHECK
-// RUN: %clang_cc1 -no-opaque-pointers -Wno-error=non-pod-varargs -triple x86_64-pc-win32 -fms-compatibility -emit-llvm -o - %s | FileCheck %s -check-prefix=X64 -check-prefix=CHECK
+// RUN: %clang_cc1 -Wno-error=non-pod-varargs -triple i686-pc-win32 -fms-compatibility -emit-llvm -o - %s | FileCheck %s -check-prefix=X86 -check-prefix=CHECK
+// RUN: %clang_cc1 -Wno-error=non-pod-varargs -triple x86_64-pc-win32 -fms-compatibility -emit-llvm -o - %s | FileCheck %s -check-prefix=X64 -check-prefix=CHECK
 
 struct X {
   X();
@@ -13,13 +13,13 @@ void test(X x) {
   // CHECK-LABEL: define dso_local void @"?test@@YAXUX@@@Z"
 
   // X86: %[[argmem:[^ ]*]] = alloca inalloca <{ %struct.X }>
-  // X86: call void (<{ %struct.X }>*, ...) bitcast (void (...)* @"?vararg@@YAXZZ" to void (<{ %struct.X }>*, ...)*)(<{ %struct.X }>* inalloca(<{ %struct.X }>) %[[argmem]])
+  // X86: call void (ptr, ...) @"?vararg@@YAXZZ"(ptr inalloca(<{ %struct.X }>) %[[argmem]])
 
   // X64: alloca %struct.X
 
   // X64: %[[agg:[^ ]*]] = alloca %struct.X
-  // X64: %[[valptr:[^ ]*]] = getelementptr inbounds %struct.X, %struct.X* %[[agg]], i32 0, i32 0
-  // X64: %[[val:[^ ]*]] = load i32, i32* %[[valptr]]
+  // X64: %[[valptr:[^ ]*]] = getelementptr inbounds %struct.X, ptr %[[agg]], i32 0, i32 0
+  // X64: %[[val:[^ ]*]] = load i32, ptr %[[valptr]]
   // X64: call void (...) @"?vararg@@YAXZZ"(i32 %[[val]])
 
   // CHECK-NOT: llvm.trap

diff  --git a/clang/test/CodeGenCXX/varargs.cpp b/clang/test/CodeGenCXX/varargs.cpp
index 523b881b09f30..e6358b3d1b6b1 100644
--- a/clang/test/CodeGenCXX/varargs.cpp
+++ b/clang/test/CodeGenCXX/varargs.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm %s -o - | FileCheck %s
 
 // rdar://7309675
 // PR4678
@@ -33,11 +33,8 @@ namespace test1 {
   // CHECK-LABEL:    define{{.*}} void @_ZN5test14testEv()
   // CHECK:      [[X:%.*]] = alloca [[A:%.*]], align 4
   // CHECK-NEXT: [[TMP:%.*]] = alloca [[A]], align 4
-  // CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[TMP]] to i8*
-  // CHECK-NEXT: [[T1:%.*]] = bitcast [[A]]* [[X]] to i8*
-  // CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 4 [[T0]], i8* align 4 [[T1]], i64 8, i1 false)
-  // CHECK-NEXT: [[T0:%.*]] = bitcast [[A]]* [[TMP]] to i64*
-  // CHECK-NEXT: [[T1:%.*]] = load i64, i64* [[T0]], align 4
+  // CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 4 [[TMP]], ptr align 4 [[X]], i64 8, i1 false)
+  // CHECK-NEXT: [[T1:%.*]] = load i64, ptr [[TMP]], align 4
   // CHECK-NEXT: call void (...) @_ZN5test13fooEz(i64 [[T1]])
   // CHECK-NEXT: ret void
 }

diff  --git a/clang/test/CodeGenCXX/vector-splat-conversion.cpp b/clang/test/CodeGenCXX/vector-splat-conversion.cpp
index 7526107ec4596..b8dba9314d992 100644
--- a/clang/test/CodeGenCXX/vector-splat-conversion.cpp
+++ b/clang/test/CodeGenCXX/vector-splat-conversion.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple arm64-apple-ios8.1.0 -std=c++11 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple arm64-apple-ios8.1.0 -std=c++11 -emit-llvm -o - | FileCheck %s
 
 typedef __attribute__((__ext_vector_type__(8))) float vector_float8;
 
@@ -11,10 +11,10 @@ void MandelbrotPolyCalcSIMD8() {
   float8 vABS;
   auto vLT  = vABS < v4;
   // CHECK: store <8 x float>
-  // CHECK: [[ZERO:%.*]] = load <8 x float>, <8 x float>* [[VARBS:%.*]]
+  // CHECK: [[ZERO:%.*]] = load <8 x float>, ptr [[VARBS:%.*]]
   // CHECK: [[CMP:%.*]] = fcmp olt <8 x float> [[ZERO]]
   // CHECK: [[SEXT:%.*]] = sext <8 x i1> [[CMP]] to <8 x i32>
-  // CHECK: store <8 x i32> [[SEXT]], <8 x i32>* [[VLT:%.*]]
+  // CHECK: store <8 x i32> [[SEXT]], ptr [[VLT:%.*]]
 }
 
 typedef __attribute__((__ext_vector_type__(4))) int int4;
@@ -54,7 +54,7 @@ typedef __attribute__((vector_size(8))) int gcc_int_2;
 gcc_int_2 FloatToIntConversion(gcc_int_2 Int2, float f) {
   return Int2 + f;
   // CHECK: %[[LOAD_INT:.+]] = load <2 x i32>
-  // CHECK: %[[LOAD:.+]] = load float, float*
+  // CHECK: %[[LOAD:.+]] = load float, ptr
   // CHECK: %[[CONV:.+]] = fptosi float %[[LOAD]] to i32
   // CHECK: %[[INSERT:.+]] = insertelement <2 x i32> poison, i32 %[[CONV]], i32 0
   // CHECK: %[[SPLAT:.+]] = shufflevector <2 x i32> %[[INSERT]], <2 x i32> poison, <2 x i32> zeroinitializer

diff  --git a/clang/test/CodeGenCXX/virt-dtor-gen.cpp b/clang/test/CodeGenCXX/virt-dtor-gen.cpp
index a4c884529a68a..708106b36606a 100644
--- a/clang/test/CodeGenCXX/virt-dtor-gen.cpp
+++ b/clang/test/CodeGenCXX/virt-dtor-gen.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -o - -triple %itanium_abi_triple -emit-llvm %s | FileCheck %s
+// RUN: %clang_cc1 -o - -triple %itanium_abi_triple -emit-llvm %s | FileCheck %s
 // PR5483
 
 // Make sure we generate all three forms of the destructor when it is virtual.
@@ -7,4 +7,4 @@ class Foo {
 };
 Foo::~Foo() {}
 
-// CHECK-LABEL: define {{.*}}void @_ZN3FooD0Ev(%class.Foo* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define {{.*}}void @_ZN3FooD0Ev(ptr {{[^,]*}} %this) unnamed_addr

diff  --git a/clang/test/CodeGenCXX/virtual-base-cast.cpp b/clang/test/CodeGenCXX/virtual-base-cast.cpp
index 9ad0709c0dfb4..57388431e9007 100644
--- a/clang/test/CodeGenCXX/virtual-base-cast.cpp
+++ b/clang/test/CodeGenCXX/virtual-base-cast.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple i686-pc-linux-gnu | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -o - -triple i686-pc-win32 | FileCheck -check-prefix MSVC %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple i686-pc-linux-gnu | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm %s -o - -triple i686-pc-win32 | FileCheck -check-prefix MSVC %s
 
 struct A { int a; virtual int aa(); };
 struct B { int b; virtual int bb(); };
@@ -13,53 +13,47 @@ D* x;
 
 A* a() { return x; }
 // CHECK: @_Z1av() [[NUW:#[0-9]+]]
-// CHECK: [[VBASEOFFSETPTRA:%[a-zA-Z0-9\.]+]] = getelementptr i8, i8* {{.*}}, i64 -16
-// CHECK: [[CASTVBASEOFFSETPTRA:%[a-zA-Z0-9\.]+]] = bitcast i8* [[VBASEOFFSETPTRA]] to i32*
-// CHECK: load i32, i32* [[CASTVBASEOFFSETPTRA]]
+// CHECK: [[VBASEOFFSETPTRA:%[a-zA-Z0-9\.]+]] = getelementptr i8, ptr {{.*}}, i64 -16
+// CHECK: load i32, ptr [[VBASEOFFSETPTRA]]
 // CHECK: }
 
 // MSVC: @"?a@@YAPAUA@@XZ"() [[NUW:#[0-9]+]] {
-// MSVC:   %[[vbptr_off:.*]] = getelementptr inbounds i8, i8* {{.*}}, i32 0
-// MSVC:   %[[vbptr:.*]] = bitcast i8* %[[vbptr_off]] to i32**
-// MSVC:   %[[vbtable:.*]] = load i32*, i32** %[[vbptr]]
-// MSVC:   %[[entry:.*]] = getelementptr inbounds i32, i32* {{.*}}, i32 1
-// MSVC:   %[[offset:.*]] = load i32, i32* %[[entry]]
+// MSVC:   %[[vbptr_off:.*]] = getelementptr inbounds i8, ptr {{.*}}, i32 0
+// MSVC:   %[[vbtable:.*]] = load ptr, ptr %[[vbptr_off]]
+// MSVC:   %[[entry:.*]] = getelementptr inbounds i32, ptr {{.*}}, i32 1
+// MSVC:   %[[offset:.*]] = load i32, ptr %[[entry]]
 // MSVC:   add nsw i32 0, %[[offset]]
 // MSVC: }
 
 B* b() { return x; }
 // CHECK: @_Z1bv() [[NUW]]
-// CHECK: [[VBASEOFFSETPTRA:%[a-zA-Z0-9\.]+]] = getelementptr i8, i8* {{.*}}, i64 -20
-// CHECK: [[CASTVBASEOFFSETPTRA:%[a-zA-Z0-9\.]+]] = bitcast i8* [[VBASEOFFSETPTRA]] to i32*
-// CHECK: load i32, i32* [[CASTVBASEOFFSETPTRA]]
+// CHECK: [[VBASEOFFSETPTRA:%[a-zA-Z0-9\.]+]] = getelementptr i8, ptr {{.*}}, i64 -20
+// CHECK: load i32, ptr [[VBASEOFFSETPTRA]]
 // CHECK: }
 
 // Same as 'a' except we use a 
diff erent vbtable offset.
 // MSVC: @"?b@@YAPAUB@@XZ"() [[NUW:#[0-9]+]] {
-// MSVC:   %[[vbptr_off:.*]] = getelementptr inbounds i8, i8* {{.*}}, i32 0
-// MSVC:   %[[vbptr:.*]] = bitcast i8* %[[vbptr_off]] to i32**
-// MSVC:   %[[vbtable:.*]] = load i32*, i32** %[[vbptr]]
-// MSVC:   %[[entry:.*]] = getelementptr inbounds i32, i32* {{.*}}, i32 2
-// MSVC:   %[[offset:.*]] = load i32, i32* %[[entry]]
+// MSVC:   %[[vbptr_off:.*]] = getelementptr inbounds i8, ptr {{.*}}, i32 0
+// MSVC:   %[[vbtable:.*]] = load ptr, ptr %[[vbptr_off]]
+// MSVC:   %[[entry:.*]] = getelementptr inbounds i32, ptr {{.*}}, i32 2
+// MSVC:   %[[offset:.*]] = load i32, ptr %[[entry]]
 // MSVC:   add nsw i32 0, %[[offset]]
 // MSVC: }
 
 
 BB* c() { return x; }
 // CHECK: @_Z1cv() [[NUW]]
-// CHECK: [[VBASEOFFSETPTRC:%[a-zA-Z0-9\.]+]] = getelementptr i8, i8* {{.*}}, i64 -24
-// CHECK: [[CASTVBASEOFFSETPTRC:%[a-zA-Z0-9\.]+]] = bitcast i8* [[VBASEOFFSETPTRC]] to i32*
-// CHECK: [[VBASEOFFSETC:%[a-zA-Z0-9\.]+]] = load i32, i32* [[CASTVBASEOFFSETPTRC]]
+// CHECK: [[VBASEOFFSETPTRC:%[a-zA-Z0-9\.]+]] = getelementptr i8, ptr {{.*}}, i64 -24
+// CHECK: [[VBASEOFFSETC:%[a-zA-Z0-9\.]+]] = load i32, ptr [[VBASEOFFSETPTRC]]
 // CHECK: add i32 [[VBASEOFFSETC]], 8
 // CHECK: }
 
 // Same as 'a' except we use a 
diff erent vbtable offset.
 // MSVC: @"?c@@YAPAUBB@@XZ"() [[NUW:#[0-9]+]] {
-// MSVC:   %[[vbptr_off:.*]] = getelementptr inbounds i8, i8* {{.*}}, i32 0
-// MSVC:   %[[vbptr:.*]] = bitcast i8* %[[vbptr_off]] to i32**
-// MSVC:   %[[vbtable:.*]] = load i32*, i32** %[[vbptr]]
-// MSVC:   %[[entry:.*]] = getelementptr inbounds i32, i32* {{.*}}, i32 4
-// MSVC:   %[[offset:.*]] = load i32, i32* %[[entry]]
+// MSVC:   %[[vbptr_off:.*]] = getelementptr inbounds i8, ptr {{.*}}, i32 0
+// MSVC:   %[[vbtable:.*]] = load ptr, ptr %[[vbptr_off]]
+// MSVC:   %[[entry:.*]] = getelementptr inbounds i32, ptr {{.*}}, i32 4
+// MSVC:   %[[offset:.*]] = load i32, ptr %[[entry]]
 // MSVC:   add nsw i32 0, %[[offset]]
 // MSVC: }
 
@@ -74,11 +68,10 @@ BB* d() { return y; }
 // Same as 'c' except the vbptr offset is 4, changing the initial GEP and the
 // final add.
 // MSVC: @"?d@@YAPAUBB@@XZ"() [[NUW:#[0-9]+]] {
-// MSVC:   %[[vbptr_off:.*]] = getelementptr inbounds i8, i8* {{.*}}, i32 4
-// MSVC:   %[[vbptr:.*]] = bitcast i8* %[[vbptr_off]] to i32**
-// MSVC:   %[[vbtable:.*]] = load i32*, i32** %[[vbptr]]
-// MSVC:   %[[entry:.*]] = getelementptr inbounds i32, i32* {{.*}}, i32 4
-// MSVC:   %[[offset:.*]] = load i32, i32* %[[entry]]
+// MSVC:   %[[vbptr_off:.*]] = getelementptr inbounds i8, ptr {{.*}}, i32 4
+// MSVC:   %[[vbtable:.*]] = load ptr, ptr %[[vbptr_off]]
+// MSVC:   %[[entry:.*]] = getelementptr inbounds i32, ptr {{.*}}, i32 4
+// MSVC:   %[[offset:.*]] = load i32, ptr %[[entry]]
 // MSVC:   add nsw i32 4, %[[offset]]
 // MSVC: }
 

diff  --git a/clang/test/CodeGenCXX/virtual-base-destructor-call.cpp b/clang/test/CodeGenCXX/virtual-base-destructor-call.cpp
index 4fd237968abe5..7633d29e82cfd 100644
--- a/clang/test/CodeGenCXX/virtual-base-destructor-call.cpp
+++ b/clang/test/CodeGenCXX/virtual-base-destructor-call.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple %itanium_abi_triple -emit-llvm -o - | FileCheck %s
 
 struct basic_ios{~basic_ios(); };
 
@@ -18,34 +18,34 @@ int main() {
 
 // basic_iostream's complete dtor calls its base dtor, then its
 // virtual base's dtor.
-//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED1Ev(%struct.basic_iostream* {{.*}}%this) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED1Ev(ptr {{.*}}%this) unnamed_addr
 //  CHECK: call {{.*}} @_ZN14basic_iostreamIcED2Ev
 //  CHECK: call {{.*}} @_ZN9basic_iosD2Ev
 
 // basic_istream's complete dtor calls the base dtor,
 // then its virtual base's base dtor.
-//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED1Ev(%struct.basic_istream* {{.*}}%this) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED1Ev(ptr {{.*}}%this) unnamed_addr
 //  CHECK: call {{.*}} @_ZN13basic_istreamIcED2Ev
 //  CHECK: call {{.*}} @_ZN9basic_iosD2Ev
 
 // basic_istream's deleting dtor calls the complete dtor, then
 // operator delete().
-//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED0Ev(%struct.basic_istream* {{.*}}%this) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED0Ev(ptr {{.*}}%this) unnamed_addr
 //  CHECK: call {{.*}} @_ZN13basic_istreamIcED1Ev
 //  CHECK: call {{.*}} @_ZdlPv
 
 // basic_iostream's deleting dtor calls its complete dtor, then
 // operator delete().
-//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED0Ev(%struct.basic_iostream* {{.*}}%this) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED0Ev(ptr {{.*}}%this) unnamed_addr
 //  CHECK: call {{.*}} @_ZN14basic_iostreamIcED1Ev
 //  CHECK: call {{.*}} @_ZdlPv
 
 // basic_istream's base dtor is a no-op.
-//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED2Ev(%struct.basic_istream* {{.*}}%this, i8** noundef %vtt) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN13basic_istreamIcED2Ev(ptr {{.*}}%this, ptr noundef %vtt) unnamed_addr
 //  CHECK-NOT: call
 //  CHECK: }
 
 // basic_iostream's base dtor calls its non-virtual base dtor.
-//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED2Ev(%struct.basic_iostream* {{.*}}%this, i8** noundef %vtt) unnamed_addr
+//  CHECK: define linkonce_odr {{.*}} @_ZN14basic_iostreamIcED2Ev(ptr {{.*}}%this, ptr noundef %vtt) unnamed_addr
 //  CHECK: call {{.*}} @_ZN13basic_istreamIcED2Ev
 //  CHECK: }

diff  --git a/clang/test/CodeGenCXX/virtual-functions-incomplete-types.cpp b/clang/test/CodeGenCXX/virtual-functions-incomplete-types.cpp
index 92005a1022167..5e19d92a36b99 100644
--- a/clang/test/CodeGenCXX/virtual-functions-incomplete-types.cpp
+++ b/clang/test/CodeGenCXX/virtual-functions-incomplete-types.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
 
 struct A;
 
@@ -9,7 +9,7 @@ struct B {
 
 void B::f() { }
 
-// CHECK-LABEL: define{{.*}} i32 @_ZN1D1gEv(%struct.D* {{[^,]*}} %this)
+// CHECK-LABEL: define{{.*}} i32 @_ZN1D1gEv(ptr {{[^,]*}} %this)
 // CHECK: declare void @_ZN1B1gEv()
 
 struct C;

diff  --git a/clang/test/CodeGenCXX/virtual-operator-call.cpp b/clang/test/CodeGenCXX/virtual-operator-call.cpp
index ff72ba8d126af..0ec2d48212b65 100644
--- a/clang/test/CodeGenCXX/virtual-operator-call.cpp
+++ b/clang/test/CodeGenCXX/virtual-operator-call.cpp
@@ -1,11 +1,11 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple i386-unknown-unknown -emit-llvm -o - | FileCheck %s
 
 struct A {
   virtual int operator-();
 };
 
 void f(A a, A *ap) {
-  // CHECK: call noundef i32 @_ZN1AngEv(%struct.A* {{[^,]*}} %a)
+  // CHECK: call noundef i32 @_ZN1AngEv(ptr {{[^,]*}} %a)
   -a;
 
   // CHECK: call noundef i32 %

diff  --git a/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp b/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp
index ff6a62bca73b5..d388da3a10a80 100644
--- a/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp
+++ b/clang/test/CodeGenCXX/visibility-inlines-hidden.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-unknown-unknown -std=c++11 -fvisibility-inlines-hidden -emit-llvm -o - %s -O2 -disable-llvm-passes | FileCheck %s
+// RUN: %clang_cc1 -triple i386-unknown-unknown -std=c++11 -fvisibility-inlines-hidden -emit-llvm -o - %s -O2 -disable-llvm-passes | FileCheck %s
 
 // The trickery with optimization in the run line is to get IR
 // generation to emit available_externally function bodies, but not
@@ -166,7 +166,7 @@ namespace test6 {
 namespace PR34811 {
   template <typename T> void tf() {}
   
-  // CHECK-LABEL: define linkonce_odr hidden noundef i8* @_ZN7PR348111fEv(
+  // CHECK-LABEL: define linkonce_odr hidden noundef ptr @_ZN7PR348111fEv(
   inline void *f() {
     auto l = []() {};
     // CHECK-LABEL: define linkonce_odr hidden void @_ZN7PR348112tfIZNS_1fEvEUlvE_EEvv(

diff  --git a/clang/test/CodeGenCXX/vla-consruct.cpp b/clang/test/CodeGenCXX/vla-consruct.cpp
index 3f4f85c00bf25..62b6757f8a589 100644
--- a/clang/test/CodeGenCXX/vla-consruct.cpp
+++ b/clang/test/CodeGenCXX/vla-consruct.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -O0 %s -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fcxx-exceptions -fexceptions -O0 %s -emit-llvm -o - | FileCheck %s
 
 extern "C" int printf(const char *, ...);
 
@@ -27,20 +27,20 @@ void test(int n) {
   // CHECK-NEXT: [[sizeof_array_t_0_0:%.+]] = alloca
   // CHECK-NEXT: [[sizeof_array_t_0:%.+]] = alloca
   // CHECK-NEXT: [[sizeof_array_t:%.+]] = alloca
-  // CHECK-NEXT: [[exn_slot:%.+]] = alloca i8*
+  // CHECK-NEXT: [[exn_slot:%.+]] = alloca ptr
   // CHECK-NEXT: [[ehselector_slot:%.+]] = alloca i32
-  // CHECK-NEXT: store i32 [[n]], i32* [[n_addr]]
-  // CHECK-NEXT: [[t0:%.+]] = load i32, i32* [[n_addr]]
+  // CHECK-NEXT: store i32 [[n]], ptr [[n_addr]]
+  // CHECK-NEXT: [[t0:%.+]] = load i32, ptr [[n_addr]]
   // CHECK-NEXT: [[t1:%.+]] = zext i32 [[t0]] to i64
-  // CHECK-NEXT: [[t2:%.+]] = load i32, i32* [[n_addr]]
+  // CHECK-NEXT: [[t2:%.+]] = load i32, ptr [[n_addr]]
   // CHECK-NEXT: [[add:%.+]] = add nsw i32 [[t2]], 1
   // CHECK-NEXT: [[t3:%.+]] = zext i32 [[add]] to i64
-  // CHECK-NEXT: [[t4:%.+]] = call i8* @llvm.stacksave()
-  // CHECK-NEXT: store i8* [[t4]], i8** [[saved_stack]]
+  // CHECK-NEXT: [[t4:%.+]] = call ptr @llvm.stacksave()
+  // CHECK-NEXT: store ptr [[t4]], ptr [[saved_stack]]
   // CHECK-NEXT: [[t5:%.+]] = mul nuw i64 [[t1]], [[t3]]
   // CHECK-NEXT: [[vla:%.+]] = alloca [[struct_S]], i64 [[t5]]
-  // CHECK-NEXT: store i64 [[t1]], i64* [[vla_expr]]
-  // CHECK-NEXT: store i64 [[t3]], i64* [[vla_expr1]]
+  // CHECK-NEXT: store i64 [[t1]], ptr [[vla_expr]]
+  // CHECK-NEXT: store i64 [[t3]], ptr [[vla_expr1]]
   // CHECK-NEXT: [[t6:%.+]] = mul nuw i64 [[t1]], [[t3]]
   // CHECK-NEXT: [[isempty:%.+]] = icmp eq i64 [[t6]], 0
   // CHECK-NEXT: br i1 [[isempty]], label %[[arrayctor_cont:.+]], label %[[new_ctorloop:.+]]
@@ -48,14 +48,14 @@ void test(int n) {
   S array_t[n][n + 1];
 
   // CHECK: [[new_ctorloop]]
-  // CHECK-NEXT: [[arrayctor_end:%.+]] = getelementptr inbounds [[struct_S]], [[struct_S]]* [[vla]], i64 [[t6]]
+  // CHECK-NEXT: [[arrayctor_end:%.+]] = getelementptr inbounds [[struct_S]], ptr [[vla]], i64 [[t6]]
   // CHECK-NEXT: br label %[[arrayctor_loop:.+]]
 
   // CHECK: [[arrayctor_loop]]
-  // CHECK-NEXT: [[arrayctor_cur:%.+]] = phi [[struct_S]]* [ [[vla]], %[[new_ctorloop]] ], [ [[arrayctor_next:%.+]], %[[arrayctor_loop]] ]
-  // CHECK-NEXT: call void [[ctor:@.+]]([[struct_S]]* {{[^,]*}} [[arrayctor_cur]])
-  // CHECK-NEXT: [[arrayctor_next]] = getelementptr inbounds [[struct_S]], [[struct_S]]* [[arrayctor_cur]], i64 1
-  // CHECK-NEXT: [[arrayctor_done:%.+]] = icmp eq [[struct_S]]* [[arrayctor_next]], [[arrayctor_end]]
+  // CHECK-NEXT: [[arrayctor_cur:%.+]] = phi ptr [ [[vla]], %[[new_ctorloop]] ], [ [[arrayctor_next:%.+]], %[[arrayctor_loop]] ]
+  // CHECK-NEXT: call void [[ctor:@.+]](ptr {{[^,]*}} [[arrayctor_cur]])
+  // CHECK-NEXT: [[arrayctor_next]] = getelementptr inbounds [[struct_S]], ptr [[arrayctor_cur]], i64 1
+  // CHECK-NEXT: [[arrayctor_done:%.+]] = icmp eq ptr [[arrayctor_next]], [[arrayctor_end]]
   // CHECK-NEXT: br i1 [[arrayctor_done]], label %[[arrayctor_cont]], label %[[arrayctor_loop]]
 
   int sizeof_S = sizeof(S);
@@ -65,68 +65,68 @@ void test(int n) {
   print(n, sizeof_S, sizeof_array_t_0_0, sizeof_array_t_0, sizeof_array_t);
 
   //  CHECK: [[arrayctor_cont]]
-  //  CHECK-NEXT: store i32 68, i32* [[sizeof_S]]
-  //  CHECK-NEXT: store i32 68, i32* [[sizeof_array_t_0_0]]
+  //  CHECK-NEXT: store i32 68, ptr [[sizeof_S]]
+  //  CHECK-NEXT: store i32 68, ptr [[sizeof_array_t_0_0]]
   //  CHECK: [[t8:%.+]] = mul nuw i64 68, [[t3]]
   //  CHECK-NEXT: [[conv:%.+]] = trunc i64 [[t8]] to i32
-  //  CHECK-NEXT: store i32 [[conv]], i32* [[sizeof_array_t_0]]
+  //  CHECK-NEXT: store i32 [[conv]], ptr [[sizeof_array_t_0]]
   //  CHECK-NEXT: [[t9:%.+]] = mul nuw i64 [[t1]], [[t3]]
   //  CHECK-NEXT: [[t10:%.+]] = mul nuw i64 68, [[t9]]
   //  CHECK-NEXT: [[conv1:%.+]] = trunc i64 [[t10]] to i32
-  //  CHECK-NEXT: store i32 [[conv1]], i32* [[sizeof_array_t]]
-  //  CHECK-NEXT: [[t11:%.+]] = load i32, i32* [[n_addr:%.+]]
-  //  CHECK-NEXT: [[t12:%.+]] = load i32, i32* [[sizeof_S]]
-  //  CHECK-NEXT: [[t13:%.+]] = load i32, i32* [[sizeof_array_t_0_0]]
-  //  CHECK-NEXT: [[t14:%.+]] = load i32, i32* [[sizeof_array_t_0]]
-  //  CHECK-NEXT: [[t15:%.+]] = load i32, i32* [[sizeof_array_t]]
+  //  CHECK-NEXT: store i32 [[conv1]], ptr [[sizeof_array_t]]
+  //  CHECK-NEXT: [[t11:%.+]] = load i32, ptr [[n_addr:%.+]]
+  //  CHECK-NEXT: [[t12:%.+]] = load i32, ptr [[sizeof_S]]
+  //  CHECK-NEXT: [[t13:%.+]] = load i32, ptr [[sizeof_array_t_0_0]]
+  //  CHECK-NEXT: [[t14:%.+]] = load i32, ptr [[sizeof_array_t_0]]
+  //  CHECK-NEXT: [[t15:%.+]] = load i32, ptr [[sizeof_array_t]]
   //  CHECK-NEXT: invoke void @{{.*print.*}}(i32 noundef [[t11]], i32 noundef [[t12]], i32 noundef [[t13]], i32 noundef [[t14]], i32 noundef [[t15]])
   //  CHECK-NEXT: to label %[[invoke_cont:.+]] unwind label %[[lpad:.+]]
 
   //  CHECK: [[invoke_cont]]
   //  CHECK-NEXT: [[t16:%.+]] = mul nuw i64 [[t1]], [[t3]]
-  //  CHECK-NEXT: [[t17:%.+]] = getelementptr inbounds [[struct_S]], [[struct_S]]* [[vla]], i64 [[t16]]
-  //  CHECK-NEXT: [[arraydestroy_isempty:%.+]] = icmp eq [[struct_S]]* [[vla]], [[t17]]
+  //  CHECK-NEXT: [[t17:%.+]] = getelementptr inbounds [[struct_S]], ptr [[vla]], i64 [[t16]]
+  //  CHECK-NEXT: [[arraydestroy_isempty:%.+]] = icmp eq ptr [[vla]], [[t17]]
   //  CHECK-NEXT: br i1 [[arraydestroy_isempty]], label %[[arraydestroy_done2:.+]], label %[[arraydestroy_body:.+]]
 
   //  CHECK: [[arraydestroy_body]]
-  //  CHECK-NEXT: [[arraydestroy_elementPast:%.+]] = phi [[struct_S]]* [ [[t17]], %[[invoke_cont]] ], [ [[arraydestroy_element:%.+]], %[[arraydestroy_body]] ]
-  //  CHECK-NEXT: [[arraydestroy_element]] = getelementptr inbounds [[struct_S]], [[struct_S]]* [[arraydestroy_elementPast]]
-  //  CHECK-NEXT: call void @[[dtor:.+]]([[struct_S]]* {{[^,]*}} [[arraydestroy_element]])
-  //  CHECK-NEXT: [[arraydestroy_done:%.+]] = icmp eq [[struct_S]]* [[arraydestroy_element]], [[vla]]
+  //  CHECK-NEXT: [[arraydestroy_elementPast:%.+]] = phi ptr [ [[t17]], %[[invoke_cont]] ], [ [[arraydestroy_element:%.+]], %[[arraydestroy_body]] ]
+  //  CHECK-NEXT: [[arraydestroy_element]] = getelementptr inbounds [[struct_S]], ptr [[arraydestroy_elementPast]]
+  //  CHECK-NEXT: call void @[[dtor:.+]](ptr {{[^,]*}} [[arraydestroy_element]])
+  //  CHECK-NEXT: [[arraydestroy_done:%.+]] = icmp eq ptr [[arraydestroy_element]], [[vla]]
   //  CHECK-NEXT: br i1 [[arraydestroy_done]], label %[[arraydestroy_done2]], label %[[arraydestroy_body]]
 
   //  CHECK: [[arraydestroy_done2]]
-  //  CHECK-NEXT: [[t17:%.+]] = load i8*, i8** [[saved_stack]]
-  //  CHECK-NEXT: call void @llvm.stackrestore(i8* [[t17]])
+  //  CHECK-NEXT: [[t17:%.+]] = load ptr, ptr [[saved_stack]]
+  //  CHECK-NEXT: call void @llvm.stackrestore(ptr [[t17]])
   //  CHECK: ret void
 
   //  CHECK: [[lpad]]
-  //  CHECK-NEXT: [[t19:%.+]] = landingpad { i8*, i32 }
-  //  CHECK: [[t20:%.+]] = extractvalue { i8*, i32 } [[t19]], 0
-  //  CHECK-NEXT: store i8* [[t20]], i8** [[exn_slot]]
-  //  CHECK-NEXT: [[t21:%.+]] = extractvalue { i8*, i32 } [[t19]], 1
-  //  CHECK-NEXT: store i32 [[t21]], i32* [[ehselector_slot]]
+  //  CHECK-NEXT: [[t19:%.+]] = landingpad { ptr, i32 }
+  //  CHECK: [[t20:%.+]] = extractvalue { ptr, i32 } [[t19]], 0
+  //  CHECK-NEXT: store ptr [[t20]], ptr [[exn_slot]]
+  //  CHECK-NEXT: [[t21:%.+]] = extractvalue { ptr, i32 } [[t19]], 1
+  //  CHECK-NEXT: store i32 [[t21]], ptr [[ehselector_slot]]
   //  CHECK-NEXT: [[t22:%.+]] = mul nuw i64 [[t1]], [[t3]]
-  //  CHECK-NEXT: [[t23:%.+]] = getelementptr inbounds [[struct_S]], [[struct_S]]* [[vla]], i64 [[t22]]
-  //  CHECK-NEXT: [[arraydestroy_isempty3:%.+]] = icmp eq [[struct_S]]* [[vla]], [[t23]]
+  //  CHECK-NEXT: [[t23:%.+]] = getelementptr inbounds [[struct_S]], ptr [[vla]], i64 [[t22]]
+  //  CHECK-NEXT: [[arraydestroy_isempty3:%.+]] = icmp eq ptr [[vla]], [[t23]]
   //  CHECK-NEXT: br i1 [[arraydestroy_isempty3]], label %[[arraydestroy_done8:.+]], label %[[arraydestroy_body4:.+]]
 
   //  CHECK: [[arraydestroy_body4]]
-  //  CHECK: [[arraydestroy_elementPast5:%.+]] = phi [[struct_S]]* [ [[t23]], %[[lpad]] ], [ [[arraydestroy_element6:.+]], %[[arraydestroy_body4]] ]
-  //  CHECK-NEXT: [[arraydestroy_element6]] = getelementptr inbounds [[struct_S]], [[struct_S]]* [[arraydestroy_elementPast5]], i64 -1
-  //  CHECK-NEXT: call void @[[dtor]]([[struct_S]]* {{[^,]*}} [[arraydestroy_element6]])
-  //  CHECK-NEXT: [[arraydestroy_done7:%.+]] = icmp eq [[struct_S]]* [[arraydestroy_element6]], [[vla]]
+  //  CHECK: [[arraydestroy_elementPast5:%.+]] = phi ptr [ [[t23]], %[[lpad]] ], [ [[arraydestroy_element6:.+]], %[[arraydestroy_body4]] ]
+  //  CHECK-NEXT: [[arraydestroy_element6]] = getelementptr inbounds [[struct_S]], ptr [[arraydestroy_elementPast5]], i64 -1
+  //  CHECK-NEXT: call void @[[dtor]](ptr {{[^,]*}} [[arraydestroy_element6]])
+  //  CHECK-NEXT: [[arraydestroy_done7:%.+]] = icmp eq ptr [[arraydestroy_element6]], [[vla]]
   //  CHECK-NEXT: br i1 [[arraydestroy_done7]], label %[[arraydestroy_done8]], label %[[arraydestroy_body4]]
 
   //  CHECK: [[arraydestroy_done8]]
   //  CHECK-NEXT: br label %[[eh_resume:.+]]
 
   //  CHECK: [[eh_resume]]
-  //  CHECK-NEXT: [[exn:%.+]] = load i8*, i8** [[exn_slot]]
-  //  CHECK-NEXT: [[sel:%.+]] = load i32, i32* [[ehselector_slot]]
-  //  CHECK-NEXT: [[lpad_val:%.+]] = insertvalue { i8*, i32 } undef, i8* [[exn]], 0
-  //  CHECK-NEXT: [[lpad_val9:%.+]] = insertvalue { i8*, i32 } [[lpad_val]], i32 [[sel]], 1
-  //  CHECK-NEXT: resume { i8*, i32 } [[lpad_val9]]
+  //  CHECK-NEXT: [[exn:%.+]] = load ptr, ptr [[exn_slot]]
+  //  CHECK-NEXT: [[sel:%.+]] = load i32, ptr [[ehselector_slot]]
+  //  CHECK-NEXT: [[lpad_val:%.+]] = insertvalue { ptr, i32 } undef, ptr [[exn]], 0
+  //  CHECK-NEXT: [[lpad_val9:%.+]] = insertvalue { ptr, i32 } [[lpad_val]], i32 [[sel]], 1
+  //  CHECK-NEXT: resume { ptr, i32 } [[lpad_val9]]
 }
 
 int main() {

diff  --git a/clang/test/CodeGenCXX/vla.cpp b/clang/test/CodeGenCXX/vla.cpp
index d8ed616a4608c..a1df4576ee476 100644
--- a/clang/test/CodeGenCXX/vla.cpp
+++ b/clang/test/CodeGenCXX/vla.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-apple-darwin %s -emit-llvm -o - | FileCheck -check-prefixes=X64,CHECK %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple amdgcn %s -emit-llvm -o - | FileCheck -check-prefixes=AMDGCN,CHECK %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-apple-darwin %s -emit-llvm -o - | FileCheck -check-prefixes=X64,CHECK %s
+// RUN: %clang_cc1 -std=c++11 -triple amdgcn %s -emit-llvm -o - | FileCheck -check-prefixes=AMDGCN,CHECK %s
 
 template<typename T>
 struct S {
@@ -18,47 +18,46 @@ int f() {
 // rdar://problem/9506377
 void test0(void *array, int n) {
   // CHECK-LABEL: define{{.*}} void @_Z5test0Pvi(
-  // AMDGCN:        [[ARRAY0:%.*]] = alloca i8*, align 8, addrspace(5)
+  // AMDGCN:        [[ARRAY0:%.*]] = alloca ptr, align 8, addrspace(5)
   // AMDGCN-NEXT:   [[N0:%.*]] = alloca i32, align 4, addrspace(5)
-  // AMDGCN-NEXT:   [[REF0:%.*]] = alloca i16*, align 8, addrspace(5)
+  // AMDGCN-NEXT:   [[REF0:%.*]] = alloca ptr, align 8, addrspace(5)
   // AMDGCN-NEXT:   [[S0:%.*]] = alloca i16, align 2, addrspace(5)
-  // AMDGCN-NEXT:   [[ARRAY:%.*]] = addrspacecast i8* addrspace(5)* [[ARRAY0]] to i8**
-  // AMDGCN-NEXT:   [[N:%.*]] = addrspacecast i32 addrspace(5)* [[N0]] to i32*
-  // AMDGCN-NEXT:   [[REF:%.*]] = addrspacecast i16* addrspace(5)* [[REF0]] to i16**
-  // AMDGCN-NEXT:   [[S:%.*]] = addrspacecast i16 addrspace(5)* [[S0]] to i16*
-  // X64:        [[ARRAY:%.*]] = alloca i8*, align 8
+  // AMDGCN-NEXT:   [[ARRAY:%.*]] = addrspacecast ptr addrspace(5) [[ARRAY0]] to ptr
+  // AMDGCN-NEXT:   [[N:%.*]] = addrspacecast ptr addrspace(5) [[N0]] to ptr
+  // AMDGCN-NEXT:   [[REF:%.*]] = addrspacecast ptr addrspace(5) [[REF0]] to ptr
+  // AMDGCN-NEXT:   [[S:%.*]] = addrspacecast ptr addrspace(5) [[S0]] to ptr
+  // X64:        [[ARRAY:%.*]] = alloca ptr, align 8
   // X64-NEXT:   [[N:%.*]] = alloca i32, align 4
-  // X64-NEXT:   [[REF:%.*]] = alloca i16*, align 8
+  // X64-NEXT:   [[REF:%.*]] = alloca ptr, align 8
   // X64-NEXT:   [[S:%.*]] = alloca i16, align 2
-  // CHECK-NEXT: store i8*
+  // CHECK-NEXT: store ptr
   // CHECK-NEXT: store i32
 
   // Capture the bounds.
-  // CHECK-NEXT: [[T0:%.*]] = load i32, i32* [[N]], align 4
+  // CHECK-NEXT: [[T0:%.*]] = load i32, ptr [[N]], align 4
   // CHECK-NEXT: [[DIM0:%.*]] = zext i32 [[T0]] to i64
-  // CHECK-NEXT: [[T0:%.*]] = load i32, i32* [[N]], align 4
+  // CHECK-NEXT: [[T0:%.*]] = load i32, ptr [[N]], align 4
   // CHECK-NEXT: [[T1:%.*]] = add nsw i32 [[T0]], 1
   // CHECK-NEXT: [[DIM1:%.*]] = zext i32 [[T1]] to i64
   typedef short array_t[n][n+1];
 
-  // CHECK-NEXT: [[T0:%.*]] = load i8*, i8** [[ARRAY]], align 8
-  // CHECK-NEXT: [[T1:%.*]] = bitcast i8* [[T0]] to i16*
-  // CHECK-NEXT: store i16* [[T1]], i16** [[REF]], align 8
+  // CHECK-NEXT: [[T0:%.*]] = load ptr, ptr [[ARRAY]], align 8
+  // CHECK-NEXT: store ptr [[T0]], ptr [[REF]], align 8
   array_t &ref = *(array_t*) array;
 
-  // CHECK-NEXT: [[T0:%.*]] = load i16*, i16** [[REF]]
+  // CHECK-NEXT: [[T0:%.*]] = load ptr, ptr [[REF]]
   // CHECK-NEXT: [[T1:%.*]] = mul nsw i64 1, [[DIM1]]
-  // CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds i16, i16* [[T0]], i64 [[T1]]
-  // CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i16, i16* [[T2]], i64 2
-  // CHECK-NEXT: store i16 3, i16* [[T3]]
+  // CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds i16, ptr [[T0]], i64 [[T1]]
+  // CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i16, ptr [[T2]], i64 2
+  // CHECK-NEXT: store i16 3, ptr [[T3]]
   ref[1][2] = 3;
 
-  // CHECK-NEXT: [[T0:%.*]] = load i16*, i16** [[REF]]
+  // CHECK-NEXT: [[T0:%.*]] = load ptr, ptr [[REF]]
   // CHECK-NEXT: [[T1:%.*]] = mul nsw i64 4, [[DIM1]]
-  // CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds i16, i16* [[T0]], i64 [[T1]]
-  // CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i16, i16* [[T2]], i64 5
-  // CHECK-NEXT: [[T4:%.*]] = load i16, i16* [[T3]]
-  // CHECK-NEXT: store i16 [[T4]], i16* [[S]], align 2
+  // CHECK-NEXT: [[T2:%.*]] = getelementptr inbounds i16, ptr [[T0]], i64 [[T1]]
+  // CHECK-NEXT: [[T3:%.*]] = getelementptr inbounds i16, ptr [[T2]], i64 5
+  // CHECK-NEXT: [[T4:%.*]] = load i16, ptr [[T3]]
+  // CHECK-NEXT: store i16 [[T4]], ptr [[S]], align 2
   short s = ref[4][5];
 
   // CHECK-NEXT: ret void
@@ -68,48 +67,48 @@ void test0(void *array, int n) {
 void test2(int b) {
   // CHECK-LABEL: define{{.*}} void {{.*}}test2{{.*}}(i32 noundef %b)
   int varr[b];
-  // AMDGCN: %__end1 = alloca i32*, align 8, addrspace(5)
-  // AMDGCN: [[END:%.*]] = addrspacecast i32* addrspace(5)* %__end1 to i32**
+  // AMDGCN: %__end1 = alloca ptr, align 8, addrspace(5)
+  // AMDGCN: [[END:%.*]] = addrspacecast ptr addrspace(5) %__end1 to ptr
   // get the address of %b by checking the first store that stores it 
-  //CHECK: store i32 %b, i32* [[PTR_B:%.*]]
+  //CHECK: store i32 %b, ptr [[PTR_B:%.*]]
 
   // get the size of the VLA by getting the first load of the PTR_B
-  //CHECK: [[VLA_NUM_ELEMENTS_PREZEXT:%.*]] = load i32, i32* [[PTR_B]]
+  //CHECK: [[VLA_NUM_ELEMENTS_PREZEXT:%.*]] = load i32, ptr [[PTR_B]]
   //CHECK-NEXT: [[VLA_NUM_ELEMENTS_PRE:%.*]] = zext i32 [[VLA_NUM_ELEMENTS_PREZEXT]]
   
   b = 15;
-  //CHECK: store i32 15, i32* [[PTR_B]]
+  //CHECK: store i32 15, ptr [[PTR_B]]
   
   // Now get the sizeof, and then divide by the element size
   
   
   //CHECK: [[VLA_SIZEOF:%.*]] = mul nuw i64 4, [[VLA_NUM_ELEMENTS_PRE]]
   //CHECK-NEXT: [[VLA_NUM_ELEMENTS_POST:%.*]] = udiv i64 [[VLA_SIZEOF]], 4
-  //CHECK-NEXT: [[VLA_END_PTR:%.*]] = getelementptr inbounds i32, i32* {{%.*}}, i64 [[VLA_NUM_ELEMENTS_POST]]
-  //X64-NEXT: store i32* [[VLA_END_PTR]], i32** %__end1
-  //AMDGCN-NEXT: store i32* [[VLA_END_PTR]], i32** [[END]]
+  //CHECK-NEXT: [[VLA_END_PTR:%.*]] = getelementptr inbounds i32, ptr {{%.*}}, i64 [[VLA_NUM_ELEMENTS_POST]]
+  //X64-NEXT: store ptr [[VLA_END_PTR]], ptr %__end1
+  //AMDGCN-NEXT: store ptr [[VLA_END_PTR]], ptr [[END]]
   for (int d : varr) 0;
 }
 
 void test3(int b, int c) {
   // CHECK-LABEL: define{{.*}} void {{.*}}test3{{.*}}(i32 noundef %b, i32 noundef %c)
   int varr[b][c];
-  // AMDGCN: %__end1 = alloca i32*, align 8, addrspace(5)
-  // AMDGCN: [[END:%.*]] = addrspacecast i32* addrspace(5)* %__end1 to i32**
+  // AMDGCN: %__end1 = alloca ptr, align 8, addrspace(5)
+  // AMDGCN: [[END:%.*]] = addrspacecast ptr addrspace(5) %__end1 to ptr
   // get the address of %b by checking the first store that stores it 
-  //CHECK: store i32 %b, i32* [[PTR_B:%.*]]
-  //CHECK-NEXT: store i32 %c, i32* [[PTR_C:%.*]]
+  //CHECK: store i32 %b, ptr [[PTR_B:%.*]]
+  //CHECK-NEXT: store i32 %c, ptr [[PTR_C:%.*]]
   
   // get the size of the VLA by getting the first load of the PTR_B
-  //CHECK: [[VLA_DIM1_PREZEXT:%.*]] = load i32, i32* [[PTR_B]]
+  //CHECK: [[VLA_DIM1_PREZEXT:%.*]] = load i32, ptr [[PTR_B]]
   //CHECK-NEXT: [[VLA_DIM1_PRE:%.*]] = zext i32 [[VLA_DIM1_PREZEXT]]
-  //CHECK: [[VLA_DIM2_PREZEXT:%.*]] = load i32, i32* [[PTR_C]]
+  //CHECK: [[VLA_DIM2_PREZEXT:%.*]] = load i32, ptr [[PTR_C]]
   //CHECK-NEXT: [[VLA_DIM2_PRE:%.*]] = zext i32 [[VLA_DIM2_PREZEXT]]
   
   b = 15;
   c = 15;
-  //CHECK: store i32 15, i32* [[PTR_B]]
-  //CHECK: store i32 15, i32* [[PTR_C]]
+  //CHECK: store i32 15, ptr [[PTR_B]]
+  //CHECK: store i32 15, ptr [[PTR_C]]
   // Now get the sizeof, and then divide by the element size
   
   // multiply the two dimensions, then by the element type and then divide by the sizeof dim2
@@ -118,9 +117,9 @@ void test3(int b, int c) {
   //CHECK-NEXT: [[VLA_SIZEOF_DIM2:%.*]] = mul nuw i64 4, [[VLA_DIM2_PRE]]
   //CHECK-NEXT: [[VLA_NUM_ELEMENTS:%.*]] = udiv i64 [[VLA_SIZEOF]], [[VLA_SIZEOF_DIM2]]
   //CHECK-NEXT: [[VLA_END_INDEX:%.*]] = mul nsw i64 [[VLA_NUM_ELEMENTS]], [[VLA_DIM2_PRE]]
-  //CHECK-NEXT: [[VLA_END_PTR:%.*]] = getelementptr inbounds i32, i32* {{%.*}}, i64 [[VLA_END_INDEX]]
-  //X64-NEXT: store i32* [[VLA_END_PTR]], i32** %__end
-  //AMDGCN-NEXT: store i32* [[VLA_END_PTR]], i32** [[END]]
+  //CHECK-NEXT: [[VLA_END_PTR:%.*]] = getelementptr inbounds i32, ptr {{%.*}}, i64 [[VLA_END_INDEX]]
+  //X64-NEXT: store ptr [[VLA_END_PTR]], ptr %__end
+  //AMDGCN-NEXT: store ptr [[VLA_END_PTR]], ptr [[END]]
  
   for (auto &d : varr) 0;
 }

diff  --git a/clang/test/CodeGenCXX/vtable-align.cpp b/clang/test/CodeGenCXX/vtable-align.cpp
index 1daaf9f95f060..fb8ff1a582ec8 100644
--- a/clang/test/CodeGenCXX/vtable-align.cpp
+++ b/clang/test/CodeGenCXX/vtable-align.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=i386-apple-darwin10 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-32
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-64
+// RUN: %clang_cc1 %s -triple=i386-apple-darwin10 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-32
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s -check-prefix=CHECK-64
 
 struct A {
   virtual void f();
@@ -9,9 +9,9 @@ struct A {
 
 void A::f() {}
 
-// CHECK-32: @_ZTV1A ={{.*}} unnamed_addr constant { [5 x i8*] } { [5 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1fEv to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1gEv to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1hEv to i8*)] }, align 4
+// CHECK-32: @_ZTV1A ={{.*}} unnamed_addr constant { [5 x ptr] } { [5 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN1A1fEv, ptr @_ZN1A1gEv, ptr @_ZN1A1hEv] }, align 4
 // CHECK-32: @_ZTS1A ={{.*}} constant [3 x i8] c"1A\00", align 1
-// CHECK-32: @_ZTI1A ={{.*}} constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1A, i32 0, i32 0) }, align 4
-// CHECK-64: @_ZTV1A ={{.*}} unnamed_addr constant { [5 x i8*] } { [5 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTI1A to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1fEv to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1gEv to i8*), i8* bitcast (void (%struct.A*)* @_ZN1A1hEv to i8*)] }, align 8
+// CHECK-32: @_ZTI1A ={{.*}} constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i32 2), ptr @_ZTS1A }, align 4
+// CHECK-64: @_ZTV1A ={{.*}} unnamed_addr constant { [5 x ptr] } { [5 x ptr] [ptr null, ptr @_ZTI1A, ptr @_ZN1A1fEv, ptr @_ZN1A1gEv, ptr @_ZN1A1hEv] }, align 8
 // CHECK-64: @_ZTS1A ={{.*}} constant [3 x i8] c"1A\00", align 1
-// CHECK-64: @_ZTI1A ={{.*}} constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8*, i8** @_ZTVN10__cxxabiv117__class_type_infoE, i64 2) to i8*), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @_ZTS1A, i32 0, i32 0) }, align 8
+// CHECK-64: @_ZTI1A ={{.*}} constant { ptr, ptr } { ptr getelementptr inbounds (ptr, ptr @_ZTVN10__cxxabiv117__class_type_infoE, i64 2), ptr @_ZTS1A }, align 8

diff  --git a/clang/test/CodeGenCXX/vtable-assume-load.cpp b/clang/test/CodeGenCXX/vtable-assume-load.cpp
index 97d3cfa859a19..bd9e4fc62520d 100644
--- a/clang/test/CodeGenCXX/vtable-assume-load.cpp
+++ b/clang/test/CodeGenCXX/vtable-assume-load.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple x86_64-apple-darwin10 -emit-llvm -o %t.ll -O1 -disable-llvm-passes -fms-extensions -fstrict-vtable-pointers
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple i686-pc-win32 -emit-llvm -o %t.ms.ll -O1 -disable-llvm-passes -fms-extensions -fstrict-vtable-pointers
+// RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -emit-llvm -o %t.ll -O1 -disable-llvm-passes -fms-extensions -fstrict-vtable-pointers
+// RUN: %clang_cc1 %s -triple i686-pc-win32 -emit-llvm -o %t.ms.ll -O1 -disable-llvm-passes -fms-extensions -fstrict-vtable-pointers
 // FIXME: Assume load should not require -fstrict-vtable-pointers
 
 // RUN: FileCheck --check-prefix=CHECK1 --input-file=%t.ll %s
@@ -25,9 +25,9 @@ struct B : A {
 void g(A *a) { a->foo(); }
 
 // CHECK1-LABEL: define{{.*}} void @_ZN5test14fooAEv()
-// CHECK1: call void @_ZN5test11AC1Ev(%"struct.test1::A"*
-// CHECK1: %[[VTABLE:.*]] = load i8**, i8*** %{{.*}}
-// CHECK1: %[[CMP:.*]] = icmp eq i8** %[[VTABLE]], getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5test11AE, i32 0, inrange i32 0, i32 2)
+// CHECK1: call void @_ZN5test11AC1Ev(ptr
+// CHECK1: %[[VTABLE:.*]] = load ptr, ptr %{{.*}}
+// CHECK1: %[[CMP:.*]] = icmp eq ptr %[[VTABLE]], getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5test11AE, i32 0, inrange i32 0, i32 2)
 // CHECK1: call void @llvm.assume(i1 %[[CMP]])
 // CHECK1-LABEL: {{^}}}
 
@@ -37,9 +37,9 @@ void fooA() {
 }
 
 // CHECK1-LABEL: define{{.*}} void @_ZN5test14fooBEv()
-// CHECK1: call void @_ZN5test11BC1Ev(%"struct.test1::B"* {{[^,]*}} %{{.*}})
-// CHECK1: %[[VTABLE:.*]] = load i8**, i8*** %{{.*}}
-// CHECK1: %[[CMP:.*]] = icmp eq i8** %[[VTABLE]], getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTVN5test11BE, i32 0, inrange i32 0, i32 2)
+// CHECK1: call void @_ZN5test11BC1Ev(ptr {{[^,]*}} %{{.*}})
+// CHECK1: %[[VTABLE:.*]] = load ptr, ptr %{{.*}}
+// CHECK1: %[[CMP:.*]] = icmp eq ptr %[[VTABLE]], getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTVN5test11BE, i32 0, inrange i32 0, i32 2)
 // CHECK1: call void @llvm.assume(i1 %[[CMP]])
 // CHECK1-LABEL: {{^}}}
 
@@ -48,7 +48,7 @@ void fooB() {
   g(&b);
 }
 // there should not be any assumes in the ctor that calls base ctor
-// CHECK1-LABEL: define linkonce_odr void @_ZN5test11BC2Ev(%"struct.test1::B"*
+// CHECK1-LABEL: define linkonce_odr void @_ZN5test11BC2Ev(ptr
 // CHECK1-NOT: @llvm.assume(
 // CHECK1-LABEL: {{^}}}
 }
@@ -71,16 +71,14 @@ void g(A *a) { a->foo(); }
 void h(B *b) { b->bar(); }
 
 // CHECK2-LABEL: define{{.*}} void @_ZN5test24testEv()
-// CHECK2: call void @_ZN5test21CC1Ev(%"struct.test2::C"*
-// CHECK2: %[[VTABLE:.*]] = load i8**, i8*** {{.*}}
-// CHECK2: %[[CMP:.*]] = icmp eq i8** %[[VTABLE]], getelementptr inbounds ({ [3 x i8*], [3 x i8*] }, { [3 x i8*], [3 x i8*] }* @_ZTVN5test21CE, i32 0, inrange i32 0, i32 2)
+// CHECK2: call void @_ZN5test21CC1Ev(ptr
+// CHECK2: %[[VTABLE:.*]] = load ptr, ptr {{.*}}
+// CHECK2: %[[CMP:.*]] = icmp eq ptr %[[VTABLE]], getelementptr inbounds ({ [3 x ptr], [3 x ptr] }, ptr @_ZTVN5test21CE, i32 0, inrange i32 0, i32 2)
 // CHECK2: call void @llvm.assume(i1 %[[CMP]])
 
-// CHECK2: %[[V2:.*]] = bitcast %"struct.test2::C"* %{{.*}} to i8*
-// CHECK2: %[[ADD_PTR:.*]] = getelementptr inbounds i8, i8* %[[V2]], i64 8
-// CHECK2: %[[V3:.*]] = bitcast i8* %[[ADD_PTR]] to i8***
-// CHECK2: %[[VTABLE2:.*]] = load i8**, i8*** %[[V3]]
-// CHECK2: %[[CMP2:.*]] = icmp eq i8** %[[VTABLE2]], getelementptr inbounds ({ [3 x i8*], [3 x i8*] }, { [3 x i8*], [3 x i8*] }* @_ZTVN5test21CE, i32 0, inrange i32 1, i32 2)
+// CHECK2: %[[ADD_PTR:.*]] = getelementptr inbounds i8, ptr %{{.*}}, i64 8
+// CHECK2: %[[VTABLE2:.*]] = load ptr, ptr %[[ADD_PTR]]
+// CHECK2: %[[CMP2:.*]] = icmp eq ptr %[[VTABLE2]], getelementptr inbounds ({ [3 x ptr], [3 x ptr] }, ptr @_ZTVN5test21CE, i32 0, inrange i32 1, i32 2)
 // CHECK2: call void @llvm.assume(i1 %[[CMP2]])
 
 // CHECK2: call void @_ZN5test21gEPNS_1AE(
@@ -110,8 +108,8 @@ struct C : virtual A, B {
 void g(B *a) { a->foo(); }
 
 // CHECK3-LABEL: define{{.*}} void @_ZN5test34testEv()
-// CHECK3: call void @_ZN5test31CC1Ev(%"struct.test3::C"*
-// CHECK3: %[[CMP:.*]] = icmp eq i8** %{{.*}}, getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_ZTVN5test31CE, i32 0, inrange i32 0, i32 3)
+// CHECK3: call void @_ZN5test31CC1Ev(ptr
+// CHECK3: %[[CMP:.*]] = icmp eq ptr %{{.*}}, getelementptr inbounds ({ [4 x ptr] }, ptr @_ZTVN5test31CE, i32 0, inrange i32 0, i32 3)
 // CHECK3: call void @llvm.assume(i1 %[[CMP]])
 // CHECK3-LABLEL: }
 void test() {
@@ -138,13 +136,13 @@ struct C : B {
 void g(C *c) { c->foo(); }
 
 // CHECK4-LABEL: define{{.*}} void @_ZN5test44testEv()
-// CHECK4: call void @_ZN5test41CC1Ev(%"struct.test4::C"*
-// CHECK4: %[[VTABLE:.*]] = load i8**, i8*** %{{.*}}
-// CHECK4: %[[CMP:.*]] = icmp eq i8** %[[VTABLE]], getelementptr inbounds ({ [5 x i8*] }, { [5 x i8*] }* @_ZTVN5test41CE, i32 0, inrange i32 0, i32 4)
+// CHECK4: call void @_ZN5test41CC1Ev(ptr
+// CHECK4: %[[VTABLE:.*]] = load ptr, ptr %{{.*}}
+// CHECK4: %[[CMP:.*]] = icmp eq ptr %[[VTABLE]], getelementptr inbounds ({ [5 x ptr] }, ptr @_ZTVN5test41CE, i32 0, inrange i32 0, i32 4)
 // CHECK4: call void @llvm.assume(i1 %[[CMP]]
 
-// CHECK4: %[[VTABLE2:.*]] = load i8**, i8*** %{{.*}}
-// CHECK4: %[[CMP2:.*]] = icmp eq i8** %[[VTABLE2]], getelementptr inbounds ({ [5 x i8*] }, { [5 x i8*] }* @_ZTVN5test41CE, i32 0, inrange i32 0, i32 4)
+// CHECK4: %[[VTABLE2:.*]] = load ptr, ptr %{{.*}}
+// CHECK4: %[[CMP2:.*]] = icmp eq ptr %[[VTABLE2]], getelementptr inbounds ({ [5 x ptr] }, ptr @_ZTVN5test41CE, i32 0, inrange i32 0, i32 4)
 // CHECK4: call void @llvm.assume(i1 %[[CMP2]])
 // CHECK4-LABEL: {{^}}}
 
@@ -164,7 +162,7 @@ void g(S &s) { s.foo(); }
 
 // if struct has novtable specifier, then we can't generate assumes
 // CHECK-MS-LABEL: define dso_local void @"?test at testMS@@YAXXZ"()
-// CHECK-MS: call x86_thiscallcc noundef %"struct.testMS::S"* @"??0S at testMS@@QAE at XZ"(
+// CHECK-MS: call x86_thiscallcc noundef ptr @"??0S at testMS@@QAE at XZ"(
 // CHECK-MS-NOT: @llvm.assume
 // CHECK-MS-LABEL: {{^}}}
 

diff  --git a/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp b/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp
index ce6a9125fd991..00eda6233d940 100644
--- a/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp
+++ b/clang/test/CodeGenCXX/vtable-pointer-initialization.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -emit-llvm -o - | FileCheck %s
 
 struct Field {
   Field();
@@ -19,15 +19,15 @@ struct A : Base {
   Field field;
 };
 
-// CHECK-LABEL: define{{.*}} void @_ZN1AC2Ev(%struct.A* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define{{.*}} void @_ZN1AC2Ev(ptr {{[^,]*}} %this) unnamed_addr
 // CHECK: call void @_ZN4BaseC2Ev(
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1A, i32 0, inrange i32 0, i32 2) to i32 (...)**)
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTV1A, i32 0, inrange i32 0, i32 2)
 // CHECK: call void @_ZN5FieldC1Ev(
 // CHECK: ret void
 A::A() { }
 
-// CHECK-LABEL: define{{.*}} void @_ZN1AD2Ev(%struct.A* {{[^,]*}} %this) unnamed_addr
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1A, i32 0, inrange i32 0, i32 2) to i32 (...)**)
+// CHECK-LABEL: define{{.*}} void @_ZN1AD2Ev(ptr {{[^,]*}} %this) unnamed_addr
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTV1A, i32 0, inrange i32 0, i32 2)
 // CHECK: call void @_ZN5FieldD1Ev(
 // CHECK: call void @_ZN4BaseD2Ev(
 // CHECK: ret void
@@ -41,20 +41,20 @@ struct B : Base {
 
 void f() { B b; }
 
-// CHECK-LABEL: define linkonce_odr void @_ZN1BC1Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1BC1Ev(ptr {{[^,]*}} %this) unnamed_addr
 // CHECK: call void @_ZN1BC2Ev(
 
-// CHECK-LABEL: define linkonce_odr void @_ZN1BD1Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1BD1Ev(ptr {{[^,]*}} %this) unnamed_addr
 // CHECK: call void @_ZN1BD2Ev(
 
-// CHECK-LABEL: define linkonce_odr void @_ZN1BC2Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
+// CHECK-LABEL: define linkonce_odr void @_ZN1BC2Ev(ptr {{[^,]*}} %this) unnamed_addr
 // CHECK: call void @_ZN4BaseC2Ev(
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1B, i32 0, inrange i32 0, i32 2) to i32 (...)**)
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTV1B, i32 0, inrange i32 0, i32 2)
 // CHECK: call void @_ZN5FieldC1Ev
 // CHECK: ret void
 
-// CHECK-LABEL: define linkonce_odr void @_ZN1BD2Ev(%struct.B* {{[^,]*}} %this) unnamed_addr
-// CHECK: store i32 (...)** bitcast (i8** getelementptr inbounds ({ [3 x i8*] }, { [3 x i8*] }* @_ZTV1B, i32 0, inrange i32 0, i32 2) to i32 (...)**)
+// CHECK-LABEL: define linkonce_odr void @_ZN1BD2Ev(ptr {{[^,]*}} %this) unnamed_addr
+// CHECK: store ptr getelementptr inbounds ({ [3 x ptr] }, ptr @_ZTV1B, i32 0, inrange i32 0, i32 2)
 // CHECK: call void @_ZN5FieldD1Ev(
 // CHECK: call void @_ZN4BaseD2Ev(
 // CHECK: ret void

diff  --git a/clang/test/CodeGenCXX/vtt-layout.cpp b/clang/test/CodeGenCXX/vtt-layout.cpp
index 1571deea2e4fe..595c64c6a33bd 100644
--- a/clang/test/CodeGenCXX/vtt-layout.cpp
+++ b/clang/test/CodeGenCXX/vtt-layout.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple=x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - | FileCheck %s
+// RUN: %clang_cc1 %s -triple=x86_64-apple-darwin10 -std=c++11 -emit-llvm -o - | FileCheck %s
 
 // Test1::B should just have a single entry in its VTT, which points to the vtable.
 namespace Test1 {
@@ -78,12 +78,12 @@ namespace Test6 {
   }
 }
 
-// CHECK: @_ZTTN5Test11BE ={{.*}} unnamed_addr constant [1 x i8*] [i8* bitcast (i8** getelementptr inbounds ({ [4 x i8*] }, { [4 x i8*] }* @_ZTVN5Test11BE, i32 0, inrange i32 0, i32 3) to i8*)]
-// CHECK: @_ZTVN5Test51AE ={{.*}} unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTIN5Test51AE to i8*), i8* bitcast (void ()* @__cxa_pure_virtual to i8*), i8* bitcast (void (%"struct.Test5::A"*)* @_ZN5Test51A6anchorEv to i8*)] }
-// CHECK: @_ZTVN5Test61AE ={{.*}} unnamed_addr constant { [4 x i8*] } { [4 x i8*] [i8* null, i8* bitcast ({ i8*, i8* }* @_ZTIN5Test61AE to i8*), i8* bitcast (void ()* @__cxa_deleted_virtual to i8*), i8* bitcast (void (%"struct.Test6::A"*)* @_ZN5Test61A6anchorEv to i8*)] }
-// CHECK: @_ZTTN5Test21CE = linkonce_odr unnamed_addr constant [2 x i8*] [i8* bitcast (i8** getelementptr inbounds ({ [5 x i8*] }, { [5 x i8*] }* @_ZTVN5Test21CE, i32 0, inrange i32 0, i32 4) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [5 x i8*] }, { [5 x i8*] }* @_ZTVN5Test21CE, i32 0, inrange i32 0, i32 4) to i8*)]
-// CHECK: @_ZTTN5Test31DE = linkonce_odr unnamed_addr constant [13 x i8*] [i8* bitcast (i8** getelementptr inbounds ({ [5 x i8*], [7 x i8*], [4 x i8*], [3 x i8*] }, { [5 x i8*], [7 x i8*], [4 x i8*], [3 x i8*] }* @_ZTVN5Test31DE, i32 0, inrange i32 0, i32 5) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [3 x i8*], [4 x i8*] }, { [3 x i8*], [4 x i8*] }* @_ZTCN5Test31DE0_NS_2C1E, i32 0, inrange i32 0, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [3 x i8*], [4 x i8*] }, { [3 x i8*], [4 x i8*] }* @_ZTCN5Test31DE0_NS_2C1E, i32 0, inrange i32 1, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [7 x i8*], [3 x i8*], [4 x i8*] }, { [7 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test31DE16_NS_2C2E, i32 0, inrange i32 0, i32 6) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [7 x i8*], [3 x i8*], [4 x i8*] }, { [7 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test31DE16_NS_2C2E, i32 0, inrange i32 0, i32 6) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [7 x i8*], [3 x i8*], [4 x i8*] }, { [7 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test31DE16_NS_2C2E, i32 0, inrange i32 1, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [7 x i8*], [3 x i8*], [4 x i8*] }, { [7 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test31DE16_NS_2C2E, i32 0, inrange i32 2, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [5 x i8*], [7 x i8*], [4 x i8*], [3 x i8*] }, { [5 x i8*], [7 x i8*], [4 x i8*], [3 x i8*] }* @_ZTVN5Test31DE, i32 0, inrange i32 2, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [5 x i8*], [7 x i8*], [4 x i8*], [3 x i8*] }, { [5 x i8*], [7 x i8*], [4 x i8*], [3 x i8*] }* @_ZTVN5Test31DE, i32 0, inrange i32 1, i32 6) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [5 x i8*], [7 x i8*], [4 x i8*], [3 x i8*] }, { [5 x i8*], [7 x i8*], [4 x i8*], [3 x i8*] }* @_ZTVN5Test31DE, i32 0, inrange i32 1, i32 6) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [5 x i8*], [7 x i8*], [4 x i8*], [3 x i8*] }, { [5 x i8*], [7 x i8*], [4 x i8*], [3 x i8*] }* @_ZTVN5Test31DE, i32 0, inrange i32 3, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [3 x i8*], [4 x i8*] }, { [3 x i8*], [4 x i8*] }* @_ZTCN5Test31DE64_NS_2V2E, i32 0, inrange i32 0, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [3 x i8*], [4 x i8*] }, { [3 x i8*], [4 x i8*] }* @_ZTCN5Test31DE64_NS_2V2E, i32 0, inrange i32 1, i32 3) to i8*)]
-// CHECK: @_ZTVN5Test41DE = linkonce_odr unnamed_addr constant { [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] } { [6 x i8*] [i8* inttoptr (i64 72 to i8*), i8* inttoptr (i64 16 to i8*), i8* inttoptr (i64 56 to i8*), i8* inttoptr (i64 40 to i8*), i8* null, i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 }* @_ZTIN5Test41DE to i8*)], [8 x i8*] [i8* inttoptr (i64 40 to i8*), i8* inttoptr (i64 24 to i8*), i8* inttoptr (i64 56 to i8*), i8* null, i8* null, i8* inttoptr (i64 -16 to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 }* @_ZTIN5Test41DE to i8*), i8* bitcast (void (%"class.Test4::V3"*)* @_ZN5Test42V31gEv to i8*)], [3 x i8*] [i8* inttoptr (i64 16 to i8*), i8* inttoptr (i64 -40 to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 }* @_ZTIN5Test41DE to i8*)], [4 x i8*] [i8* null, i8* inttoptr (i64 -56 to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 }* @_ZTIN5Test41DE to i8*), i8* bitcast (void (%"class.Test4::A2"*)* @_ZN5Test42A21fEv to i8*)], [4 x i8*] [i8* inttoptr (i64 -16 to i8*), i8* inttoptr (i64 -32 to i8*), i8* inttoptr (i64 -72 to i8*), i8* bitcast ({ i8*, i8*, i32, i32, i8*, i64, i8*, i64, i8*, i64 }* @_ZTIN5Test41DE to i8*)] }
-// CHECK: @_ZTTN5Test41DE = linkonce_odr unnamed_addr constant [19 x i8*] [i8* bitcast (i8** getelementptr inbounds ({ [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }, { [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }* @_ZTVN5Test41DE, i32 0, inrange i32 0, i32 6) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [4 x i8*], [3 x i8*], [4 x i8*] }, { [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE0_NS_2C1E, i32 0, inrange i32 0, i32 4) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [4 x i8*], [3 x i8*], [4 x i8*] }, { [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE0_NS_2C1E, i32 0, inrange i32 1, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [4 x i8*], [3 x i8*], [4 x i8*] }, { [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE0_NS_2C1E, i32 0, inrange i32 2, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [8 x i8*], [4 x i8*], [3 x i8*], [4 x i8*] }, { [8 x i8*], [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE16_NS_2C2E, i32 0, inrange i32 0, i32 7) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [8 x i8*], [4 x i8*], [3 x i8*], [4 x i8*] }, { [8 x i8*], [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE16_NS_2C2E, i32 0, inrange i32 0, i32 7) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [8 x i8*], [4 x i8*], [3 x i8*], [4 x i8*] }, { [8 x i8*], [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE16_NS_2C2E, i32 0, inrange i32 1, i32 4) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [8 x i8*], [4 x i8*], [3 x i8*], [4 x i8*] }, { [8 x i8*], [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE16_NS_2C2E, i32 0, inrange i32 2, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [8 x i8*], [4 x i8*], [3 x i8*], [4 x i8*] }, { [8 x i8*], [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE16_NS_2C2E, i32 0, inrange i32 3, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }, { [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }* @_ZTVN5Test41DE, i32 0, inrange i32 2, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }, { [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }* @_ZTVN5Test41DE, i32 0, inrange i32 3, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }, { [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }* @_ZTVN5Test41DE, i32 0, inrange i32 1, i32 7) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }, { [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }* @_ZTVN5Test41DE, i32 0, inrange i32 1, i32 7) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }, { [6 x i8*], [8 x i8*], [3 x i8*], [4 x i8*], [4 x i8*] }* @_ZTVN5Test41DE, i32 0, inrange i32 4, i32 4) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [3 x i8*], [4 x i8*] }, { [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE40_NS_2V1E, i32 0, inrange i32 0, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [3 x i8*], [4 x i8*] }, { [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE40_NS_2V1E, i32 0, inrange i32 1, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [4 x i8*], [3 x i8*], [4 x i8*] }, { [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE72_NS_2V2E, i32 0, inrange i32 0, i32 4) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [4 x i8*], [3 x i8*], [4 x i8*] }, { [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE72_NS_2V2E, i32 0, inrange i32 1, i32 3) to i8*), i8* bitcast (i8** getelementptr inbounds ({ [4 x i8*], [3 x i8*], [4 x i8*] }, { [4 x i8*], [3 x i8*], [4 x i8*] }* @_ZTCN5Test41DE72_NS_2V2E, i32 0, inrange i32 2, i32 3) to i8*)]
+// CHECK: @_ZTTN5Test11BE ={{.*}} unnamed_addr constant [1 x ptr] [ptr getelementptr inbounds ({ [4 x ptr] }, ptr @_ZTVN5Test11BE, i32 0, inrange i32 0, i32 3)]
+// CHECK: @_ZTVN5Test51AE ={{.*}} unnamed_addr constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr @_ZTIN5Test51AE, ptr @__cxa_pure_virtual, ptr @_ZN5Test51A6anchorEv] }
+// CHECK: @_ZTVN5Test61AE ={{.*}} unnamed_addr constant { [4 x ptr] } { [4 x ptr] [ptr null, ptr @_ZTIN5Test61AE, ptr @__cxa_deleted_virtual, ptr @_ZN5Test61A6anchorEv] }
+// CHECK: @_ZTTN5Test21CE = linkonce_odr unnamed_addr constant [2 x ptr] [ptr getelementptr inbounds ({ [5 x ptr] }, ptr @_ZTVN5Test21CE, i32 0, inrange i32 0, i32 4), ptr getelementptr inbounds ({ [5 x ptr] }, ptr @_ZTVN5Test21CE, i32 0, inrange i32 0, i32 4)]
+// CHECK: @_ZTTN5Test31DE = linkonce_odr unnamed_addr constant [13 x ptr] [ptr getelementptr inbounds ({ [5 x ptr], [7 x ptr], [4 x ptr], [3 x ptr] }, ptr @_ZTVN5Test31DE, i32 0, inrange i32 0, i32 5), ptr getelementptr inbounds ({ [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test31DE0_NS_2C1E, i32 0, inrange i32 0, i32 3), ptr getelementptr inbounds ({ [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test31DE0_NS_2C1E, i32 0, inrange i32 1, i32 3), ptr getelementptr inbounds ({ [7 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test31DE16_NS_2C2E, i32 0, inrange i32 0, i32 6), ptr getelementptr inbounds ({ [7 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test31DE16_NS_2C2E, i32 0, inrange i32 0, i32 6), ptr getelementptr inbounds ({ [7 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test31DE16_NS_2C2E, i32 0, inrange i32 1, i32 3), ptr getelementptr inbounds ({ [7 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test31DE16_NS_2C2E, i32 0, inrange i32 2, i32 3), ptr getelementptr inbounds ({ [5 x ptr], [7 x ptr], [4 x ptr], [3 x ptr] }, ptr @_ZTVN5Test31DE, i32 0, inrange i32 2, i32 3), ptr getelementptr inbounds ({ [5 x ptr], [7 x ptr], [4 x ptr], [3 x ptr] }, ptr @_ZTVN5Test31DE, i32 0, inrange i32 1, i32 6), ptr getelementptr inbounds ({ [5 x ptr], [7 x ptr], [4 x ptr], [3 x ptr] }, ptr @_ZTVN5Test31DE, i32 0, inrange i32 1, i32 6), ptr getelementptr inbounds ({ [5 x ptr], [7 x ptr], [4 x ptr], [3 x ptr] }, ptr @_ZTVN5Test31DE, i32 0, inrange i32 3, i32 3), ptr getelementptr inbounds ({ [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test31DE64_NS_2V2E, i32 0, inrange i32 0, i32 3), ptr getelementptr inbounds ({ [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test31DE64_NS_2V2E, i32 0, inrange i32 1, i32 3)]
+// CHECK: @_ZTVN5Test41DE = linkonce_odr unnamed_addr constant { [6 x ptr], [8 x ptr], [3 x ptr], [4 x ptr], [4 x ptr] } { [6 x ptr] [ptr inttoptr (i64 72 to ptr), ptr inttoptr (i64 16 to ptr), ptr inttoptr (i64 56 to ptr), ptr inttoptr (i64 40 to ptr), ptr null, ptr @_ZTIN5Test41DE], [8 x ptr] [ptr inttoptr (i64 40 to ptr), ptr inttoptr (i64 24 to ptr), ptr inttoptr (i64 56 to ptr), ptr null, ptr null, ptr inttoptr (i64 -16 to ptr), ptr @_ZTIN5Test41DE, ptr @_ZN5Test42V31gEv], [3 x ptr] [ptr inttoptr (i64 16 to ptr), ptr inttoptr (i64 -40 to ptr), ptr @_ZTIN5Test41DE], [4 x ptr] [ptr null, ptr inttoptr (i64 -56 to ptr), ptr @_ZTIN5Test41DE, ptr @_ZN5Test42A21fEv], [4 x ptr] [ptr inttoptr (i64 -16 to ptr), ptr inttoptr (i64 -32 to ptr), ptr inttoptr (i64 -72 to ptr), ptr @_ZTIN5Test41DE] }
+// CHECK: @_ZTTN5Test41DE = linkonce_odr unnamed_addr constant [19 x ptr] [ptr getelementptr inbounds ({ [6 x ptr], [8 x ptr], [3 x ptr], [4 x ptr], [4 x ptr] }, ptr @_ZTVN5Test41DE, i32 0, inrange i32 0, i32 6), ptr getelementptr inbounds ({ [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE0_NS_2C1E, i32 0, inrange i32 0, i32 4), ptr getelementptr inbounds ({ [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE0_NS_2C1E, i32 0, inrange i32 1, i32 3), ptr getelementptr inbounds ({ [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE0_NS_2C1E, i32 0, inrange i32 2, i32 3), ptr getelementptr inbounds ({ [8 x ptr], [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE16_NS_2C2E, i32 0, inrange i32 0, i32 7), ptr getelementptr inbounds ({ [8 x ptr], [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE16_NS_2C2E, i32 0, inrange i32 0, i32 7), ptr getelementptr inbounds ({ [8 x ptr], [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE16_NS_2C2E, i32 0, inrange i32 1, i32 4), ptr getelementptr inbounds ({ [8 x ptr], [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE16_NS_2C2E, i32 0, inrange i32 2, i32 3), ptr getelementptr inbounds ({ [8 x ptr], [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE16_NS_2C2E, i32 0, inrange i32 3, i32 3), ptr getelementptr inbounds ({ [6 x ptr], [8 x ptr], [3 x ptr], [4 x ptr], [4 x ptr] }, ptr @_ZTVN5Test41DE, i32 0, inrange i32 2, i32 3), ptr getelementptr inbounds ({ [6 x ptr], [8 x ptr], [3 x ptr], [4 x ptr], [4 x ptr] }, ptr @_ZTVN5Test41DE, i32 0, inrange i32 3, i32 3), ptr getelementptr inbounds ({ [6 x ptr], [8 x ptr], [3 x ptr], [4 x ptr], [4 x ptr] }, ptr @_ZTVN5Test41DE, i32 0, inrange i32 1, i32 7), ptr getelementptr inbounds ({ [6 x ptr], [8 x ptr], [3 x ptr], [4 x ptr], [4 x ptr] }, ptr @_ZTVN5Test41DE, i32 0, inrange i32 1, i32 7), ptr getelementptr inbounds ({ [6 x ptr], [8 x ptr], [3 x ptr], [4 x ptr], [4 x ptr] }, ptr @_ZTVN5Test41DE, i32 0, inrange i32 4, i32 4), ptr getelementptr inbounds ({ [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE40_NS_2V1E, i32 0, inrange i32 0, i32 3), ptr getelementptr inbounds ({ [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE40_NS_2V1E, i32 0, inrange i32 1, i32 3), ptr getelementptr inbounds ({ [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE72_NS_2V2E, i32 0, inrange i32 0, i32 4), ptr getelementptr inbounds ({ [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE72_NS_2V2E, i32 0, inrange i32 1, i32 3), ptr getelementptr inbounds ({ [4 x ptr], [3 x ptr], [4 x ptr] }, ptr @_ZTCN5Test41DE72_NS_2V2E, i32 0, inrange i32 2, i32 3)]
 // CHECK: declare void @__cxa_pure_virtual() unnamed_addr
 // CHECK: declare void @__cxa_deleted_virtual() unnamed_addr

diff  --git a/clang/test/CodeGenCXX/wasm-args-returns.cpp b/clang/test/CodeGenCXX/wasm-args-returns.cpp
index 27a90a5a01a98..090ca9a99756f 100644
--- a/clang/test/CodeGenCXX/wasm-args-returns.cpp
+++ b/clang/test/CodeGenCXX/wasm-args-returns.cpp
@@ -1,6 +1,6 @@
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -O1 -triple wasm32-unknown-unknown -emit-llvm -o - %s \
+// RUN: %clang_cc1 -no-enable-noundef-analysis -O1 -triple wasm32-unknown-unknown -emit-llvm -o - %s \
 // RUN:   | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -no-enable-noundef-analysis -O1 -triple wasm64-unknown-unknown -emit-llvm -o - %s \
+// RUN: %clang_cc1 -no-enable-noundef-analysis -O1 -triple wasm64-unknown-unknown -emit-llvm -o - %s \
 // RUN:   | FileCheck %s
 
 #define concat_(x, y) x##y
@@ -30,52 +30,52 @@ struct two_fields {
   double d, e;
 };
 test(two_fields);
-// CHECK: define void @_Z7forward10two_fields(%struct.two_fields* noalias nocapture writeonly sret(%struct.two_fields) align 8 %{{.*}}, %struct.two_fields* nocapture readonly byval(%struct.two_fields) align 8 %{{.*}})
+// CHECK: define void @_Z7forward10two_fields(ptr noalias nocapture writeonly sret(%struct.two_fields) align 8 %{{.*}}, ptr nocapture readonly byval(%struct.two_fields) align 8 %{{.*}})
 //
 // CHECK: define void @_Z15test_two_fieldsv()
 // CHECK: %[[tmp:.*]] = alloca %struct.two_fields, align 8
-// CHECK: call void @_Z14def_two_fieldsv(%struct.two_fields* nonnull sret(%struct.two_fields) align 8 %[[tmp]])
-// CHECK: call void @_Z3use10two_fields(%struct.two_fields* nonnull byval(%struct.two_fields) align 8 %[[tmp]])
+// CHECK: call void @_Z14def_two_fieldsv(ptr nonnull sret(%struct.two_fields) align 8 %[[tmp]])
+// CHECK: call void @_Z3use10two_fields(ptr nonnull byval(%struct.two_fields) align 8 %[[tmp]])
 // CHECK: ret void
 //
-// CHECK: declare void @_Z3use10two_fields(%struct.two_fields* byval(%struct.two_fields) align 8)
-// CHECK: declare void @_Z14def_two_fieldsv(%struct.two_fields* sret(%struct.two_fields) align 8)
+// CHECK: declare void @_Z3use10two_fields(ptr byval(%struct.two_fields) align 8)
+// CHECK: declare void @_Z14def_two_fieldsv(ptr sret(%struct.two_fields) align 8)
 
 struct copy_ctor {
   double d;
   copy_ctor(copy_ctor const &);
 };
 test(copy_ctor);
-// CHECK: define void @_Z7forward9copy_ctor(%struct.copy_ctor* noalias {{[^,]*}} sret(%struct.copy_ctor) align 8 %{{.*}}, %struct.copy_ctor* nonnull %{{.*}})
+// CHECK: define void @_Z7forward9copy_ctor(ptr noalias {{[^,]*}} sret(%struct.copy_ctor) align 8 %{{.*}}, ptr nonnull %{{.*}})
 //
-// CHECK: declare %struct.copy_ctor* @_ZN9copy_ctorC1ERKS_(%struct.copy_ctor* {{[^,]*}} returned {{[^,]*}}, %struct.copy_ctor* nonnull align 8 dereferenceable(8))
+// CHECK: declare ptr @_ZN9copy_ctorC1ERKS_(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align 8 dereferenceable(8))
 //
 // CHECK: define void @_Z14test_copy_ctorv()
 // CHECK: %[[tmp:.*]] = alloca %struct.copy_ctor, align 8
-// CHECK: call void @_Z13def_copy_ctorv(%struct.copy_ctor* nonnull sret(%struct.copy_ctor) align 8 %[[tmp]])
-// CHECK: call void @_Z3use9copy_ctor(%struct.copy_ctor* nonnull %[[tmp]])
+// CHECK: call void @_Z13def_copy_ctorv(ptr nonnull sret(%struct.copy_ctor) align 8 %[[tmp]])
+// CHECK: call void @_Z3use9copy_ctor(ptr nonnull %[[tmp]])
 // CHECK: ret void
 //
-// CHECK: declare void @_Z3use9copy_ctor(%struct.copy_ctor*)
-// CHECK: declare void @_Z13def_copy_ctorv(%struct.copy_ctor* sret(%struct.copy_ctor) align 8)
+// CHECK: declare void @_Z3use9copy_ctor(ptr)
+// CHECK: declare void @_Z13def_copy_ctorv(ptr sret(%struct.copy_ctor) align 8)
 
 struct __attribute__((aligned(16))) aligned_copy_ctor {
   double d, e;
   aligned_copy_ctor(aligned_copy_ctor const &);
 };
 test(aligned_copy_ctor);
-// CHECK: define void @_Z7forward17aligned_copy_ctor(%struct.aligned_copy_ctor* noalias {{[^,]*}} sret(%struct.aligned_copy_ctor) align 16 %{{.*}}, %struct.aligned_copy_ctor* nonnull %{{.*}})
+// CHECK: define void @_Z7forward17aligned_copy_ctor(ptr noalias {{[^,]*}} sret(%struct.aligned_copy_ctor) align 16 %{{.*}}, ptr nonnull %{{.*}})
 //
-// CHECK: declare %struct.aligned_copy_ctor* @_ZN17aligned_copy_ctorC1ERKS_(%struct.aligned_copy_ctor* {{[^,]*}} returned {{[^,]*}}, %struct.aligned_copy_ctor* nonnull align 16 dereferenceable(16))
+// CHECK: declare ptr @_ZN17aligned_copy_ctorC1ERKS_(ptr {{[^,]*}} returned {{[^,]*}}, ptr nonnull align 16 dereferenceable(16))
 //
 // CHECK: define void @_Z22test_aligned_copy_ctorv()
 // CHECK: %[[tmp:.*]] = alloca %struct.aligned_copy_ctor, align 16
-// CHECK: call void @_Z21def_aligned_copy_ctorv(%struct.aligned_copy_ctor* nonnull sret(%struct.aligned_copy_ctor) align 16 %[[tmp]])
-// CHECK: call void @_Z3use17aligned_copy_ctor(%struct.aligned_copy_ctor* nonnull %[[tmp]])
+// CHECK: call void @_Z21def_aligned_copy_ctorv(ptr nonnull sret(%struct.aligned_copy_ctor) align 16 %[[tmp]])
+// CHECK: call void @_Z3use17aligned_copy_ctor(ptr nonnull %[[tmp]])
 // CHECK: ret void
 //
-// CHECK: declare void @_Z3use17aligned_copy_ctor(%struct.aligned_copy_ctor*)
-// CHECK: declare void @_Z21def_aligned_copy_ctorv(%struct.aligned_copy_ctor* sret(%struct.aligned_copy_ctor) align 16)
+// CHECK: declare void @_Z3use17aligned_copy_ctor(ptr)
+// CHECK: declare void @_Z21def_aligned_copy_ctorv(ptr sret(%struct.aligned_copy_ctor) align 16)
 
 struct empty {};
 test(empty);

diff  --git a/clang/test/CodeGenCXX/wasm-eh.cpp b/clang/test/CodeGenCXX/wasm-eh.cpp
index 7aad93fb36e3e..e965768bf834f 100644
--- a/clang/test/CodeGenCXX/wasm-eh.cpp
+++ b/clang/test/CodeGenCXX/wasm-eh.cpp
@@ -1,6 +1,6 @@
 // REQUIRES: webassembly-registered-target
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple wasm32-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -mllvm -wasm-enable-eh -exception-model=wasm -target-feature +exception-handling -emit-llvm -o - -std=c++11 | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple wasm64-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -mllvm -wasm-enable-eh -exception-model=wasm -target-feature +exception-handling -emit-llvm -o - -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -mllvm -wasm-enable-eh -exception-model=wasm -target-feature +exception-handling -emit-llvm -o - -std=c++11 | FileCheck %s
+// RUN: %clang_cc1 %s -triple wasm64-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -mllvm -wasm-enable-eh -exception-model=wasm -target-feature +exception-handling -emit-llvm -o - -std=c++11 | FileCheck %s
 
 void may_throw();
 void dont_throw() noexcept;
@@ -20,7 +20,7 @@ void test0() {
   }
 }
 
-// CHECK-LABEL: define void @_Z5test0v() {{.*}} personality i8* bitcast (i32 (...)* @__gxx_wasm_personality_v0 to i8*)
+// CHECK-LABEL: define void @_Z5test0v() {{.*}} personality ptr @__gxx_wasm_personality_v0
 
 // CHECK:   %[[INT_ALLOCA:.*]] = alloca i32
 // CHECK:   invoke void @_Z9may_throwv()
@@ -30,20 +30,19 @@ void test0() {
 // CHECK-NEXT:   %[[CATCHSWITCH:.*]] = catchswitch within none [label %[[CATCHSTART_BB:.*]]] unwind to caller
 
 // CHECK: [[CATCHSTART_BB]]:
-// CHECK-NEXT:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [i8* bitcast (i8** @_ZTIi to i8*), i8* bitcast (i8** @_ZTId to i8*)]
-// CHECK-NEXT:   %[[EXN:.*]] = call i8* @llvm.wasm.get.exception(token %[[CATCHPAD]])
-// CHECK-NEXT:   store i8* %[[EXN]], i8** %exn.slot
+// CHECK-NEXT:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [ptr @_ZTIi, ptr @_ZTId]
+// CHECK-NEXT:   %[[EXN:.*]] = call ptr @llvm.wasm.get.exception(token %[[CATCHPAD]])
+// CHECK-NEXT:   store ptr %[[EXN]], ptr %exn.slot
 // CHECK-NEXT:   %[[SELECTOR:.*]] = call i32 @llvm.wasm.get.ehselector(token %[[CATCHPAD]])
-// CHECK-NEXT:   %[[TYPEID:.*]] = call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTIi to i8*)) #2
+// CHECK-NEXT:   %[[TYPEID:.*]] = call i32 @llvm.eh.typeid.for(ptr @_ZTIi) #2
 // CHECK-NEXT:   %[[MATCHES:.*]] = icmp eq i32 %[[SELECTOR]], %[[TYPEID]]
 // CHECK-NEXT:   br i1 %[[MATCHES]], label %[[CATCH_INT_BB:.*]], label %[[CATCH_FALLTHROUGH_BB:.*]]
 
 // CHECK: [[CATCH_INT_BB]]:
-// CHECK-NEXT:   %[[EXN:.*]] = load i8*, i8** %exn.slot
-// CHECK-NEXT:   %[[ADDR:.*]] = call i8* @__cxa_begin_catch(i8* %[[EXN]]) {{.*}} [ "funclet"(token %[[CATCHPAD]]) ]
-// CHECK-NEXT:   %[[ADDR_CAST:.*]] = bitcast i8* %[[ADDR]] to i32*
-// CHECK-NEXT:   %[[INT_VAL:.*]] = load i32, i32* %[[ADDR_CAST]]
-// CHECK-NEXT:   store i32 %[[INT_VAL]], i32* %[[INT_ALLOCA]]
+// CHECK-NEXT:   %[[EXN:.*]] = load ptr, ptr %exn.slot
+// CHECK-NEXT:   %[[ADDR:.*]] = call ptr @__cxa_begin_catch(ptr %[[EXN]]) {{.*}} [ "funclet"(token %[[CATCHPAD]]) ]
+// CHECK-NEXT:   %[[INT_VAL:.*]] = load i32, ptr %[[ADDR]]
+// CHECK-NEXT:   store i32 %[[INT_VAL]], ptr %[[INT_ALLOCA]]
 // CHECK-NEXT:   call void @_Z10dont_throwv() {{.*}} [ "funclet"(token %[[CATCHPAD]]) ]
 // CHECK-NEXT:   call void @__cxa_end_catch() {{.*}} [ "funclet"(token %[[CATCHPAD]]) ]
 // CHECK-NEXT:   catchret from %[[CATCHPAD]] to label %[[CATCHRET_DEST_BB0:.*]]
@@ -52,7 +51,7 @@ void test0() {
 // CHECK-NEXT:   br label %[[TRY_CONT_BB:.*]]
 
 // CHECK: [[CATCH_FALLTHROUGH_BB]]
-// CHECK-NEXT:   %[[TYPEID:.*]] = call i32 @llvm.eh.typeid.for(i8* bitcast (i8** @_ZTId to i8*)) #2
+// CHECK-NEXT:   %[[TYPEID:.*]] = call i32 @llvm.eh.typeid.for(ptr @_ZTId) #2
 // CHECK-NEXT:   %[[MATCHES:.*]] = icmp eq i32 %[[SELECTOR]], %[[TYPEID]]
 // CHECK-NEXT:   br i1 %[[MATCHES]], label %[[CATCH_FLOAT_BB:.*]], label %[[RETHROW_BB:.*]]
 
@@ -80,7 +79,7 @@ void test1() {
 // CHECK:   %[[CATCHSWITCH:.*]] = catchswitch within none [label %[[CATCHSTART_BB:.*]]] unwind to caller
 
 // CHECK: [[CATCHSTART_BB]]:
-// CHECK-NEXT:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [i8* null]
+// CHECK-NEXT:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [ptr null]
 // CHECK:   br label %[[CATCH_ALL_BB:.*]]
 
 // CHECK: [[CATCH_ALL_BB]]:
@@ -102,7 +101,7 @@ void test2() {
 // CHECK:   %[[CATCHSWITCH:.*]] = catchswitch within none [label %[[CATCHSTART_BB:.*]]] unwind to caller
 
 // CHECK: [[CATCHSTART_BB]]:
-// CHECK-NEXT:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [i8* bitcast (i8** @_ZTIi to i8*), i8* null]
+// CHECK-NEXT:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [ptr @_ZTIi, ptr null]
 // CHECK:   br i1 %{{.*}}, label %[[CATCH_INT_BB:.*]], label %[[CATCH_ALL_BB:.*]]
 
 // CHECK: [[CATCH_INT_BB]]:
@@ -124,7 +123,7 @@ void test3() {
 
 // CHECK: [[EHCLEANUP_BB]]:
 // CHECK-NEXT:   %[[CLEANUPPAD:.*]] = cleanuppad within none []
-// CHECK-NEXT:   call noundef %struct.Cleanup* @_ZN7CleanupD1Ev(%struct.Cleanup* {{[^,]*}} %{{.*}}) {{.*}} [ "funclet"(token %[[CLEANUPPAD]]) ]
+// CHECK-NEXT:   call noundef ptr @_ZN7CleanupD1Ev(ptr {{[^,]*}} %{{.*}}) {{.*}} [ "funclet"(token %[[CLEANUPPAD]]) ]
 // CHECK-NEXT:   cleanupret from %[[CLEANUPPAD]] unwind to caller
 
 // Possibly throwing function call within a catch
@@ -141,7 +140,7 @@ void test4() {
 // CHECK:   %[[CATCHSWITCH]] = catchswitch within none [label %[[CATCHSTART_BB]]] unwind to caller
 
 // CHECK: [[CATCHSTART_BB]]:
-// CHECK:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [i8* bitcast (i8** @_ZTIi to i8*)]
+// CHECK:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [ptr @_ZTIi]
 
 // CHECK:   invoke void @_Z9may_throwv() [ "funclet"(token %[[CATCHPAD]]) ]
 // CHECK-NEXT:           to label %[[INVOKE_CONT_BB:.*]] unwind label %[[EHCLEANUP_BB:.*]]
@@ -169,7 +168,7 @@ void test5() {
 // CHECK:   %[[CATCHSWITCH:.*]] = catchswitch within none [label %[[CATCHSTART_BB]]] unwind to caller
 
 // CHECK: [[CATCHSTART_BB]]:
-// CHECK:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [i8* null]
+// CHECK:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [ptr null]
 
 // CHECK:   invoke void @_Z9may_throwv() [ "funclet"(token %[[CATCHPAD]]) ]
 // CHECK-NEXT:           to label %[[INVOKE_CONT_BB0:.*]] unwind label %[[EHCLEANUP_BB:.*]]
@@ -209,14 +208,14 @@ void test6() {
 
 // CHECK: [[EHCLEANUP_BB0]]:
 // CHECK-NEXT:   %[[CLEANUPPAD0:.*]] = cleanuppad within none []
-// CHECK-NEXT:   call noundef %struct.Cleanup* @_ZN7CleanupD1Ev(%struct.Cleanup* {{.*}}) {{.*}} [ "funclet"(token %[[CLEANUPPAD0]]) ]
+// CHECK-NEXT:   call noundef ptr @_ZN7CleanupD1Ev(ptr {{.*}}) {{.*}} [ "funclet"(token %[[CLEANUPPAD0]]) ]
 // CHECK-NEXT:   cleanupret from %[[CLEANUPPAD0]] unwind label %[[CATCH_DISPATCH_BB:.*]]
 
 // CHECK: [[CATCH_DISPATCH_BB]]:
 // CHECK-NEXT:  %[[CATCHSWITCH:.*]] = catchswitch within none [label %[[CATCHSTART_BB:.*]]] unwind label %[[EHCLEANUP_BB1:.*]]
 
 // CHECK: [[CATCHSTART_BB]]:
-// CHECK-NEXT:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [i8* bitcast (i8** @_ZTIi to i8*)]
+// CHECK-NEXT:   %[[CATCHPAD:.*]] = catchpad within %[[CATCHSWITCH]] [ptr @_ZTIi]
 // CHECK:   br i1 %{{.*}}, label %[[CATCH_INT_BB:.*]], label %[[RETHROW_BB:.*]]
 
 // CHECK: [[CATCH_INT_BB]]:
@@ -232,7 +231,7 @@ void test6() {
 
 // CHECK: [[EHCLEANUP_BB2]]:
 // CHECK-NEXT:   %[[CLEANUPPAD2:.*]] = cleanuppad within %[[CATCHPAD]] []
-// CHECK-NEXT:   call noundef %struct.Cleanup* @_ZN7CleanupD1Ev(%struct.Cleanup* {{[^,]*}} %{{.*}}) {{.*}} [ "funclet"(token %[[CLEANUPPAD2]]) ]
+// CHECK-NEXT:   call noundef ptr @_ZN7CleanupD1Ev(ptr {{[^,]*}} %{{.*}}) {{.*}} [ "funclet"(token %[[CLEANUPPAD2]]) ]
 // CHECK-NEXT:   cleanupret from %[[CLEANUPPAD2]] unwind label %[[EHCLEANUP_BB3:.*]]
 
 // CHECK: [[EHCLEANUP_BB3]]:
@@ -241,7 +240,7 @@ void test6() {
 
 // CHECK: [[EHCLEANUP_BB1]]:
 // CHECK-NEXT:   %[[CLEANUPPAD1:.*]] = cleanuppad within none []
-// CHECK-NEXT:   call noundef %struct.Cleanup* @_ZN7CleanupD1Ev(%struct.Cleanup* {{[^,]*}} %{{.*}}) {{.*}} [ "funclet"(token %[[CLEANUPPAD1]]) ]
+// CHECK-NEXT:   call noundef ptr @_ZN7CleanupD1Ev(ptr {{[^,]*}} %{{.*}}) {{.*}} [ "funclet"(token %[[CLEANUPPAD1]]) ]
 // CHECK-NEXT:   cleanupret from %[[CLEANUPPAD1]] unwind to caller
 
 // CHECK: [[UNREACHABLE_BB]]:
@@ -281,7 +280,7 @@ void test7() {
 
 // CHECK:   %[[CATCHSWITCH0:.*]] = catchswitch within none
 
-// CHECK:   %[[CATCHPAD0:.*]] = catchpad within %[[CATCHSWITCH0]] [i8* bitcast (i8** @_ZTIi to i8*), i8* bitcast (i8** @_ZTId to i8*)]
+// CHECK:   %[[CATCHPAD0:.*]] = catchpad within %[[CATCHSWITCH0]] [ptr @_ZTIi, ptr @_ZTId]
 
 // CHECK:   invoke void @_Z9may_throwv() [ "funclet"(token %[[CATCHPAD0]]) ]
 
@@ -304,7 +303,7 @@ void test7() {
 
 // CHECK:   %[[CATCHSWITCH1:.*]] = catchswitch within none
 
-// CHECK:   %[[CATCHPAD1:.*]] = catchpad within %[[CATCHSWITCH1]] [i8* bitcast (i8** @_ZTIi to i8*), i8* null]
+// CHECK:   %[[CATCHPAD1:.*]] = catchpad within %[[CATCHSWITCH1]] [ptr @_ZTIi, ptr null]
 
 // CHECK:   invoke void @_Z9may_throwv() [ "funclet"(token %[[CATCHPAD1]]) ]
 
@@ -351,13 +350,13 @@ void test8() {
 
 // CHECK:   %[[CATCHSWITCH0:.*]] = catchswitch within none
 
-// CHECK:   %[[CATCHPAD0:.*]] = catchpad within %[[CATCHSWITCH0]] [i8* bitcast (i8** @_ZTIi to i8*)]
+// CHECK:   %[[CATCHPAD0:.*]] = catchpad within %[[CATCHSWITCH0]] [ptr @_ZTIi]
 
 // CHECK:   invoke void @_Z9may_throwv() [ "funclet"(token %[[CATCHPAD0]]) ]
 
 // CHECK:   %[[CATCHSWITCH1:.*]] = catchswitch within %[[CATCHPAD0]]
 
-// CHECK:   %[[CATCHPAD1:.*]] = catchpad within %[[CATCHSWITCH1]] [i8* bitcast (i8** @_ZTIi to i8*)]
+// CHECK:   %[[CATCHPAD1:.*]] = catchpad within %[[CATCHSWITCH1]] [ptr @_ZTIi]
 
 // CHECK:   invoke void @_Z9may_throwv() [ "funclet"(token %[[CATCHPAD1]]) ]
 
@@ -378,10 +377,10 @@ void test8() {
 
 // CHECK:   unreachable
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple wasm32-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -exception-model=wasm -target-feature +exception-handling -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=WARNING-DEFAULT
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple wasm32-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -exception-model=wasm -target-feature +exception-handling -Wwasm-exception-spec -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=WARNING-ON
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple wasm32-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -exception-model=wasm -target-feature +exception-handling -Wno-wasm-exception-spec -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=WARNING-OFF
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple wasm32-unknown-unknown -fexceptions -fcxx-exceptions -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=EM-EH-WARNING
+// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -exception-model=wasm -target-feature +exception-handling -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=WARNING-DEFAULT
+// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -exception-model=wasm -target-feature +exception-handling -Wwasm-exception-spec -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=WARNING-ON
+// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -exception-model=wasm -target-feature +exception-handling -Wno-wasm-exception-spec -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=WARNING-OFF
+// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -fexceptions -fcxx-exceptions -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s --check-prefix=EM-EH-WARNING
 
 // Wasm EH ignores dynamic exception specifications with types at the moment.
 // This is controlled by -Wwasm-exception-spec, which is on by default. This
@@ -405,7 +404,7 @@ void test10() throw() {
 // Here we only check if the command enables wasm exception handling in the
 // backend so that exception handling instructions can be generated in .s file.
 
-// RUN: %clang_cc1 -no-opaque-pointers %s -triple wasm32-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -mllvm -wasm-enable-eh -exception-model=wasm -target-feature +exception-handling -S -o - -std=c++11 | FileCheck %s --check-prefix=ASSEMBLY
+// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -fms-extensions -fexceptions -fcxx-exceptions -mllvm -wasm-enable-eh -exception-model=wasm -target-feature +exception-handling -S -o - -std=c++11 | FileCheck %s --check-prefix=ASSEMBLY
 
 // ASSEMBLY: try
 // ASSEMBLY: catch

diff  --git a/clang/test/CodeGenCXX/windows-itanium-exceptions.cpp b/clang/test/CodeGenCXX/windows-itanium-exceptions.cpp
index 0336f54575b58..e8326b5bf579a 100644
--- a/clang/test/CodeGenCXX/windows-itanium-exceptions.cpp
+++ b/clang/test/CodeGenCXX/windows-itanium-exceptions.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple thumbv7-windows-itanium -fexceptions -fcxx-exceptions %s -o - | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm -triple i686-windows-itanium -fexceptions -fcxx-exceptions %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple thumbv7-windows-itanium -fexceptions -fcxx-exceptions %s -o - | FileCheck %s
+// RUN: %clang_cc1 -emit-llvm -triple i686-windows-itanium -fexceptions -fcxx-exceptions %s -o - | FileCheck %s
 // REQUIRES: asserts
 
 void except() {
@@ -10,35 +10,34 @@ void attempt() {
   try { except(); } catch (...) { }
 }
 
-// CHECK: @_ZTIi = external dso_local constant i8*
+// CHECK: @_ZTIi = external dso_local constant ptr
 
 // CHECK: define {{.*}}void @_Z6exceptv() {{.*}} {
-// CHECK:   %exception = call {{.*}}i8* @__cxa_allocate_exception(i32 4)
-// CHECK:   %0 = bitcast i8* %exception to i32*
-// CHECK:   store i32 32, i32* %0
-// CHECK:   call {{.*}}void @__cxa_throw(i8* %exception, i8* bitcast (i8** @_ZTIi to i8*), i8* null)
+// CHECK:   %exception = call {{.*}}ptr @__cxa_allocate_exception(i32 4)
+// CHECK:   store i32 32, ptr %exception
+// CHECK:   call {{.*}}void @__cxa_throw(ptr %exception, ptr @_ZTIi, ptr null)
 // CHECK:   unreachable
 // CHECK: }
 
 // CHECK: define {{.*}}void @_Z7attemptv()
-// CHECK-SAME: personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*)
-// CHECK:   %exn.slot = alloca i8*
+// CHECK-SAME: personality ptr @__gxx_personality_v0
+// CHECK:   %exn.slot = alloca ptr
 // CHECK:   %ehselector.slot = alloca i32
 // CHECK:   invoke {{.*}}void @_Z6exceptv()
 // CHECK:     to label %invoke.cont unwind label %lpad
 // CHECK: invoke.cont:
 // CHECK:    br label %try.cont
 // CHECK: lpad:
-// CHECK:    %0 = landingpad { i8*, i32 }
-// CHECK:      catch i8* null
-// CHECK:    %1 = extractvalue { i8*, i32 } %0, 0
-// CHECK:    store i8* %1, i8** %exn.slot
-// CHECK:    %2 = extractvalue { i8*, i32 } %0, 1
-// CHECK:    store i32 %2, i32* %ehselector.slot
+// CHECK:    %0 = landingpad { ptr, i32 }
+// CHECK:      catch ptr null
+// CHECK:    %1 = extractvalue { ptr, i32 } %0, 0
+// CHECK:    store ptr %1, ptr %exn.slot
+// CHECK:    %2 = extractvalue { ptr, i32 } %0, 1
+// CHECK:    store i32 %2, ptr %ehselector.slot
 // CHECK:    br label %catch
 // CHECK: catch:
-// CHECK:    %exn = load i8*, i8** %exn.slot
-// CHECK:    %3 = call {{.*}}i8* @__cxa_begin_catch(i8* %{{2|exn}})
+// CHECK:    %exn = load ptr, ptr %exn.slot
+// CHECK:    %3 = call {{.*}}ptr @__cxa_begin_catch(ptr %{{2|exn}})
 // CHECK:    call {{.*}}void @__cxa_end_catch()
 // CHECK:    br label %try.cont
 // CHECK: try.cont:

diff  --git a/clang/test/CodeGenCXX/windows-on-arm-itanium-thread-local.cpp b/clang/test/CodeGenCXX/windows-on-arm-itanium-thread-local.cpp
index 7bba322176b10..27a04f978c226 100644
--- a/clang/test/CodeGenCXX/windows-on-arm-itanium-thread-local.cpp
+++ b/clang/test/CodeGenCXX/windows-on-arm-itanium-thread-local.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple thumbv7--windows-itanium -fdeclspec -fms-compatibility -fms-compatibility-version=19.0 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple thumbv7--windows-itanium -fdeclspec -fms-compatibility -fms-compatibility-version=19.0 -emit-llvm -o - %s | FileCheck %s
 
 void *g();
 thread_local static void *c = g();
@@ -6,7 +6,7 @@ void f(void *p) {
   c = p;
 }
 
-// CHECK-LABEL: @_Z1fPv(i8* noundef %p)
-// CHECK-NOT: call i8** @_ZTWL1c()
-// CHECK: call arm_aapcs_vfpcc i8** @_ZTWL1c()
+// CHECK-LABEL: @_Z1fPv(ptr noundef %p)
+// CHECK-NOT: call ptr @_ZTWL1c()
+// CHECK: call arm_aapcs_vfpcc ptr @_ZTWL1c()
 

diff  --git a/clang/test/CodeGenCXX/windows-x86-swiftcall.cpp b/clang/test/CodeGenCXX/windows-x86-swiftcall.cpp
index baa12aa69280e..9927d0b24799e 100644
--- a/clang/test/CodeGenCXX/windows-x86-swiftcall.cpp
+++ b/clang/test/CodeGenCXX/windows-x86-swiftcall.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-windows -emit-llvm -target-cpu core2 -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-windows -emit-llvm -target-cpu core2 -o - %s | FileCheck %s
 
 #define SWIFTCALL __attribute__((swiftcall))
 #define OUT __attribute__((swift_indirect_result))
@@ -18,7 +18,7 @@ struct NonTrivial {
 
 SWIFTCALL int receiveNonTrivial(NonTrivial o) { return o.o; }
 
-// CHECK-LABEL: define dso_local swiftcc noundef i32 @"?receiveNonTrivial@@YSHUNonTrivial@@@Z"(%struct.NonTrivial* noundef %o)
+// CHECK-LABEL: define dso_local swiftcc noundef i32 @"?receiveNonTrivial@@YSHUNonTrivial@@@Z"(ptr noundef %o)
 
 int passNonTrivial() {
   return receiveNonTrivial({});
@@ -26,4 +26,4 @@ int passNonTrivial() {
 
 // CHECK-LABEL: define dso_local noundef i32 @"?passNonTrivial@@YAHXZ"()
 // CHECK-NOT: stacksave
-// CHECK: call swiftcc noundef i32 @"?receiveNonTrivial@@YSHUNonTrivial@@@Z"(%struct.NonTrivial* noundef %{{.*}})
+// CHECK: call swiftcc noundef i32 @"?receiveNonTrivial@@YSHUNonTrivial@@@Z"(ptr noundef %{{.*}})

diff  --git a/clang/test/CodeGenCXX/x86_32-arguments.cpp b/clang/test/CodeGenCXX/x86_32-arguments.cpp
index 0d0004a320d7d..7388b2fcfe6cd 100644
--- a/clang/test/CodeGenCXX/x86_32-arguments.cpp
+++ b/clang/test/CodeGenCXX/x86_32-arguments.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple i386-apple-darwin9 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple i386-apple-darwin9 -emit-llvm -o - %s | FileCheck %s
 
 // Non-trivial dtors, should both be passed indirectly.
 struct S {
@@ -6,9 +6,9 @@ struct S {
   short s;
 };
 
-// CHECK-LABEL: define{{.*}} void @_Z1fv(%struct.S* noalias sret(%struct.S) align 2 %
+// CHECK-LABEL: define{{.*}} void @_Z1fv(ptr noalias sret(%struct.S) align 2 %
 S f() { return S(); }
-// CHECK-LABEL: define{{.*}} void @_Z1f1S(%struct.S* noundef %0)
+// CHECK-LABEL: define{{.*}} void @_Z1f1S(ptr noundef %0)
 void f(S) { }
 
 // Non-trivial dtors, should both be passed indirectly.
@@ -18,10 +18,10 @@ class C {
   double c;
 };
 
-// CHECK-LABEL: define{{.*}} void @_Z1gv(%class.C* noalias sret(%class.C) align 4 %
+// CHECK-LABEL: define{{.*}} void @_Z1gv(ptr noalias sret(%class.C) align 4 %
 C g() { return C(); }
 
-// CHECK-LABEL: define{{.*}} void @_Z1f1C(%class.C* noundef %0)
+// CHECK-LABEL: define{{.*}} void @_Z1f1C(ptr noundef %0)
 void f(C) { }
 
 
@@ -31,7 +31,7 @@ void f(C) { }
 
 // CHECK-LABEL: define{{.*}} void @_ZThn4_N18BasicAliasAnalysis13getModRefInfoE8CallSite
 // ...
-// CHECK: %struct.CallSite* noundef byval(%struct.CallSite) align 4 %CS)
+// CHECK: ptr noundef byval(%struct.CallSite) align 4 %CS)
 struct CallSite {
   unsigned Ptr;
   CallSite(unsigned XX) : Ptr(XX) {}
@@ -84,12 +84,12 @@ struct s4_1 { float x; };
 struct s4_2 : s4_0, s4_1 { };
 s4_2 f4() { return s4_2(); }
 
-// CHECK-LABEL: define{{.*}} i32* @_Z2f5v()
+// CHECK-LABEL: define{{.*}} ptr @_Z2f5v()
 struct s5 { s5(); int &x; };
 s5 f5() { return s5(); }
 
 // CHECK-LABEL: define{{.*}} i32 @_Z4f6_0M2s6i(i32 %a)
-// CHECK: define{{.*}} i64 @_Z4f6_1M2s6FivE({ i32, i32 }* noundef byval({ i32, i32 }) align 4 %0)
+// CHECK: define{{.*}} i64 @_Z4f6_1M2s6FivE(ptr noundef byval({ i32, i32 }) align 4 %0)
 // FIXME: It would be nice to avoid byval on the previous case.
 struct s6 {};
 typedef int s6::* s6_mdp;
@@ -103,13 +103,13 @@ struct s7_1 { double x; };
 struct s7 : s7_0, s7_1 { };
 s7 f7() { return s7(); }
 
-// CHECK-LABEL: define{{.*}} void @_Z2f8v(%struct.s8* noalias sret(%struct.s8) align 4 %agg.result)
+// CHECK-LABEL: define{{.*}} void @_Z2f8v(ptr noalias sret(%struct.s8) align 4 %agg.result)
 struct s8_0 { };
 struct s8_1 { double x; };
 struct s8 { s8_0 a; s8_1 b; };
 s8 f8() { return s8(); }
 
-// CHECK-LABEL: define{{.*}} void @_Z2f9v(%struct.s9* noalias sret(%struct.s9) align 4 %agg.result)
+// CHECK-LABEL: define{{.*}} void @_Z2f9v(ptr noalias sret(%struct.s9) align 4 %agg.result)
 struct s9_0 { unsigned : 0; };
 struct s9_1 { double x; };
 struct s9 { s9_0 a; s9_1 b; };

diff  --git a/clang/test/CodeGenCXX/x86_64-arguments-avx.cpp b/clang/test/CodeGenCXX/x86_64-arguments-avx.cpp
index b1f2401cdbdf5..5390a02b13b84 100644
--- a/clang/test/CodeGenCXX/x86_64-arguments-avx.cpp
+++ b/clang/test/CodeGenCXX/x86_64-arguments-avx.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-feature +avx | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-unknown -emit-llvm -o - %s -target-feature +avx | FileCheck %s
 
 namespace test1 {
 typedef double __m256d __attribute__((__vector_size__(32)));
@@ -56,6 +56,6 @@ union U {
   __attribute__((__vector_size__(32))) float f1;
   int f2;
 };
-// CHECK: define{{.*}} i32 @_ZN5test31fENS_1UE({{.*}}* noundef byval({{.*}}) align 32
+// CHECK: define{{.*}} i32 @_ZN5test31fENS_1UE(ptr noundef byval({{.*}}) align 32
 int f(U u) { return u.f2; }
 }

diff  --git a/clang/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp b/clang/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp
index bccda3ab0145e..f108e528269d6 100644
--- a/clang/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp
+++ b/clang/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple x86_64-unknown-nacl -emit-llvm -o - %s | FileCheck %s
-// RUN: %clang_cc1 -no-opaque-pointers -std=c++11 -triple=x86_64-unknown-linux-gnux32 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-nacl -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -std=c++11 -triple=x86_64-unknown-linux-gnux32 -emit-llvm -o - %s | FileCheck %s
 
 struct test_struct {};
 typedef int test_struct::* test_struct_mdp;
@@ -46,12 +46,12 @@ void f_struct_with_mfp_too_much(struct_with_mfp_too_much a, int x) {
 /* Struct containing an empty struct */
 typedef struct { int* a; test_struct x; double *b; } struct_with_empty;
 
-// CHECK-LABEL: define{{.*}} void @{{.*}}f_pass_struct_with_empty{{.*}}(i64 %x{{.*}}, double* %x
+// CHECK-LABEL: define{{.*}} void @{{.*}}f_pass_struct_with_empty{{.*}}(i64 %x{{.*}}, ptr %x
 void f_pass_struct_with_empty(struct_with_empty x) {
   (void) x;
 }
 
-// CHECK-LABEL: define{{.*}} { i64, double* } @{{.*}}f_return_struct_with_empty
+// CHECK-LABEL: define{{.*}} { i64, ptr } @{{.*}}f_return_struct_with_empty
 struct_with_empty f_return_struct_with_empty() {
   return {0, {}, 0};
 }


        


More information about the cfe-commits mailing list