llvm-project/llvm/test/Verifier
Matt Arsenault f883e75497 GlobalIFunc: Make allowed constant expressions stricter
This was allowing getelementptr with offsets, which doesn't make
sense. My initial attempt to use stripPointerCasts broke a few tests
involving aliases; add a new targeted verifier test for aliases.

This also provides the fix from D138537 for free, and also adds
support for addrspacecast (D138538) for free. Merge the tests in from
those.

I'm not really sure why findBaseObject exists; it seems redundant with
stripPointerCasts* (I'm also not really sure why getelementptrs are
allowed off of functions).
2022-12-02 15:20:57 -05:00
..
AMDGPU
ARM
Mips
SystemZ
2002-04-13-RetTypes.ll
2002-11-05-GetelementptrPointers.ll
2004-05-21-SwitchConstantMismatch.ll
2006-07-11-StoreStruct.ll
2006-10-15-AddrLabel.ll
2006-12-12-IntrinsicDefine.ll
2007-12-21-InvokeParamAttrs.ll
2008-01-11-VarargAttrs.ll
2008-03-01-AllocaSized.ll
2008-11-15-RetVoid.ll
2009-05-29-InvokeResult1.ll
2009-05-29-InvokeResult2.ll
2009-05-29-InvokeResult3.ll
2010-08-07-PointerIntrinsic.ll
AmbiguousPhi.ll
DIFile.ll
DILocation-parents.ll
DILocation-scope.ll
DISubprogram.ll
PhiGrouping.ll
README.txt
SelfReferential.ll
aarch64-ldstxr.ll [OpaquePtr][AArch64] Use elementtype on ldxr/stxr 2022-03-14 10:09:59 -07:00
access_group.ll [Verifier] Verify llvm.access.group metadata 2022-03-14 16:16:36 +01:00
alias-scope-metadata.ll [Verifier] Verify scoped noalias metadata 2021-09-20 18:27:28 +02:00
alias.ll [IR] Allow available_externally GlobalAlias 2022-11-07 09:03:23 -08:00
align-md.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
align.ll [Verifier] Improve incompatible attribute type check 2021-07-14 21:02:10 +02:00
alloc-size-failedparse.ll
allockind.ll attributes: introduce allockind attr for describing allocator fn behavior 2022-05-31 10:01:17 -04:00
allocsize.ll
amdgpu-cc.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
annotation-metadata.ll
arm-intrinsics.ll [OpaquePtr][ARM] Use elementtype on ldrex/ldaex/stlex/strex 2022-03-16 14:11:53 -07:00
array_allocated.ll
array_associated.ll
array_dataLocation.ll
array_rank.ll
assume-bundles.ll [Verifier] Add context for assume operand bundles verifier errors 2021-10-19 09:52:04 -07:00
atomics.ll
bitcast-address-space-nested-global-cycle.ll
bitcast-address-space-nested-global.ll
bitcast-address-space-through-constant-inttoptr-inside-gep-instruction.ll
bitcast-address-space-through-constant-inttoptr.ll
bitcast-address-space-through-gep-2.ll
bitcast-address-space-through-gep.ll
bitcast-address-space-through-inttoptr.ll
bitcast-address-spaces.ll
bitcast-alias-address-space.ll
bitcast-pointer-vector-neg.ll
bitcast-vector-pointer-as-neg.ll
bitcast-vector-pointer-as.ll
bitcast-vector-pointer-neg.ll
bitcast-vector-pointer-pos.ll
blockbyref.ll
bswap.ll
byref.ll [Verifier] Improve incompatible attribute type check 2021-07-14 21:02:10 +02:00
byval-1.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
byval-4.ll
callbr.ll [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
callsite-dbgloc.ll [clang][DebugInfo] Emit DISubprogram for extern functions with reserved names 2022-10-28 08:07:54 -07:00
cc-flags.ll
comdat-decl1.ll
comdat-decl2.ll
comdat.ll
comdat2.ll
comdat3.ll
commandline-meta1.ll
commandline-meta2.ll
commandline-meta3.ll
commandline-meta4.ll
cttz-undef-arg.ll
dbg-difile-crash.ll
dbg-invalid-compileunit.ll
dbg-invalid-named-metadata.ll
dbg-invalid-retaintypes.ll
dbg-invalid-vector.ll
dbg-line-without-file.ll
dbg-null-retained-type.ll
dbg-orphaned-compileunit.ll
dbg-typerefs.ll
dbg.ll
deoptimize-intrinsic.ll
dereferenceable-md-inttoptr.ll
dereferenceable-md.ll
di-subroutine-localvar.ll
diderivedtype-address-space-atomic-type.ll
diderivedtype-address-space-const-type.ll
diderivedtype-address-space-friend.ll
diderivedtype-address-space-inheritance.ll
diderivedtype-address-space-member.ll
diderivedtype-address-space-ptr-to-member-type.ll
diderivedtype-address-space-restrict-type.ll
diderivedtype-address-space-rvalue-reference-type.ll
diderivedtype-address-space-typedef.ll
diderivedtype-address-space-volatile-type.ll
diexpression-dwarf-entry-value.ll
diexpression-entry-value-llvm-ir.ll
diexpression-entry-value.ll
diexpression-swap.ll
diexpression-valid-entry-value.ll
digenericsubrange-count-upperBound.ll
digenericsubrange-missing-stride.ll
digenericsubrange-missing-upperBound.ll
diglobalvariable.ll
dilocation-in-wrong-place.ll
disubprogram-name-match-only.ll
disubrange-count-upperBound.ll
disubrange-missing-upperBound.ll
dllstorage.ll [Verifier] Allow dllexport protected after D133267 2022-09-06 15:28:29 -07:00
dominates.ll [IR] Don't use blockaddresses as callbr arguments 2022-07-15 10:18:17 +02:00
element-wise-atomic-memory-intrinsics.ll
elementtype.ll [LangRef] Require elementtype attribute for indirect inline asm operands 2022-01-04 10:02:06 +01:00
fnarg-debuginfo.ll
fnarg-nodebug.ll
force-opaque-ptr.ll [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
fp-intrinsics.ll [IR] Switch everything to use memory attribute 2022-11-04 10:21:38 +01:00
fpmath.ll
fragment.ll
frameescape.ll
func-dbg.ll
function-metadata-bad.ll
function-metadata-good.ll
gc_relocate_addrspace.ll
gc_relocate_operand.ll
gc_relocate_return.ll
gc_result_token.ll [Verifier] Allow undef/poison token argument to llvm.experimental.gc.result 2022-10-19 20:51:21 +07:00
gcread-ptrptr.ll
gcroot.ll
gcwrite-ptrptr.ll
get-active-lane-mask.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
global-ctors-2.ll Verifier: Update error message for opaque pointers 2022-11-27 12:55:30 -05:00
global-ctors.ll
guard-intrinsic.ll
ident-meta1.ll
ident-meta2.ll
ident-meta3.ll
ident-meta4.ll
ifunc-opaque.ll GlobalIFunc: Make allowed constant expressions stricter 2022-12-02 15:20:57 -05:00
ifunc.ll Verifier: Check ifunc resolver functions return a pointer 2022-11-27 12:42:08 -05:00
immarg-param-attribute-invalid.ll
inalloca-vararg.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
inalloca1.ll [Verifier] Improve incompatible attribute type check 2021-07-14 21:02:10 +02:00
inalloca2.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
inalloca3.ll Reapply "OpaquePtr: Turn inalloca into a type attribute" 2021-03-29 08:55:30 -04:00
inline-asm-indirect-operand.ll [Verifier] Enforce elementtype attr for inline asm indirect constraints 2022-01-06 15:22:00 +01:00
insert-extract-intrinsics-invalid.ll [NFC] Combine test cases of verifier 2022-08-14 10:12:16 +08:00
intrinsic-addr-taken.ll [Verifier] Extend address taken check for unknown intrinsics 2021-07-15 23:16:14 +02:00
intrinsic-arg-overloading-struct-ret.ll
intrinsic-bad-arg-type.ll
intrinsic-immarg.ll [clang] Add support for __builtin_memset_inline 2022-06-10 13:13:59 +00:00
invalid-cleanuppad-chain.ll [Verifier] Avoid asserting on invalid cleanuppad chain 2022-01-14 12:10:41 +01:00
invalid-disubrange-count-node.ll [DebugInfo] Upgrade DISubragne::count to accept DIExpression also 2021-03-30 09:16:55 +05:30
invalid-disubrange-lowerBound.ll
invalid-disubrange-stride.ll
invalid-disubrange-upperBound.ll
invalid-eh.ll
invalid-frame-pointer-attr-empty.ll
invalid-frame-pointer-attr-no-value.ll
invalid-frame-pointer-attr.ll
invalid-patchable-function-entry.ll
invalid-splice.ll [IR] Change vector.splice intrinsic to reject out-of-bounds indices 2022-01-11 09:37:39 +00:00
invalid-statepoint.ll [Verifier] Require elementtype on gc.statepoint intrinsics 2022-02-04 14:29:53 +01:00
invalid-strbool-attr.ll Normalize interaction with boolean attributes 2021-04-17 08:17:33 +02:00
invalid-vp-intrinsics.ll [VP] Add vp.icmp comparison intrinsic and docs 2022-03-30 17:05:11 +01:00
invalid-warn-stack-size.ll [IR] convert warn-stack-size from module flag to fn attr 2021-06-21 15:09:25 -07:00
invariant.group.ll [Verifier] Only allow invariant.group metadata on stores and loads 2021-09-02 12:49:04 -07:00
invoke.ll [ObjC][ARC] Use the addresses of the ARC runtime functions instead of 2021-09-08 11:58:03 -07:00
jumptable.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
kcfi-operand-bundles.ll KCFI sanitizer 2022-08-24 22:41:38 +00:00
llvm.compiler_used-invalid-type.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
llvm.dbg.declare-address.ll
llvm.dbg.declare-expression.ll
llvm.dbg.declare-variable.ll
llvm.dbg.intrinsic-dbg-attachment.ll
llvm.dbg.value-expression.ll
llvm.dbg.value-value.ll
llvm.dbg.value-variable.ll
llvm.fptrunc.round.ll [AMDGPU] Add a new intrinsic to control fp_trunc rounding mode 2022-02-11 12:08:23 -05:00
llvm.loop-cu-strip-indirect.ll Support stripping indirectly referenced DILocations from !llvm.loop metadata 2021-05-27 13:23:33 -07:00
llvm.loop-cu-strip.ll
llvm.loop.cu.ll
llvm.loop.ll
llvm.used-invalid-init.ll
llvm.used-invalid-init2.ll [Verifier] Make error message precise about which variable is being diagnosed. 2021-12-15 16:05:31 -08:00
llvm.used-invalid-type.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
llvm.used-invalid-type2.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
llvm.used-ptr-type.ll
masked-load.ll
masked-store.ll
matrix-intrinsics-opaque-ptrs.ll [Verifier] Make matrix intrinsic verification compatible with opaque pointers 2021-12-01 16:26:05 +01:00
matrix-intrinsics.ll Recommit "[Matrix] Overload stride arg in matrix.columnwise.load/store." 2021-08-12 18:31:57 +01:00
mdcompositetype-templateparams-tuple.ll
mdcompositetype-templateparams.ll
memcpy-inline.ll
memcpy.ll
memprof-metadata-bad.ll [MemProf] Basic metadata support and verification 2022-07-20 15:30:55 -07:00
memprof-metadata-good.ll [MemProf] Basic metadata support and verification 2022-07-20 15:30:55 -07:00
memset-inline.ll [clang] Add support for __builtin_memset_inline 2022-06-10 13:13:59 +00:00
metadata-function-dbg.ll [IR] Enable opaque pointers by default 2022-06-02 09:40:56 +02:00
metadata-function-kcfi-type.ll KCFI sanitizer 2022-08-24 22:41:38 +00:00
metadata-function-prof.ll
module-flags-1.ll [IR] Allow absence for Min module flags and make AArch64 BTI/PAC-RET flags backward compatible 2022-07-18 09:35:12 -07:00
module-flags-2.ll
module-flags-3.ll
module-flags-cgprofile.ll
module-flags-semantic-interposition.ll
musttail-invalid.ll [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
musttail-valid.ll
noalias_scope_decl.ll
non-integer-gep-index.ll
non-integer-gep-index.ll.bc
non-integral-pointers.ll Allow ptrtoint/inttoptr of non-integral pointer types in IR 2021-06-11 13:38:32 -07:00
noundef.ll [Verifier] Improve incompatible attribute type check 2021-07-14 21:02:10 +02:00
opaque-ptr-invalid.ll [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
opaque-ptr.ll [OpaquePtr] Forbid mixing typed and opaque pointers 2021-09-10 15:18:23 +02:00
operand-bundles.ll [ObjCARC] Require the function argument in the clang.arc.attachedcall bundle. 2022-01-28 12:41:45 -08:00
param-align.ll [Verifier] Relieve intrinsics parameter alignment size constrain 2022-10-21 17:01:20 +08:00
param-attr-align.ll Verify parameter alignment attribute 2022-03-27 09:03:22 +08:00
param-ret-align.ll [Verifier] Relieve intrinsics parameter alignment size constrain 2022-10-21 17:01:20 +08:00
pr34325.ll
preallocated-invalid.ll [Verifier] Improve incompatible attribute type check 2021-07-14 21:02:10 +02:00
preallocated-valid.ll
ptrauth-operand-bundles.ll [IR] Define "ptrauth" operand bundle. 2022-02-14 11:27:35 -08:00
range-1.ll
range-2.ll
recursive-struct-param.ll
recursive-type-1.ll
recursive-type-2.ll
recursive-type-3.ll
recursive-type-load.ll
recursive-type-store.ll
reduction-intrinsics.ll
resume.ll
sat-intrinsics.ll
scalable-global-vars.ll
scalable-vector-struct-alloca.ll
scalable-vector-struct-load.ll
scalable-vector-struct-store.ll
scatter_gather.ll
set1.ll Add debug support for set types 2021-03-29 18:04:48 -07:00
sme-attributes.ll [AArch64][SME] Add utility class for handling SME attributes. 2022-09-12 12:41:30 +00:00
speculatable-callsite-invalid.ll
speculatable-callsite.ll
sret.ll [Verifier] Improve incompatible attribute type check 2021-07-14 21:02:10 +02:00
statepoint.ll [Statepoint] Update gc.statepoint calls in tests with elementtype (NFC) 2022-02-04 14:15:41 +01:00
stepvector-intrinsic.ll
swiftasync.ll IR+AArch64: add a "swiftasync" argument attribute. 2021-05-14 11:43:58 +01:00
swifterror.ll [Verifier] Check type of swifterror alloca 2022-03-11 14:52:56 +01:00
swifterror2.ll [AsmParser] Unify parsing of attributes 2021-07-15 17:51:11 +02:00
swifterror3.ll
swiftself.ll
swifttailcc-musttail-valid.ll SwiftTailCC: teach verifier musttail rules applicable to this CC. 2021-05-28 11:12:00 +01:00
swifttailcc-musttail.ll SwiftTailCC: teach verifier musttail rules applicable to this CC. 2021-05-28 11:12:00 +01:00
tailcc-musttail.ll SwiftTailCC: teach verifier musttail rules applicable to this CC. 2021-05-28 11:12:00 +01:00
tbaa-allowed.ll
tbaa.ll
token1-with-asserts.ll [NFC][Verifier] Split token1.ll into two, assert/non-assert versions 2021-04-28 13:58:38 +03:00
token1-without-asserts.ll [NFC][Verifier] Split token1.ll into two, assert/non-assert versions 2021-04-28 13:58:38 +03:00
token2.ll
token3.ll
token4.ll
token5.ll
token6.ll [X86][AMX] Verify illegal types or instructions for x86_amx. 2021-04-20 16:14:22 +08:00
token7.ll
unique-disubprogram.ll
unsized-types-alloca.ll
unsized-types-load.ll
unsized-types-store.ll
varargs-intrinsic.ll
variant-part.ll
vp-intrinsics.ll [VP] Add more cast VPintrinsic and docs. 2022-04-01 09:16:10 +08:00
vscale_range.ll [IR] Remove unbounded as possible value for vscale_range minimum 2021-12-07 09:52:21 +00:00
weak-dllimport.ll
x86_amx1.ll [X86][AMX] Verify illegal types or instructions for x86_amx. 2021-04-20 16:14:22 +08:00
x86_amx2.ll [X86][AMX] Verify illegal types or instructions for x86_amx. 2021-04-20 16:14:22 +08:00
x86_amx3.ll [X86][AMX] Verify illegal types or instructions for x86_amx. 2021-04-20 16:14:22 +08:00
x86_amx4.ll [X86][AMX] Verify illegal types or instructions for x86_amx. 2021-04-20 16:14:22 +08:00
x86_amx5.ll [X86][AMX] Verify illegal types or instructions for x86_amx. 2021-04-20 16:14:22 +08:00
x86_amx6.ll [X86][AMX] Verify illegal types or instructions for x86_amx. 2021-04-20 16:14:22 +08:00
x86_amx7.ll [X86][AMX] Verify illegal types or instructions for x86_amx. 2021-04-20 16:14:22 +08:00
x86_amx8.ll [X86][AMX] Verify illegal types or instructions for x86_amx. 2021-04-20 16:14:22 +08:00
x86_amx9.ll [NFC] Use llvm-as instead of llc 2022-02-01 13:07:22 -06:00
x86_intr.ll

README.txt

This directory contains testcases that the verifier is supposed to detect as
malformed LLVM code.  Testcases for situations that the verifier incorrectly
identifies as malformed should go in the test/Assembler directory.