Reland [IR] Increase max alignment to 4GB

Currently the max alignment representable is 1GB, see D108661.
Setting the align of an object to 4GB is desirable in some cases to make sure the lower 32 bits are clear which can be used for some optimizations, e.g. https://crbug.com/1016945.

This uses an extra bit in instructions that carry an alignment. We can store 15 bits of "free" information, and with this change some instructions (e.g. AtomicCmpXchgInst) use 14 bits.
We can increase the max alignment representable above 4GB (up to 2^62) since we're only using 33 of the 64 values, but I've just limited it to 4GB for now.

The one place we have to update the bitcode format is for the alloca instruction. It stores its alignment into 5 bits of a 32 bit bitfield. I've added another field which is 8 bits and should be future proof for a while. For backward compatibility, we check if the old field has a value and use that, otherwise use the new field.

Updating clang's max allowed alignment will come in a future patch.

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D110451
This commit is contained in:
Arthur Eubanks 2021-09-24 15:54:17 -07:00
parent 05de0ab431
commit 8d64314ffe
54 changed files with 176 additions and 167 deletions

View File

@ -2695,8 +2695,8 @@ const BlockByrefInfo &CodeGenFunction::getBlockByrefInfo(const VarDecl *D) {
size = varOffset; size = varOffset;
// Conversely, we might have to prevent LLVM from inserting padding. // Conversely, we might have to prevent LLVM from inserting padding.
} else if (CGM.getDataLayout().getABITypeAlignment(varTy) } else if (CGM.getDataLayout().getABITypeAlignment(varTy) >
> varAlign.getQuantity()) { uint64_t(varAlign.getQuantity())) {
packed = true; packed = true;
} }
types.push_back(varTy); types.push_back(varTy);

View File

@ -5021,12 +5021,12 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
auto scalarAlign = CGM.getDataLayout().getPrefTypeAlignment(scalarType); auto scalarAlign = CGM.getDataLayout().getPrefTypeAlignment(scalarType);
// Materialize to a temporary. // Materialize to a temporary.
addr = CreateTempAlloca( addr =
RV.getScalarVal()->getType(), CreateTempAlloca(RV.getScalarVal()->getType(),
CharUnits::fromQuantity(std::max( CharUnits::fromQuantity(std::max(
(unsigned)layout->getAlignment().value(), scalarAlign)), layout->getAlignment().value(), scalarAlign)),
"tmp", "tmp",
/*ArraySize=*/nullptr, &AllocaAddr); /*ArraySize=*/nullptr, &AllocaAddr);
tempSize = EmitLifetimeStart(scalarSize, AllocaAddr.getPointer()); tempSize = EmitLifetimeStart(scalarSize, AllocaAddr.getPointer());
Builder.CreateStore(RV.getScalarVal(), addr); Builder.CreateStore(RV.getScalarVal(), addr);

View File

@ -1142,7 +1142,7 @@ Address CodeGenModule::createUnnamedGlobalFrom(const VarDecl &D,
GV->setAlignment(Align.getAsAlign()); GV->setAlignment(Align.getAsAlign());
GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global); GV->setUnnamedAddr(llvm::GlobalValue::UnnamedAddr::Global);
CacheEntry = GV; CacheEntry = GV;
} else if (CacheEntry->getAlignment() < Align.getQuantity()) { } else if (CacheEntry->getAlignment() < uint64_t(Align.getQuantity())) {
CacheEntry->setAlignment(Align.getAsAlign()); CacheEntry->setAlignment(Align.getAsAlign());
} }

View File

@ -5386,7 +5386,7 @@ CodeGenModule::GetAddrOfConstantStringFromLiteral(const StringLiteral *S,
if (!LangOpts.WritableStrings) { if (!LangOpts.WritableStrings) {
Entry = &ConstantStringMap[C]; Entry = &ConstantStringMap[C];
if (auto GV = *Entry) { if (auto GV = *Entry) {
if (Alignment.getQuantity() > GV->getAlignment()) if (uint64_t(Alignment.getQuantity()) > GV->getAlignment())
GV->setAlignment(Alignment.getAsAlign()); GV->setAlignment(Alignment.getAsAlign());
return ConstantAddress(castStringLiteralToDefaultAddressSpace(*this, GV), return ConstantAddress(castStringLiteralToDefaultAddressSpace(*this, GV),
Alignment); Alignment);
@ -5449,7 +5449,7 @@ ConstantAddress CodeGenModule::GetAddrOfConstantCString(
if (!LangOpts.WritableStrings) { if (!LangOpts.WritableStrings) {
Entry = &ConstantStringMap[C]; Entry = &ConstantStringMap[C];
if (auto GV = *Entry) { if (auto GV = *Entry) {
if (Alignment.getQuantity() > GV->getAlignment()) if (uint64_t(Alignment.getQuantity()) > GV->getAlignment())
GV->setAlignment(Alignment.getAsAlign()); GV->setAlignment(Alignment.getAsAlign());
return ConstantAddress(castStringLiteralToDefaultAddressSpace(*this, GV), return ConstantAddress(castStringLiteralToDefaultAddressSpace(*this, GV),
Alignment); Alignment);

View File

@ -117,7 +117,7 @@ int test6() {
// CHECK-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8 // CHECK-NEXT: store i32* [[A]], i32** [[A_ADDR]], align 8
// CHECK-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8 // CHECK-NEXT: [[TMP0:%.*]] = load i32*, i32** [[A_ADDR]], align 8
// CHECK-NEXT: [[TMP1:%.*]] = bitcast i32* [[TMP0]] to i8* // CHECK-NEXT: [[TMP1:%.*]] = bitcast i32* [[TMP0]] to i8*
// CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(i8* [[TMP1]], i64 1073741824) ] // CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(i8* [[TMP1]], i64 4294967296) ]
// CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32* // CHECK-NEXT: [[TMP2:%.*]] = bitcast i8* [[TMP1]] to i32*
// CHECK-NEXT: store i32* [[TMP2]], i32** [[A_ADDR]], align 8 // CHECK-NEXT: store i32* [[TMP2]], i32** [[A_ADDR]], align 8
// CHECK-NEXT: [[TMP3:%.*]] = load i32*, i32** [[A_ADDR]], align 8 // CHECK-NEXT: [[TMP3:%.*]] = load i32*, i32** [[A_ADDR]], align 8

View File

@ -7,7 +7,7 @@
// CHECK-SANITIZE-ANYRECOVER: @[[LINE_100_ALIGNMENT_ASSUMPTION:.*]] = {{.*}}, i32 100, i32 10 }, {{.*}}* @[[CHAR]] } // CHECK-SANITIZE-ANYRECOVER: @[[LINE_100_ALIGNMENT_ASSUMPTION:.*]] = {{.*}}, i32 100, i32 10 }, {{.*}}* @[[CHAR]] }
char **passthrough(__attribute__((align_value(0x80000000))) char **x) { char **passthrough(__attribute__((align_value(0x80000000))) char **x) {
// CHECK-NOSANITIZE: define{{.*}} i8** @{{.*}}(i8** align 1073741824 %[[X:.*]]) // CHECK-NOSANITIZE: define{{.*}} i8** @{{.*}}(i8** align 2147483648 %[[X:.*]])
// CHECK-SANITIZE: define{{.*}} i8** @{{.*}}(i8** %[[X:.*]]) // CHECK-SANITIZE: define{{.*}} i8** @{{.*}}(i8** %[[X:.*]])
// CHECK-NEXT: [[entry:.*]]: // CHECK-NEXT: [[entry:.*]]:
// CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8 // CHECK-NEXT: %[[X_ADDR:.*]] = alloca i8**, align 8

View File

@ -18,17 +18,17 @@ void *caller(char **x, unsigned long offset) {
// CHECK-NEXT: %[[OFFSET_RELOADED:.*]] = load i64, i64* %[[OFFSET_ADDR]], align 8 // CHECK-NEXT: %[[OFFSET_RELOADED:.*]] = load i64, i64* %[[OFFSET_ADDR]], align 8
// CHECK-SANITIZE-NEXT: %[[PTRINT:.*]] = ptrtoint i8* %[[BITCAST]] to i64 // CHECK-SANITIZE-NEXT: %[[PTRINT:.*]] = ptrtoint i8* %[[BITCAST]] to i64
// CHECK-SANITIZE-NEXT: %[[OFFSETPTR:.*]] = sub i64 %[[PTRINT]], %[[OFFSET_RELOADED]] // CHECK-SANITIZE-NEXT: %[[OFFSETPTR:.*]] = sub i64 %[[PTRINT]], %[[OFFSET_RELOADED]]
// CHECK-SANITIZE-NEXT: %[[MASKEDPTR:.*]] = and i64 %[[OFFSETPTR]], 1073741823 // CHECK-SANITIZE-NEXT: %[[MASKEDPTR:.*]] = and i64 %[[OFFSETPTR]], 2147483647
// CHECK-SANITIZE-NEXT: %[[MASKCOND:.*]] = icmp eq i64 %[[MASKEDPTR]], 0 // CHECK-SANITIZE-NEXT: %[[MASKCOND:.*]] = icmp eq i64 %[[MASKEDPTR]], 0
// CHECK-SANITIZE-NEXT: %[[PTRINT_DUP:.*]] = ptrtoint i8* %[[BITCAST]] to i64, !nosanitize // CHECK-SANITIZE-NEXT: %[[PTRINT_DUP:.*]] = ptrtoint i8* %[[BITCAST]] to i64, !nosanitize
// CHECK-SANITIZE-NEXT: br i1 %[[MASKCOND]], label %[[CONT:.*]], label %[[HANDLER_ALIGNMENT_ASSUMPTION:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-NEXT: br i1 %[[MASKCOND]], label %[[CONT:.*]], label %[[HANDLER_ALIGNMENT_ASSUMPTION:[^,]+]],{{.*}} !nosanitize
// CHECK-SANITIZE: [[HANDLER_ALIGNMENT_ASSUMPTION]]: // CHECK-SANITIZE: [[HANDLER_ALIGNMENT_ASSUMPTION]]:
// CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_alignment_assumption_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 1073741824, i64 %[[OFFSET_RELOADED]]){{.*}}, !nosanitize // CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_alignment_assumption_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 2147483648, i64 %[[OFFSET_RELOADED]]){{.*}}, !nosanitize
// CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_alignment_assumption(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 1073741824, i64 %[[OFFSET_RELOADED]]){{.*}}, !nosanitize // CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_alignment_assumption(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 2147483648, i64 %[[OFFSET_RELOADED]]){{.*}}, !nosanitize
// CHECK-SANITIZE-TRAP-NEXT: call void @llvm.ubsantrap(i8 23){{.*}}, !nosanitize // CHECK-SANITIZE-TRAP-NEXT: call void @llvm.ubsantrap(i8 23){{.*}}, !nosanitize
// CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize // CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize
// CHECK-SANITIZE: [[CONT]]: // CHECK-SANITIZE: [[CONT]]:
// CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(i8* %[[BITCAST]], i64 1073741824, i64 %[[OFFSET_RELOADED]]) ] // CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(i8* %[[BITCAST]], i64 2147483648, i64 %[[OFFSET_RELOADED]]) ]
// CHECK-NEXT: ret i8* %[[BITCAST]] // CHECK-NEXT: ret i8* %[[BITCAST]]
// CHECK-NEXT: } // CHECK-NEXT: }
#line 100 #line 100

View File

@ -15,17 +15,17 @@ void *caller(char **x) {
// CHECK-NEXT: %[[BITCAST:.*]] = bitcast i8** %[[X_RELOADED]] to i8* // CHECK-NEXT: %[[BITCAST:.*]] = bitcast i8** %[[X_RELOADED]] to i8*
// CHECK-SANITIZE-NEXT: %[[PTRINT:.*]] = ptrtoint i8* %[[BITCAST]] to i64 // CHECK-SANITIZE-NEXT: %[[PTRINT:.*]] = ptrtoint i8* %[[BITCAST]] to i64
// CHECK-SANITIZE-NEXT: %[[OFFSETPTR:.*]] = sub i64 %[[PTRINT]], 42 // CHECK-SANITIZE-NEXT: %[[OFFSETPTR:.*]] = sub i64 %[[PTRINT]], 42
// CHECK-SANITIZE-NEXT: %[[MASKEDPTR:.*]] = and i64 %[[OFFSETPTR]], 1073741823 // CHECK-SANITIZE-NEXT: %[[MASKEDPTR:.*]] = and i64 %[[OFFSETPTR]], 2147483647
// CHECK-SANITIZE-NEXT: %[[MASKCOND:.*]] = icmp eq i64 %[[MASKEDPTR]], 0 // CHECK-SANITIZE-NEXT: %[[MASKCOND:.*]] = icmp eq i64 %[[MASKEDPTR]], 0
// CHECK-SANITIZE-NEXT: %[[PTRINT_DUP:.*]] = ptrtoint i8* %[[BITCAST]] to i64, !nosanitize // CHECK-SANITIZE-NEXT: %[[PTRINT_DUP:.*]] = ptrtoint i8* %[[BITCAST]] to i64, !nosanitize
// CHECK-SANITIZE-NEXT: br i1 %[[MASKCOND]], label %[[CONT:.*]], label %[[HANDLER_ALIGNMENT_ASSUMPTION:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-NEXT: br i1 %[[MASKCOND]], label %[[CONT:.*]], label %[[HANDLER_ALIGNMENT_ASSUMPTION:[^,]+]],{{.*}} !nosanitize
// CHECK-SANITIZE: [[HANDLER_ALIGNMENT_ASSUMPTION]]: // CHECK-SANITIZE: [[HANDLER_ALIGNMENT_ASSUMPTION]]:
// CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_alignment_assumption_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 1073741824, i64 42){{.*}}, !nosanitize // CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_alignment_assumption_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 2147483648, i64 42){{.*}}, !nosanitize
// CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_alignment_assumption(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 1073741824, i64 42){{.*}}, !nosanitize // CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_alignment_assumption(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 2147483648, i64 42){{.*}}, !nosanitize
// CHECK-SANITIZE-TRAP-NEXT: call void @llvm.ubsantrap(i8 23){{.*}}, !nosanitize // CHECK-SANITIZE-TRAP-NEXT: call void @llvm.ubsantrap(i8 23){{.*}}, !nosanitize
// CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize // CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize
// CHECK-SANITIZE: [[CONT]]: // CHECK-SANITIZE: [[CONT]]:
// CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(i8* %[[BITCAST]], i64 1073741824, i64 42) ] // CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(i8* %[[BITCAST]], i64 2147483648, i64 42) ]
// CHECK-NEXT: ret i8* %[[BITCAST]] // CHECK-NEXT: ret i8* %[[BITCAST]]
// CHECK-NEXT: } // CHECK-NEXT: }
#line 100 #line 100

View File

@ -14,17 +14,17 @@ void *caller(char **x) {
// CHECK-NEXT: %[[X_RELOADED:.*]] = load i8**, i8*** %[[X_ADDR]], align 8 // CHECK-NEXT: %[[X_RELOADED:.*]] = load i8**, i8*** %[[X_ADDR]], align 8
// CHECK-NEXT: %[[BITCAST:.*]] = bitcast i8** %[[X_RELOADED]] to i8* // CHECK-NEXT: %[[BITCAST:.*]] = bitcast i8** %[[X_RELOADED]] to i8*
// CHECK-SANITIZE-NEXT: %[[PTRINT:.*]] = ptrtoint i8* %[[BITCAST]] to i64 // CHECK-SANITIZE-NEXT: %[[PTRINT:.*]] = ptrtoint i8* %[[BITCAST]] to i64
// CHECK-SANITIZE-NEXT: %[[MASKEDPTR:.*]] = and i64 %[[PTRINT]], 1073741823 // CHECK-SANITIZE-NEXT: %[[MASKEDPTR:.*]] = and i64 %[[PTRINT]], 2147483647
// CHECK-SANITIZE-NEXT: %[[MASKCOND:.*]] = icmp eq i64 %[[MASKEDPTR]], 0 // CHECK-SANITIZE-NEXT: %[[MASKCOND:.*]] = icmp eq i64 %[[MASKEDPTR]], 0
// CHECK-SANITIZE-NEXT: %[[PTRINT_DUP:.*]] = ptrtoint i8* %[[BITCAST]] to i64, !nosanitize // CHECK-SANITIZE-NEXT: %[[PTRINT_DUP:.*]] = ptrtoint i8* %[[BITCAST]] to i64, !nosanitize
// CHECK-SANITIZE-NEXT: br i1 %[[MASKCOND]], label %[[CONT:.*]], label %[[HANDLER_ALIGNMENT_ASSUMPTION:[^,]+]],{{.*}} !nosanitize // CHECK-SANITIZE-NEXT: br i1 %[[MASKCOND]], label %[[CONT:.*]], label %[[HANDLER_ALIGNMENT_ASSUMPTION:[^,]+]],{{.*}} !nosanitize
// CHECK-SANITIZE: [[HANDLER_ALIGNMENT_ASSUMPTION]]: // CHECK-SANITIZE: [[HANDLER_ALIGNMENT_ASSUMPTION]]:
// CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_alignment_assumption_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 1073741824, i64 0){{.*}}, !nosanitize // CHECK-SANITIZE-NORECOVER-NEXT: call void @__ubsan_handle_alignment_assumption_abort(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 2147483648, i64 0){{.*}}, !nosanitize
// CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_alignment_assumption(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 1073741824, i64 0){{.*}}, !nosanitize // CHECK-SANITIZE-RECOVER-NEXT: call void @__ubsan_handle_alignment_assumption(i8* bitcast ({ {{{.*}}}, {{{.*}}}, {{{.*}}}* }* @[[LINE_100_ALIGNMENT_ASSUMPTION]] to i8*), i64 %[[PTRINT_DUP]], i64 2147483648, i64 0){{.*}}, !nosanitize
// CHECK-SANITIZE-TRAP-NEXT: call void @llvm.ubsantrap(i8 23){{.*}}, !nosanitize // CHECK-SANITIZE-TRAP-NEXT: call void @llvm.ubsantrap(i8 23){{.*}}, !nosanitize
// CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize // CHECK-SANITIZE-UNREACHABLE-NEXT: unreachable, !nosanitize
// CHECK-SANITIZE: [[CONT]]: // CHECK-SANITIZE: [[CONT]]:
// CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(i8* %[[BITCAST]], i64 1073741824) ] // CHECK-NEXT: call void @llvm.assume(i1 true) [ "align"(i8* %[[BITCAST]], i64 2147483648) ]
// CHECK-NEXT: ret i8* %[[BITCAST]] // CHECK-NEXT: ret i8* %[[BITCAST]]
// CHECK-NEXT: } // CHECK-NEXT: }
#line 100 #line 100

View File

@ -19,10 +19,14 @@
namespace llvm { namespace llvm {
struct AllocaPackedValues { struct AllocaPackedValues {
using Align = Bitfield::Element<unsigned, 0, 5>; // We increased the number of bits needed to represent alignment to be more
using UsedWithInAlloca = Bitfield::Element<bool, Align::NextBit, 1>; // than 5, but to preserve backward compatibility we store the upper bits
// separately.
using AlignLower = Bitfield::Element<unsigned, 0, 5>;
using UsedWithInAlloca = Bitfield::Element<bool, AlignLower::NextBit, 1>;
using ExplicitType = Bitfield::Element<bool, UsedWithInAlloca::NextBit, 1>; using ExplicitType = Bitfield::Element<bool, UsedWithInAlloca::NextBit, 1>;
using SwiftError = Bitfield::Element<bool, ExplicitType::NextBit, 1>; using SwiftError = Bitfield::Element<bool, ExplicitType::NextBit, 1>;
using AlignUpper = Bitfield::Element<unsigned, SwiftError::NextBit, 3>;
}; };
} // namespace llvm } // namespace llvm

View File

@ -518,7 +518,7 @@ public:
/// Returns the minimum ABI-required alignment for the specified type. /// Returns the minimum ABI-required alignment for the specified type.
/// FIXME: Deprecate this function once migration to Align is over. /// FIXME: Deprecate this function once migration to Align is over.
unsigned getABITypeAlignment(Type *Ty) const; uint64_t getABITypeAlignment(Type *Ty) const;
/// Returns the minimum ABI-required alignment for the specified type. /// Returns the minimum ABI-required alignment for the specified type.
Align getABITypeAlign(Type *Ty) const; Align getABITypeAlign(Type *Ty) const;
@ -541,7 +541,7 @@ public:
/// ///
/// This is always at least as good as the ABI alignment. /// This is always at least as good as the ABI alignment.
/// FIXME: Deprecate this function once migration to Align is over. /// FIXME: Deprecate this function once migration to Align is over.
unsigned getPrefTypeAlignment(Type *Ty) const; uint64_t getPrefTypeAlignment(Type *Ty) const;
/// Returns the preferred stack/global alignment for the specified /// Returns the preferred stack/global alignment for the specified
/// type. /// type.

View File

@ -51,7 +51,7 @@ protected:
Comdat *ObjComdat; Comdat *ObjComdat;
enum { enum {
LastAlignmentBit = 4, LastAlignmentBit = 5,
HasSectionHashEntryBit, HasSectionHashEntryBit,
GlobalObjectBits, GlobalObjectBits,
@ -68,7 +68,7 @@ public:
GlobalObject(const GlobalObject &) = delete; GlobalObject(const GlobalObject &) = delete;
/// FIXME: Remove this function once transition to Align is over. /// FIXME: Remove this function once transition to Align is over.
unsigned getAlignment() const { uint64_t getAlignment() const {
MaybeAlign Align = getAlign(); MaybeAlign Align = getAlign();
return Align ? Align->value() : 0; return Align ? Align->value() : 0;
} }

View File

@ -59,11 +59,11 @@ protected:
// Template alias so that all Instruction storing alignment use the same // Template alias so that all Instruction storing alignment use the same
// definiton. // definiton.
// Valid alignments are powers of two from 2^0 to 2^MaxAlignmentExponent = // Valid alignments are powers of two from 2^0 to 2^MaxAlignmentExponent =
// 2^30. We store them as Log2(Alignment), so we need 5 bits to encode the 31 // 2^32. We store them as Log2(Alignment), so we need 6 bits to encode the 33
// possible values. // possible values.
template <unsigned Offset> template <unsigned Offset>
using AlignmentBitfieldElementT = using AlignmentBitfieldElementT =
typename Bitfield::Element<unsigned, Offset, 5, typename Bitfield::Element<unsigned, Offset, 6,
Value::MaxAlignmentExponent>; Value::MaxAlignmentExponent>;
template <unsigned Offset> template <unsigned Offset>

View File

@ -126,7 +126,7 @@ public:
} }
// FIXME: Remove this one transition to Align is over. // FIXME: Remove this one transition to Align is over.
unsigned getAlignment() const { return getAlign().value(); } uint64_t getAlignment() const { return getAlign().value(); }
/// Return true if this alloca is in the entry block of the function and is a /// Return true if this alloca is in the entry block of the function and is a
/// constant size. If so, the code generator will fold it into the /// constant size. If so, the code generator will fold it into the
@ -217,7 +217,7 @@ public:
/// Return the alignment of the access that is being performed. /// Return the alignment of the access that is being performed.
/// FIXME: Remove this function once transition to Align is over. /// FIXME: Remove this function once transition to Align is over.
/// Use getAlign() instead. /// Use getAlign() instead.
unsigned getAlignment() const { return getAlign().value(); } uint64_t getAlignment() const { return getAlign().value(); }
/// Return the alignment of the access that is being performed. /// Return the alignment of the access that is being performed.
Align getAlign() const { Align getAlign() const {
@ -348,7 +348,7 @@ public:
/// Return the alignment of the access that is being performed /// Return the alignment of the access that is being performed
/// FIXME: Remove this function once transition to Align is over. /// FIXME: Remove this function once transition to Align is over.
/// Use getAlign() instead. /// Use getAlign() instead.
unsigned getAlignment() const { return getAlign().value(); } uint64_t getAlignment() const { return getAlign().value(); }
Align getAlign() const { Align getAlign() const {
return Align(1ULL << (getSubclassData<AlignmentField>())); return Align(1ULL << (getSubclassData<AlignmentField>()));

View File

@ -785,8 +785,8 @@ public:
/// ///
/// This is the greatest alignment value supported by load, store, and alloca /// This is the greatest alignment value supported by load, store, and alloca
/// instructions, and global values. /// instructions, and global values.
static constexpr unsigned MaxAlignmentExponent = 30; static constexpr unsigned MaxAlignmentExponent = 32;
static constexpr unsigned MaximumAlignment = 1u << MaxAlignmentExponent; static constexpr uint64_t MaximumAlignment = 1ULL << MaxAlignmentExponent;
/// Mutate the type of this Value to be of the specified type. /// Mutate the type of this Value to be of the specified type.
/// ///

View File

@ -3413,7 +3413,7 @@ struct AADereferenceable
}; };
using AAAlignmentStateType = using AAAlignmentStateType =
IncIntegerState<uint32_t, Value::MaximumAlignment, 1>; IncIntegerState<uint64_t, Value::MaximumAlignment, 1>;
/// An abstract interface for all align attributes. /// An abstract interface for all align attributes.
struct AAAlign : public IRAttribute< struct AAAlign : public IRAttribute<
Attribute::Alignment, Attribute::Alignment,
@ -3421,10 +3421,10 @@ struct AAAlign : public IRAttribute<
AAAlign(const IRPosition &IRP, Attributor &A) : IRAttribute(IRP) {} AAAlign(const IRPosition &IRP, Attributor &A) : IRAttribute(IRP) {}
/// Return assumed alignment. /// Return assumed alignment.
unsigned getAssumedAlign() const { return getAssumed(); } uint64_t getAssumedAlign() const { return getAssumed(); }
/// Return known alignment. /// Return known alignment.
unsigned getKnownAlign() const { return getKnown(); } uint64_t getKnownAlign() const { return getKnown(); }
/// See AbstractAttribute::getName() /// See AbstractAttribute::getName()
const std::string getName() const override { return "AAAlign"; } const std::string getName() const override { return "AAAlign"; }

View File

@ -33,7 +33,7 @@ struct ASanStackVariableDescription {
uint64_t Size; // Size of the variable in bytes. uint64_t Size; // Size of the variable in bytes.
size_t LifetimeSize; // Size in bytes to use for lifetime analysis check. size_t LifetimeSize; // Size in bytes to use for lifetime analysis check.
// Will be rounded up to Granularity. // Will be rounded up to Granularity.
size_t Alignment; // Alignment of the variable (power of 2). uint64_t Alignment; // Alignment of the variable (power of 2).
AllocaInst *AI; // The actual AllocaInst. AllocaInst *AI; // The actual AllocaInst.
size_t Offset; // Offset from the beginning of the frame; size_t Offset; // Offset from the beginning of the frame;
// set by ComputeASanStackFrameLayout. // set by ComputeASanStackFrameLayout.

View File

@ -1927,7 +1927,7 @@ bool LLParser::parseOptionalAlignment(MaybeAlign &Alignment, bool AllowParens) {
if (!EatIfPresent(lltok::kw_align)) if (!EatIfPresent(lltok::kw_align))
return false; return false;
LocTy AlignLoc = Lex.getLoc(); LocTy AlignLoc = Lex.getLoc();
uint32_t Value = 0; uint64_t Value = 0;
LocTy ParenLoc = Lex.getLoc(); LocTy ParenLoc = Lex.getLoc();
bool HaveParens = false; bool HaveParens = false;
@ -1936,13 +1936,13 @@ bool LLParser::parseOptionalAlignment(MaybeAlign &Alignment, bool AllowParens) {
HaveParens = true; HaveParens = true;
} }
if (parseUInt32(Value)) if (parseUInt64(Value))
return true; return true;
if (HaveParens && !EatIfPresent(lltok::rparen)) if (HaveParens && !EatIfPresent(lltok::rparen))
return error(ParenLoc, "expected ')'"); return error(ParenLoc, "expected ')'");
if (!isPowerOf2_32(Value)) if (!isPowerOf2_64(Value))
return error(AlignLoc, "alignment is not a power of two"); return error(AlignLoc, "alignment is not a power of two");
if (Value > Value::MaximumAlignment) if (Value > Value::MaximumAlignment)
return error(AlignLoc, "huge alignments are not supported yet"); return error(AlignLoc, "huge alignments are not supported yet");

View File

@ -4930,8 +4930,10 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
Type *OpTy = getTypeByID(Record[1]); Type *OpTy = getTypeByID(Record[1]);
Value *Size = getFnValueByID(Record[2], OpTy); Value *Size = getFnValueByID(Record[2], OpTy);
MaybeAlign Align; MaybeAlign Align;
if (Error Err = uint64_t AlignExp =
parseAlignmentValue(Bitfield::get<APV::Align>(Rec), Align)) { Bitfield::get<APV::AlignLower>(Rec) |
(Bitfield::get<APV::AlignUpper>(Rec) << APV::AlignLower::Bits);
if (Error Err = parseAlignmentValue(AlignExp, Align)) {
return Err; return Err;
} }
if (!Ty || !Size) if (!Ty || !Size)

View File

@ -3055,7 +3055,11 @@ void ModuleBitcodeWriter::writeInstruction(const Instruction &I,
Vals.push_back(VE.getValueID(I.getOperand(0))); // size. Vals.push_back(VE.getValueID(I.getOperand(0))); // size.
using APV = AllocaPackedValues; using APV = AllocaPackedValues;
unsigned Record = 0; unsigned Record = 0;
Bitfield::set<APV::Align>(Record, getEncodedAlign(AI.getAlign())); unsigned EncodedAlign = getEncodedAlign(AI.getAlign());
Bitfield::set<APV::AlignLower>(
Record, EncodedAlign & ((1 << APV::AlignLower::Bits) - 1));
Bitfield::set<APV::AlignUpper>(Record,
EncodedAlign >> APV::AlignLower::Bits);
Bitfield::set<APV::UsedWithInAlloca>(Record, AI.isUsedWithInAlloca()); Bitfield::set<APV::UsedWithInAlloca>(Record, AI.isUsedWithInAlloca());
Bitfield::set<APV::ExplicitType>(Record, true); Bitfield::set<APV::ExplicitType>(Record, true);
Bitfield::set<APV::SwiftError>(Record, AI.isSwiftError()); Bitfield::set<APV::SwiftError>(Record, AI.isSwiftError());

View File

@ -498,7 +498,7 @@ public:
MachineOperand &Dest, MachineOperand &Dest,
Optional<unsigned> &TiedDefIdx); Optional<unsigned> &TiedDefIdx);
bool parseOffset(int64_t &Offset); bool parseOffset(int64_t &Offset);
bool parseAlignment(unsigned &Alignment); bool parseAlignment(uint64_t &Alignment);
bool parseAddrspace(unsigned &Addrspace); bool parseAddrspace(unsigned &Addrspace);
bool parseSectionID(Optional<MBBSectionID> &SID); bool parseSectionID(Optional<MBBSectionID> &SID);
bool parseOperandsOffset(MachineOperand &Op); bool parseOperandsOffset(MachineOperand &Op);
@ -676,7 +676,7 @@ bool MIParser::parseBasicBlockDefinition(
bool IsLandingPad = false; bool IsLandingPad = false;
bool IsEHFuncletEntry = false; bool IsEHFuncletEntry = false;
Optional<MBBSectionID> SectionID; Optional<MBBSectionID> SectionID;
unsigned Alignment = 0; uint64_t Alignment = 0;
BasicBlock *BB = nullptr; BasicBlock *BB = nullptr;
if (consumeIfPresent(MIToken::lparen)) { if (consumeIfPresent(MIToken::lparen)) {
do { do {
@ -2898,16 +2898,16 @@ bool MIParser::parseOffset(int64_t &Offset) {
return false; return false;
} }
bool MIParser::parseAlignment(unsigned &Alignment) { bool MIParser::parseAlignment(uint64_t &Alignment) {
assert(Token.is(MIToken::kw_align) || Token.is(MIToken::kw_basealign)); assert(Token.is(MIToken::kw_align) || Token.is(MIToken::kw_basealign));
lex(); lex();
if (Token.isNot(MIToken::IntegerLiteral) || Token.integerValue().isSigned()) if (Token.isNot(MIToken::IntegerLiteral) || Token.integerValue().isSigned())
return error("expected an integer literal after 'align'"); return error("expected an integer literal after 'align'");
if (getUnsigned(Alignment)) if (getUint64(Alignment))
return true; return true;
lex(); lex();
if (!isPowerOf2_32(Alignment)) if (!isPowerOf2_64(Alignment))
return error("expected a power-of-2 literal after 'align'"); return error("expected a power-of-2 literal after 'align'");
return false; return false;
@ -3261,7 +3261,7 @@ bool MIParser::parseMachineMemoryOperand(MachineMemOperand *&Dest) {
if (parseMachinePointerInfo(Ptr)) if (parseMachinePointerInfo(Ptr))
return true; return true;
} }
unsigned BaseAlignment = uint64_t BaseAlignment =
(Size != MemoryLocation::UnknownSize ? PowerOf2Ceil(Size) : 1); (Size != MemoryLocation::UnknownSize ? PowerOf2Ceil(Size) : 1);
AAMDNodes AAInfo; AAMDNodes AAInfo;
MDNode *Range = nullptr; MDNode *Range = nullptr;

View File

@ -147,7 +147,7 @@ class SafeStack {
/// ///
/// 16 seems like a reasonable upper bound on the alignment of objects that we /// 16 seems like a reasonable upper bound on the alignment of objects that we
/// might expect to appear on the stack on most common targets. /// might expect to appear on the stack on most common targets.
enum { StackAlignment = 16 }; static constexpr uint64_t StackAlignment = 16;
/// Return the value of the stack canary. /// Return the value of the stack canary.
Value *getStackGuard(IRBuilder<> &IRB, Function &F); Value *getStackGuard(IRBuilder<> &IRB, Function &F);
@ -544,8 +544,7 @@ Value *SafeStack::moveStaticAllocasToUnsafeStack(
Size = 1; // Don't create zero-sized stack objects. Size = 1; // Don't create zero-sized stack objects.
// Ensure the object is properly aligned. // Ensure the object is properly aligned.
unsigned Align = uint64_t Align = std::max(DL.getPrefTypeAlignment(Ty), AI->getAlignment());
std::max((unsigned)DL.getPrefTypeAlignment(Ty), AI->getAlignment());
SSL.addObject(AI, Size, Align, SSL.addObject(AI, Size, Align,
ClColoring ? SSC.getLiveRange(AI) : NoColoringRange); ClColoring ? SSC.getLiveRange(AI) : NoColoringRange);
@ -676,9 +675,9 @@ void SafeStack::moveDynamicAllocasToUnsafeStack(
SP = IRB.CreateSub(SP, Size); SP = IRB.CreateSub(SP, Size);
// Align the SP value to satisfy the AllocaInst, type and stack alignments. // Align the SP value to satisfy the AllocaInst, type and stack alignments.
unsigned Align = std::max( uint64_t Align =
std::max((unsigned)DL.getPrefTypeAlignment(Ty), AI->getAlignment()), std::max(std::max(DL.getPrefTypeAlignment(Ty), AI->getAlignment()),
(unsigned)StackAlignment); StackAlignment);
assert(isPowerOf2_32(Align)); assert(isPowerOf2_32(Align));
Value *NewTop = IRB.CreateIntToPtr( Value *NewTop = IRB.CreateIntToPtr(

View File

@ -819,7 +819,7 @@ Align DataLayout::getAlignment(Type *Ty, bool abi_or_pref) const {
} }
/// TODO: Remove this function once the transition to Align is over. /// TODO: Remove this function once the transition to Align is over.
unsigned DataLayout::getABITypeAlignment(Type *Ty) const { uint64_t DataLayout::getABITypeAlignment(Type *Ty) const {
return getABITypeAlign(Ty).value(); return getABITypeAlign(Ty).value();
} }
@ -828,7 +828,7 @@ Align DataLayout::getABITypeAlign(Type *Ty) const {
} }
/// TODO: Remove this function once the transition to Align is over. /// TODO: Remove this function once the transition to Align is over.
unsigned DataLayout::getPrefTypeAlignment(Type *Ty) const { uint64_t DataLayout::getPrefTypeAlignment(Type *Ty) const {
return getPrefTypeAlign(Ty).value(); return getPrefTypeAlign(Ty).value();
} }

View File

@ -176,7 +176,7 @@ const char kAMDGPUAddressPrivateName[] = "llvm.amdgcn.is.private";
// Accesses sizes are powers of two: 1, 2, 4, 8, 16. // Accesses sizes are powers of two: 1, 2, 4, 8, 16.
static const size_t kNumberOfAccessSizes = 5; static const size_t kNumberOfAccessSizes = 5;
static const unsigned kAllocaRzSize = 32; static const uint64_t kAllocaRzSize = 32;
// ASanAccessInfo implementation constants. // ASanAccessInfo implementation constants.
constexpr size_t kCompileKernelShift = 0; constexpr size_t kCompileKernelShift = 0;
@ -3578,7 +3578,7 @@ void FunctionStackPoisoner::poisonAlloca(Value *V, uint64_t Size,
void FunctionStackPoisoner::handleDynamicAllocaCall(AllocaInst *AI) { void FunctionStackPoisoner::handleDynamicAllocaCall(AllocaInst *AI) {
IRBuilder<> IRB(AI); IRBuilder<> IRB(AI);
const unsigned Alignment = std::max(kAllocaRzSize, AI->getAlignment()); const uint64_t Alignment = std::max(kAllocaRzSize, AI->getAlignment());
const uint64_t AllocaRedzoneMask = kAllocaRzSize - 1; const uint64_t AllocaRedzoneMask = kAllocaRzSize - 1;
Value *Zero = Constant::getNullValue(IntptrTy); Value *Zero = Constant::getNullValue(IntptrTy);

View File

@ -356,7 +356,7 @@ private:
bool WithFrameRecord; bool WithFrameRecord;
void init(Triple &TargetTriple, bool InstrumentWithCalls); void init(Triple &TargetTriple, bool InstrumentWithCalls);
unsigned getObjectAlignment() const { return 1U << Scale; } uint64_t getObjectAlignment() const { return 1ULL << Scale; }
}; };
ShadowMapping Mapping; ShadowMapping Mapping;

View File

@ -1,6 +1,6 @@
; RUN: not llvm-as %s -o /dev/null 2>/dev/null ; RUN: not llvm-as %s -o /dev/null 2>/dev/null
define void @foo() { define void @foo() {
%p = alloca i1, align 2147483648 %p = alloca i1, align 8589934592
ret void ret void
} }

View File

@ -1,6 +1,6 @@
; RUN: not llvm-as %s -o /dev/null 2>/dev/null ; RUN: not llvm-as %s -o /dev/null 2>/dev/null
define void @foo(i1* %p) { define void @foo(i1* %p) {
load i1, i1* %p, align 2147483648 load i1, i1* %p, align 8589934592
ret void ret void
} }

View File

@ -1,6 +1,6 @@
; RUN: not llvm-as %s -o /dev/null 2>/dev/null ; RUN: not llvm-as %s -o /dev/null 2>/dev/null
define void @foo(i1* %p) { define void @foo(i1* %p) {
store i1 false, i1* %p, align 2147483648 store i1 false, i1* %p, align 8589934592
ret void ret void
} }

View File

@ -1,11 +1,11 @@
; RUN: llvm-as %s -o /dev/null ; RUN: llvm-as %s -o /dev/null
; RUN: verify-uselistorder %s ; RUN: verify-uselistorder %s
@A = global i1 0, align 1073741824 @A = global i1 0, align 4294967296
define void @foo() { define void @foo() {
%p = alloca i1, align 1073741824 %p = alloca i1, align 4294967296
load i1, i1* %p, align 1073741824 load i1, i1* %p, align 4294967296
store i1 false, i1* %p, align 1073741824 store i1 false, i1* %p, align 4294967296
ret void ret void
} }

View File

@ -10,10 +10,10 @@ define void @foo(i32* inalloca(i32) %args) {
define void @bar() { define void @bar() {
; Use the maximum alignment, since we stuff our bit with alignment. ; Use the maximum alignment, since we stuff our bit with alignment.
%args = alloca inalloca i32, align 1073741824 %args = alloca inalloca i32, align 4294967296
call void @foo(i32* inalloca(i32) %args) call void @foo(i32* inalloca(i32) %args)
ret void ret void
} }
; CHECK-LABEL: define void @bar() { ; CHECK-LABEL: define void @bar() {
; CHECK: %args = alloca inalloca i32, align 1073741824 ; CHECK: %args = alloca inalloca i32, align 4294967296
; CHECK: call void @foo(i32* inalloca(i32) %args) ; CHECK: call void @foo(i32* inalloca(i32) %args)

View File

@ -1,10 +1,10 @@
# RUN: llc -march=x86-64 -run-pass=none -o - %s | FileCheck %s # RUN: llc -march=x86-64 -run-pass=none -o - %s | FileCheck %s
# CHECK: name: truly_aligned_load # CHECK: name: truly_aligned_load
# CHECK: MOV32rm {{.*}} :: (load (s32), align 1073741824) # CHECK: MOV32rm {{.*}} :: (load (s32), align 4294967296)
# CHECK: name: basealigned_load # CHECK: name: basealigned_load
# CHECK: MOV32rm {{.*}} :: (load (s32) from unknown-address + 4, basealign 1073741824) # CHECK: MOV32rm {{.*}} :: (load (s32) from unknown-address + 4, basealign 4294967296)
--- ---
name: truly_aligned_load name: truly_aligned_load
@ -20,7 +20,7 @@ body: |
bb.0: bb.0:
liveins: $rdi liveins: $rdi
renamable $eax = MOV32rm killed renamable $rdi, 1, $noreg, 0, $noreg :: (load (s32) from unknown-address, align 1073741824) renamable $eax = MOV32rm killed renamable $rdi, 1, $noreg, 0, $noreg :: (load (s32) from unknown-address, align 4294967296)
RETQ $eax RETQ $eax
... ...
@ -38,7 +38,7 @@ body: |
bb.0: bb.0:
liveins: $rdi liveins: $rdi
renamable $eax = MOV32rm killed renamable $rdi, 1, $noreg, 0, $noreg :: (load (s32) from unknown-address + 4, basealign 1073741824) renamable $eax = MOV32rm killed renamable $rdi, 1, $noreg, 0, $noreg :: (load (s32) from unknown-address + 4, basealign 4294967296)
RETQ $eax RETQ $eax
... ...

View File

@ -7,7 +7,7 @@
define internal void @dead() { define internal void @dead() {
; IS__CGSCC____-LABEL: define {{[^@]+}}@dead() { ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead() {
; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 1073741824 null) ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 4294967296 null)
; IS__CGSCC____-NEXT: ret void ; IS__CGSCC____-NEXT: ret void
; ;
call i32 @test(i32* null, i32* null) call i32 @test(i32* null, i32* null)

View File

@ -7,7 +7,7 @@
define internal void @dead() { define internal void @dead() {
; IS__CGSCC____-LABEL: define {{[^@]+}}@dead() { ; IS__CGSCC____-LABEL: define {{[^@]+}}@dead() {
; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 1073741824 null) ; IS__CGSCC____-NEXT: [[TMP1:%.*]] = call i32 @test(i32* noalias noundef align 4294967296 null)
; IS__CGSCC____-NEXT: ret void ; IS__CGSCC____-NEXT: ret void
; ;
call i32 @test(i32* null, i32* null) call i32 @test(i32* null, i32* null)

View File

@ -153,7 +153,7 @@ define void @fn_no_null_opt(i32* %P, i1 %C) null_pointer_is_valid {
; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]] ; IS__CGSCC_OPM-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]]
; IS__CGSCC_OPM: if.end: ; IS__CGSCC_OPM: if.end:
; IS__CGSCC_OPM-NEXT: [[E_2:%.*]] = phi i32* [ undef, [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ] ; IS__CGSCC_OPM-NEXT: [[E_2:%.*]] = phi i32* [ undef, [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ]
; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* null, align 1073741824 ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = load i32, i32* null, align 4294967296
; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @fn0(i32 [[TMP0]]) ; IS__CGSCC_OPM-NEXT: [[CALL:%.*]] = call i32 @fn0(i32 [[TMP0]])
; IS__CGSCC_OPM-NEXT: store i32 [[CALL]], i32* [[P]], align 4 ; IS__CGSCC_OPM-NEXT: store i32 [[CALL]], i32* [[P]], align 4
; IS__CGSCC_OPM-NEXT: br label [[FOR_COND1]] ; IS__CGSCC_OPM-NEXT: br label [[FOR_COND1]]
@ -169,7 +169,7 @@ define void @fn_no_null_opt(i32* %P, i1 %C) null_pointer_is_valid {
; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]] ; IS__CGSCC_NPM-NEXT: br i1 [[C]], label [[IF_END]], label [[EXIT:%.*]]
; IS__CGSCC_NPM: if.end: ; IS__CGSCC_NPM: if.end:
; IS__CGSCC_NPM-NEXT: [[E_2:%.*]] = phi i32* [ undef, [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ] ; IS__CGSCC_NPM-NEXT: [[E_2:%.*]] = phi i32* [ undef, [[ENTRY:%.*]] ], [ null, [[FOR_COND1:%.*]] ]
; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* null, align 1073741824 ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = load i32, i32* null, align 4294967296
; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[P]], align 4 ; IS__CGSCC_NPM-NEXT: store i32 [[TMP0]], i32* [[P]], align 4
; IS__CGSCC_NPM-NEXT: br label [[FOR_COND1]] ; IS__CGSCC_NPM-NEXT: br label [[FOR_COND1]]
; IS__CGSCC_NPM: exit: ; IS__CGSCC_NPM: exit:

View File

@ -39,10 +39,10 @@ define dso_local i32 @main() {
; IS__TUNIT____-NEXT: [[ALLOC1:%.*]] = alloca i8, align 8 ; IS__TUNIT____-NEXT: [[ALLOC1:%.*]] = alloca i8, align 8
; IS__TUNIT____-NEXT: [[ALLOC2:%.*]] = alloca i8, align 8 ; IS__TUNIT____-NEXT: [[ALLOC2:%.*]] = alloca i8, align 8
; IS__TUNIT____-NEXT: [[THREAD:%.*]] = alloca i64, align 8 ; IS__TUNIT____-NEXT: [[THREAD:%.*]] = alloca i64, align 8
; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 1073741824 null, i8* (i8*)* noundef nonnull @foo, i8* noalias nocapture nofree readnone align 1073741824 undef) ; IS__TUNIT____-NEXT: [[CALL:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @foo, i8* noalias nocapture nofree readnone align 4294967296 undef)
; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 1073741824 null, i8* (i8*)* noundef nonnull @bar, i8* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) undef) ; IS__TUNIT____-NEXT: [[CALL1:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @bar, i8* noalias nocapture nofree nonnull readnone align 8 dereferenceable(8) undef)
; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 1073741824 null, i8* (i8*)* noundef nonnull @baz, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC1]]) ; IS__TUNIT____-NEXT: [[CALL2:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @baz, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC1]])
; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 1073741824 null, i8* (i8*)* noundef nonnull @buz, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[ALLOC2]]) ; IS__TUNIT____-NEXT: [[CALL3:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @buz, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[ALLOC2]])
; IS__TUNIT____-NEXT: ret i32 0 ; IS__TUNIT____-NEXT: ret i32 0
; ;
; IS__CGSCC____-LABEL: define {{[^@]+}}@main() { ; IS__CGSCC____-LABEL: define {{[^@]+}}@main() {
@ -50,10 +50,10 @@ define dso_local i32 @main() {
; IS__CGSCC____-NEXT: [[ALLOC1:%.*]] = alloca i8, align 8 ; IS__CGSCC____-NEXT: [[ALLOC1:%.*]] = alloca i8, align 8
; IS__CGSCC____-NEXT: [[ALLOC2:%.*]] = alloca i8, align 8 ; IS__CGSCC____-NEXT: [[ALLOC2:%.*]] = alloca i8, align 8
; IS__CGSCC____-NEXT: [[THREAD:%.*]] = alloca i64, align 8 ; IS__CGSCC____-NEXT: [[THREAD:%.*]] = alloca i64, align 8
; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 1073741824 null, i8* (i8*)* noundef nonnull @foo, i8* noalias nocapture nofree noundef readnone align 1073741824 null) ; IS__CGSCC____-NEXT: [[CALL:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @foo, i8* noalias nocapture nofree noundef readnone align 4294967296 null)
; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 1073741824 null, i8* (i8*)* noundef nonnull @bar, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(8) bitcast (i8** @GlobalVPtr to i8*)) ; IS__CGSCC____-NEXT: [[CALL1:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @bar, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(8) bitcast (i8** @GlobalVPtr to i8*))
; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 1073741824 null, i8* (i8*)* noundef nonnull @baz, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC1]]) ; IS__CGSCC____-NEXT: [[CALL2:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @baz, i8* noalias nocapture nofree noundef nonnull readnone align 8 dereferenceable(1) [[ALLOC1]])
; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 1073741824 null, i8* (i8*)* noundef nonnull @buz, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[ALLOC2]]) ; IS__CGSCC____-NEXT: [[CALL3:%.*]] = call i32 @pthread_create(i64* noundef nonnull align 8 dereferenceable(8) [[THREAD]], %union.pthread_attr_t* noalias nocapture noundef align 4294967296 null, i8* (i8*)* noundef nonnull @buz, i8* noalias nofree noundef nonnull readnone align 8 dereferenceable(1) "no-capture-maybe-returned" [[ALLOC2]])
; IS__CGSCC____-NEXT: ret i32 0 ; IS__CGSCC____-NEXT: ret i32 0
; ;
entry: entry:
@ -72,13 +72,13 @@ declare !callback !0 dso_local i32 @pthread_create(i64*, %union.pthread_attr_t*,
define internal i8* @foo(i8* %arg) { define internal i8* @foo(i8* %arg) {
; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
; IS__TUNIT____-LABEL: define {{[^@]+}}@foo ; IS__TUNIT____-LABEL: define {{[^@]+}}@foo
; IS__TUNIT____-SAME: (i8* noalias nocapture nofree readnone align 1073741824 [[ARG:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__TUNIT____-SAME: (i8* noalias nocapture nofree readnone align 4294967296 [[ARG:%.*]]) #[[ATTR0:[0-9]+]] {
; IS__TUNIT____-NEXT: entry: ; IS__TUNIT____-NEXT: entry:
; IS__TUNIT____-NEXT: ret i8* null ; IS__TUNIT____-NEXT: ret i8* null
; ;
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@foo ; IS__CGSCC____-LABEL: define {{[^@]+}}@foo
; IS__CGSCC____-SAME: (i8* noalias nocapture nofree readnone align 1073741824 [[ARG:%.*]]) #[[ATTR0:[0-9]+]] { ; IS__CGSCC____-SAME: (i8* noalias nocapture nofree readnone align 4294967296 [[ARG:%.*]]) #[[ATTR0:[0-9]+]] {
; IS__CGSCC____-NEXT: entry: ; IS__CGSCC____-NEXT: entry:
; IS__CGSCC____-NEXT: ret i8* null ; IS__CGSCC____-NEXT: ret i8* null
; ;

View File

@ -25,7 +25,7 @@ define void @t0_caller(i32* %a) {
; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__TUNIT_OPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__TUNIT_OPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__TUNIT_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__TUNIT_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__TUNIT_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 undef, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__TUNIT_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 undef, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__TUNIT_OPM-NEXT: ret void ; IS__TUNIT_OPM-NEXT: ret void
; ;
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t0_caller ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t0_caller
@ -37,7 +37,7 @@ define void @t0_caller(i32* %a) {
; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__TUNIT_NPM-NEXT: ret void ; IS__TUNIT_NPM-NEXT: ret void
; ;
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t0_caller ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t0_caller
@ -49,7 +49,7 @@ define void @t0_caller(i32* %a) {
; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__CGSCC_OPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__CGSCC_OPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__CGSCC_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__CGSCC_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__CGSCC_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__CGSCC_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__CGSCC_OPM-NEXT: ret void ; IS__CGSCC_OPM-NEXT: ret void
; ;
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t0_caller ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t0_caller
@ -61,7 +61,7 @@ define void @t0_caller(i32* %a) {
; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t0_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t0_callback_callee to void (i32*, i32*, ...)*), i32* align 256 [[A]], i64 noundef 99, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__CGSCC_NPM-NEXT: ret void ; IS__CGSCC_NPM-NEXT: ret void
; ;
entry: entry:
@ -125,7 +125,7 @@ define void @t1_caller(i32* noalias %a) {
; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__TUNIT_OPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__TUNIT_OPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__TUNIT_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__TUNIT_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__TUNIT_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__TUNIT_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__TUNIT_OPM-NEXT: ret void ; IS__TUNIT_OPM-NEXT: ret void
; ;
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t1_caller ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t1_caller
@ -137,7 +137,7 @@ define void @t1_caller(i32* noalias %a) {
; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__TUNIT_NPM-NEXT: ret void ; IS__TUNIT_NPM-NEXT: ret void
; ;
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t1_caller ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t1_caller
@ -149,7 +149,7 @@ define void @t1_caller(i32* noalias %a) {
; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__CGSCC_OPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__CGSCC_OPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__CGSCC_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__CGSCC_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__CGSCC_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__CGSCC_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__CGSCC_OPM-NEXT: ret void ; IS__CGSCC_OPM-NEXT: ret void
; ;
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t1_caller ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t1_caller
@ -161,7 +161,7 @@ define void @t1_caller(i32* noalias %a) {
; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t1_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t1_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__CGSCC_NPM-NEXT: ret void ; IS__CGSCC_NPM-NEXT: ret void
; ;
entry: entry:
@ -225,7 +225,7 @@ define void @t2_caller(i32* noalias %a) {
; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__TUNIT_OPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__TUNIT_OPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__TUNIT_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__TUNIT_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__TUNIT_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__TUNIT_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__TUNIT_OPM-NEXT: ret void ; IS__TUNIT_OPM-NEXT: ret void
; ;
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t2_caller ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t2_caller
@ -237,7 +237,7 @@ define void @t2_caller(i32* noalias %a) {
; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__TUNIT_NPM-NEXT: ret void ; IS__TUNIT_NPM-NEXT: ret void
; ;
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t2_caller ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t2_caller
@ -249,7 +249,7 @@ define void @t2_caller(i32* noalias %a) {
; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__CGSCC_OPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__CGSCC_OPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__CGSCC_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__CGSCC_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__CGSCC_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__CGSCC_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__CGSCC_OPM-NEXT: ret void ; IS__CGSCC_OPM-NEXT: ret void
; ;
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t2_caller ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t2_caller
@ -261,7 +261,7 @@ define void @t2_caller(i32* noalias %a) {
; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t2_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t2_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__CGSCC_NPM-NEXT: ret void ; IS__CGSCC_NPM-NEXT: ret void
; ;
entry: entry:
@ -325,8 +325,8 @@ define void @t3_caller(i32* noalias %a) {
; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__TUNIT_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__TUNIT_OPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__TUNIT_OPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__TUNIT_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__TUNIT_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__TUNIT_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__TUNIT_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__TUNIT_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__TUNIT_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__TUNIT_OPM-NEXT: ret void ; IS__TUNIT_OPM-NEXT: ret void
; ;
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t3_caller ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@t3_caller
@ -338,8 +338,8 @@ define void @t3_caller(i32* noalias %a) {
; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__TUNIT_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__TUNIT_NPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__TUNIT_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__TUNIT_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 undef, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__TUNIT_NPM-NEXT: ret void ; IS__TUNIT_NPM-NEXT: ret void
; ;
; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t3_caller ; IS__CGSCC_OPM-LABEL: define {{[^@]+}}@t3_caller
@ -351,8 +351,8 @@ define void @t3_caller(i32* noalias %a) {
; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__CGSCC_OPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__CGSCC_OPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__CGSCC_OPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__CGSCC_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__CGSCC_OPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__CGSCC_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__CGSCC_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__CGSCC_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__CGSCC_OPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__CGSCC_OPM-NEXT: ret void ; IS__CGSCC_OPM-NEXT: ret void
; ;
; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t3_caller ; IS__CGSCC_NPM-LABEL: define {{[^@]+}}@t3_caller
@ -364,8 +364,8 @@ define void @t3_caller(i32* noalias %a) {
; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8* ; IS__CGSCC_NPM-NEXT: [[TMP0:%.*]] = bitcast i32* [[B]] to i8*
; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32 ; IS__CGSCC_NPM-NEXT: store i32 42, i32* [[B]], align 32
; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64 ; IS__CGSCC_NPM-NEXT: store i32* [[B]], i32** [[C]], align 64
; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 1073741824 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]]) ; IS__CGSCC_NPM-NEXT: call void (i32*, i32*, void (i32*, i32*, ...)*, ...) @t3_callback_broker(i32* noalias nocapture noundef align 4294967296 null, i32* noalias nocapture noundef nonnull align 128 dereferenceable(4) [[PTR]], void (i32*, i32*, ...)* nocapture noundef bitcast (void (i32*, i32*, i32*, i64, i32**)* @t3_callback_callee to void (i32*, i32*, ...)*), i32* nocapture align 256 [[A]], i64 noundef 99, i32** noalias nocapture nofree noundef nonnull readonly align 64 dereferenceable(8) [[C]])
; IS__CGSCC_NPM-NEXT: ret void ; IS__CGSCC_NPM-NEXT: ret void
; ;
entry: entry:

View File

@ -527,13 +527,13 @@ define void @ub(i32* %0) {
; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT_NPM: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ub ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@ub
; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] { ; IS__TUNIT_NPM-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR8:[0-9]+]] {
; IS__TUNIT_NPM-NEXT: store i32 0, i32* undef, align 1073741824 ; IS__TUNIT_NPM-NEXT: store i32 0, i32* undef, align 4294967296
; IS__TUNIT_NPM-NEXT: ret void ; IS__TUNIT_NPM-NEXT: ret void
; ;
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
; IS__CGSCC____-LABEL: define {{[^@]+}}@ub ; IS__CGSCC____-LABEL: define {{[^@]+}}@ub
; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] { ; IS__CGSCC____-SAME: (i32* nocapture nofree readnone [[TMP0:%.*]]) #[[ATTR10:[0-9]+]] {
; IS__CGSCC____-NEXT: store i32 0, i32* undef, align 1073741824 ; IS__CGSCC____-NEXT: store i32 0, i32* undef, align 4294967296
; IS__CGSCC____-NEXT: ret void ; IS__CGSCC____-NEXT: ret void
; ;
%poison = sub nuw i32 0, 1 ; Results in a poison value. %poison = sub nuw i32 0, 1 ; Results in a poison value.

View File

@ -397,7 +397,7 @@ define void @callerC2() {
} }
define void @callerD1() { define void @callerD1() {
; CHECK-LABEL: define {{[^@]+}}@callerD1() { ; CHECK-LABEL: define {{[^@]+}}@callerD1() {
; CHECK-NEXT: [[UNKNOWN:%.*]] = call i8* @argmem_only(i8* noalias nocapture noundef align 1073741824 null) ; CHECK-NEXT: [[UNKNOWN:%.*]] = call i8* @argmem_only(i8* noalias nocapture noundef align 4294967296 null)
; CHECK-NEXT: store i8 0, i8* [[UNKNOWN]], align 1 ; CHECK-NEXT: store i8 0, i8* [[UNKNOWN]], align 1
; CHECK-NEXT: ret void ; CHECK-NEXT: ret void
; ;
@ -407,7 +407,7 @@ define void @callerD1() {
} }
define void @callerD2() { define void @callerD2() {
; CHECK-LABEL: define {{[^@]+}}@callerD2() { ; CHECK-LABEL: define {{[^@]+}}@callerD2() {
; CHECK-NEXT: [[UNKNOWN:%.*]] = call i8* @inaccesible_argmem_only_decl(i8* noalias nocapture noundef align 1073741824 null) ; CHECK-NEXT: [[UNKNOWN:%.*]] = call i8* @inaccesible_argmem_only_decl(i8* noalias nocapture noundef align 4294967296 null)
; CHECK-NEXT: store i8 0, i8* [[UNKNOWN]], align 1 ; CHECK-NEXT: store i8 0, i8* [[UNKNOWN]], align 1
; CHECK-NEXT: ret void ; CHECK-NEXT: ret void
; ;

View File

@ -265,7 +265,7 @@ define i8* @test8(i32* %0) nounwind uwtable {
declare void @use_i8(i8* nocapture) declare void @use_i8(i8* nocapture)
define internal void @test9a(i8* %a, i8* %b) { define internal void @test9a(i8* %a, i8* %b) {
; CHECK-LABEL: define {{[^@]+}}@test9a() { ; CHECK-LABEL: define {{[^@]+}}@test9a() {
; CHECK-NEXT: call void @use_i8(i8* noalias nocapture noundef align 1073741824 null) ; CHECK-NEXT: call void @use_i8(i8* noalias nocapture noundef align 4294967296 null)
; CHECK-NEXT: ret void ; CHECK-NEXT: ret void
; ;
call void @use_i8(i8* null) call void @use_i8(i8* null)

View File

@ -478,7 +478,7 @@ define i8* @test4_2(i8* %x4_2, i8* %y4_2, i8* %z4_2, i1 %c) {
; IS________OPM-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { ; IS________OPM-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] {
; IS________OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS________OPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
; IS________OPM: t: ; IS________OPM: t:
; IS________OPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 1073741824 null, i1 [[C]]) #[[ATTR7]] ; IS________OPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 4294967296 null, i1 [[C]]) #[[ATTR7]]
; IS________OPM-NEXT: store i32* null, i32** @g, align 8 ; IS________OPM-NEXT: store i32* null, i32** @g, align 8
; IS________OPM-NEXT: br label [[F]] ; IS________OPM-NEXT: br label [[F]]
; IS________OPM: f: ; IS________OPM: f:
@ -489,7 +489,7 @@ define i8* @test4_2(i8* %x4_2, i8* %y4_2, i8* %z4_2, i1 %c) {
; IS________NPM-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] { ; IS________NPM-SAME: (i8* nocapture nofree readnone [[X4_2:%.*]], i8* nofree readnone returned "no-capture-maybe-returned" [[Y4_2:%.*]], i8* nocapture nofree readnone [[Z4_2:%.*]], i1 [[C:%.*]]) #[[ATTR7]] {
; IS________NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS________NPM-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
; IS________NPM: t: ; IS________NPM: t:
; IS________NPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 1073741824 null, i1 noundef [[C]]) #[[ATTR7]] ; IS________NPM-NEXT: call void @test4_1(i8* noalias nocapture nofree noundef readnone align 4294967296 null, i1 noundef [[C]]) #[[ATTR7]]
; IS________NPM-NEXT: store i32* null, i32** @g, align 8 ; IS________NPM-NEXT: store i32* null, i32** @g, align 8
; IS________NPM-NEXT: br label [[F]] ; IS________NPM-NEXT: br label [[F]]
; IS________NPM: f: ; IS________NPM: f:
@ -807,7 +807,7 @@ declare void @unknown(i8*)
define void @test_callsite() { define void @test_callsite() {
; CHECK-LABEL: define {{[^@]+}}@test_callsite() { ; CHECK-LABEL: define {{[^@]+}}@test_callsite() {
; CHECK-NEXT: entry: ; CHECK-NEXT: entry:
; CHECK-NEXT: call void @unknown(i8* noalias nocapture noundef align 1073741824 null) ; CHECK-NEXT: call void @unknown(i8* noalias nocapture noundef align 4294967296 null)
; CHECK-NEXT: ret void ; CHECK-NEXT: ret void
; ;
entry: entry:

View File

@ -41,7 +41,7 @@ define void @caller1() {
define internal void @argument_dead_callback_callee(i8* %c) { define internal void @argument_dead_callback_callee(i8* %c) {
; CHECK-LABEL: define {{[^@]+}}@argument_dead_callback_callee ; CHECK-LABEL: define {{[^@]+}}@argument_dead_callback_callee
; CHECK-SAME: (i8* noalias nocapture nofree readnone align 1073741824 [[C:%.*]]) { ; CHECK-SAME: (i8* noalias nocapture nofree readnone align 4294967296 [[C:%.*]]) {
; CHECK-NEXT: call void @unknown() ; CHECK-NEXT: call void @unknown()
; CHECK-NEXT: ret void ; CHECK-NEXT: ret void
; ;
@ -51,11 +51,11 @@ define internal void @argument_dead_callback_callee(i8* %c) {
define void @callback_caller() { define void @callback_caller() {
; IS__TUNIT____-LABEL: define {{[^@]+}}@callback_caller() { ; IS__TUNIT____-LABEL: define {{[^@]+}}@callback_caller() {
; IS__TUNIT____-NEXT: call void @callback_broker(void (i8*)* noundef @argument_dead_callback_callee, i8* noalias nocapture nofree readnone align 1073741824 undef) ; IS__TUNIT____-NEXT: call void @callback_broker(void (i8*)* noundef @argument_dead_callback_callee, i8* noalias nocapture nofree readnone align 4294967296 undef)
; IS__TUNIT____-NEXT: ret void ; IS__TUNIT____-NEXT: ret void
; ;
; IS__CGSCC____-LABEL: define {{[^@]+}}@callback_caller() { ; IS__CGSCC____-LABEL: define {{[^@]+}}@callback_caller() {
; IS__CGSCC____-NEXT: call void @callback_broker(void (i8*)* noundef @argument_dead_callback_callee, i8* noalias nocapture nofree noundef readnone align 1073741824 null) ; IS__CGSCC____-NEXT: call void @callback_broker(void (i8*)* noundef @argument_dead_callback_callee, i8* noalias nocapture nofree noundef readnone align 4294967296 null)
; IS__CGSCC____-NEXT: ret void ; IS__CGSCC____-NEXT: ret void
; ;
call void @callback_broker(void (i8*)* @argument_dead_callback_callee, i8* null) call void @callback_broker(void (i8*)* @argument_dead_callback_callee, i8* null)

View File

@ -134,13 +134,13 @@ define void @store_wholly_unreachable_volatile() {
; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn ; IS__TUNIT____: Function Attrs: nofree nounwind readnone willreturn
; IS__TUNIT____-LABEL: define {{[^@]+}}@store_wholly_unreachable_volatile ; IS__TUNIT____-LABEL: define {{[^@]+}}@store_wholly_unreachable_volatile
; IS__TUNIT____-SAME: () #[[ATTR2:[0-9]+]] { ; IS__TUNIT____-SAME: () #[[ATTR2:[0-9]+]] {
; IS__TUNIT____-NEXT: store volatile i32 5, i32* null, align 1073741824 ; IS__TUNIT____-NEXT: store volatile i32 5, i32* null, align 4294967296
; IS__TUNIT____-NEXT: ret void ; IS__TUNIT____-NEXT: ret void
; ;
; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn ; IS__CGSCC____: Function Attrs: nofree norecurse nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@store_wholly_unreachable_volatile ; IS__CGSCC____-LABEL: define {{[^@]+}}@store_wholly_unreachable_volatile
; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-SAME: () #[[ATTR2:[0-9]+]] {
; IS__CGSCC____-NEXT: store volatile i32 5, i32* null, align 1073741824 ; IS__CGSCC____-NEXT: store volatile i32 5, i32* null, align 4294967296
; IS__CGSCC____-NEXT: ret void ; IS__CGSCC____-NEXT: ret void
; ;
store volatile i32 5, i32* null store volatile i32 5, i32* null
@ -178,13 +178,13 @@ define void @store_null_pointer_is_defined() null_pointer_is_valid {
; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid willreturn writeonly ; IS__TUNIT____: Function Attrs: nofree nosync nounwind null_pointer_is_valid willreturn writeonly
; IS__TUNIT____-LABEL: define {{[^@]+}}@store_null_pointer_is_defined ; IS__TUNIT____-LABEL: define {{[^@]+}}@store_null_pointer_is_defined
; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] { ; IS__TUNIT____-SAME: () #[[ATTR3:[0-9]+]] {
; IS__TUNIT____-NEXT: store i32 5, i32* null, align 1073741824 ; IS__TUNIT____-NEXT: store i32 5, i32* null, align 4294967296
; IS__TUNIT____-NEXT: ret void ; IS__TUNIT____-NEXT: ret void
; ;
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind null_pointer_is_valid willreturn writeonly
; IS__CGSCC____-LABEL: define {{[^@]+}}@store_null_pointer_is_defined ; IS__CGSCC____-LABEL: define {{[^@]+}}@store_null_pointer_is_defined
; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] { ; IS__CGSCC____-SAME: () #[[ATTR3:[0-9]+]] {
; IS__CGSCC____-NEXT: store i32 5, i32* null, align 1073741824 ; IS__CGSCC____-NEXT: store i32 5, i32* null, align 4294967296
; IS__CGSCC____-NEXT: ret void ; IS__CGSCC____-NEXT: ret void
; ;
store i32 5, i32* null store i32 5, i32* null
@ -832,7 +832,7 @@ define void @arg_nonnull_violation3_1(i1 %c) {
; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
; IS__TUNIT____: t: ; IS__TUNIT____: t:
; IS__TUNIT____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7:[0-9]+]] ; IS__TUNIT____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7:[0-9]+]]
; IS__TUNIT____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 1073741824 null) #[[ATTR7]] ; IS__TUNIT____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 4294967296 null) #[[ATTR7]]
; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____-NEXT: unreachable
; IS__TUNIT____: f: ; IS__TUNIT____: f:
; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____-NEXT: unreachable
@ -846,7 +846,7 @@ define void @arg_nonnull_violation3_1(i1 %c) {
; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
; IS__CGSCC____: t: ; IS__CGSCC____: t:
; IS__CGSCC____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7:[0-9]+]] ; IS__CGSCC____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7:[0-9]+]]
; IS__CGSCC____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 1073741824 null) #[[ATTR7]] ; IS__CGSCC____-NEXT: call void @arg_nonnull_12(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 4294967296 null) #[[ATTR7]]
; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____-NEXT: unreachable
; IS__CGSCC____: f: ; IS__CGSCC____: f:
; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____-NEXT: unreachable
@ -879,7 +879,7 @@ define void @arg_nonnull_violation3_2(i1 %c) {
; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__TUNIT____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
; IS__TUNIT____: t: ; IS__TUNIT____: t:
; IS__TUNIT____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7]] ; IS__TUNIT____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7]]
; IS__TUNIT____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 1073741824 null) #[[ATTR7]] ; IS__TUNIT____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 4294967296 null) #[[ATTR7]]
; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____-NEXT: unreachable
; IS__TUNIT____: f: ; IS__TUNIT____: f:
; IS__TUNIT____-NEXT: unreachable ; IS__TUNIT____-NEXT: unreachable
@ -893,7 +893,7 @@ define void @arg_nonnull_violation3_2(i1 %c) {
; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]] ; IS__CGSCC____-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
; IS__CGSCC____: t: ; IS__CGSCC____: t:
; IS__CGSCC____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7]] ; IS__CGSCC____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]]) #[[ATTR7]]
; IS__CGSCC____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 1073741824 null) #[[ATTR7]] ; IS__CGSCC____-NEXT: call void @arg_nonnull_12_noundef_2(i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* nocapture nofree noundef nonnull writeonly align 4 dereferenceable(4) [[PTR]], i32* noalias nocapture nofree noundef writeonly align 4294967296 null) #[[ATTR7]]
; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____-NEXT: unreachable
; IS__CGSCC____: f: ; IS__CGSCC____: f:
; IS__CGSCC____-NEXT: unreachable ; IS__CGSCC____-NEXT: unreachable

View File

@ -449,12 +449,12 @@ define i32* @complicated_args_inalloca(i32* %arg) {
define internal i32* @test_preallocated(i32* preallocated(i32) %a) { define internal i32* @test_preallocated(i32* preallocated(i32) %a) {
; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn ; IS__TUNIT____: Function Attrs: nofree nosync nounwind readnone willreturn
; IS__TUNIT____-LABEL: define {{[^@]+}}@test_preallocated ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_preallocated
; IS__TUNIT____-SAME: (i32* noalias nofree noundef nonnull returned writeonly preallocated(i32) align 1073741824 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { ; IS__TUNIT____-SAME: (i32* noalias nofree noundef nonnull returned writeonly preallocated(i32) align 4294967296 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] {
; IS__TUNIT____-NEXT: ret i32* [[A]] ; IS__TUNIT____-NEXT: ret i32* [[A]]
; ;
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@test_preallocated ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_preallocated
; IS__CGSCC____-SAME: (i32* noalias nofree noundef nonnull returned writeonly preallocated(i32) align 1073741824 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-SAME: (i32* noalias nofree noundef nonnull returned writeonly preallocated(i32) align 4294967296 dereferenceable(4) "no-capture-maybe-returned" [[A:%.*]]) #[[ATTR1]] {
; IS__CGSCC____-NEXT: ret i32* [[A]] ; IS__CGSCC____-NEXT: ret i32* [[A]]
; ;
ret i32* %a ret i32* %a
@ -464,14 +464,14 @@ define i32* @complicated_args_preallocated() {
; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_preallocated ; IS__TUNIT_OPM-LABEL: define {{[^@]+}}@complicated_args_preallocated
; IS__TUNIT_OPM-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT_OPM-SAME: () #[[ATTR0:[0-9]+]] {
; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR5:[0-9]+]] ; IS__TUNIT_OPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR5:[0-9]+]]
; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noundef nonnull align 1073741824 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 1073741824 null) #[[ATTR1]] [ "preallocated"(token [[C]]) ] ; IS__TUNIT_OPM-NEXT: [[CALL:%.*]] = call noundef nonnull align 4294967296 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 4294967296 null) #[[ATTR1]] [ "preallocated"(token [[C]]) ]
; IS__TUNIT_OPM-NEXT: ret i32* [[CALL]] ; IS__TUNIT_OPM-NEXT: ret i32* [[CALL]]
; ;
; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn ; IS__TUNIT_NPM: Function Attrs: nofree nosync nounwind willreturn
; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_preallocated ; IS__TUNIT_NPM-LABEL: define {{[^@]+}}@complicated_args_preallocated
; IS__TUNIT_NPM-SAME: () #[[ATTR0:[0-9]+]] { ; IS__TUNIT_NPM-SAME: () #[[ATTR0:[0-9]+]] {
; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR4:[0-9]+]] ; IS__TUNIT_NPM-NEXT: [[C:%.*]] = call token @llvm.call.preallocated.setup(i32 noundef 1) #[[ATTR4:[0-9]+]]
; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noundef nonnull align 1073741824 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 1073741824 null) #[[ATTR1]] [ "preallocated"(token [[C]]) ] ; IS__TUNIT_NPM-NEXT: [[CALL:%.*]] = call noundef nonnull align 4294967296 dereferenceable(4) i32* @test_preallocated(i32* noalias nocapture nofree noundef writeonly preallocated(i32) align 4294967296 null) #[[ATTR1]] [ "preallocated"(token [[C]]) ]
; IS__TUNIT_NPM-NEXT: ret i32* [[CALL]] ; IS__TUNIT_NPM-NEXT: ret i32* [[CALL]]
; ;
; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn ; IS__CGSCC_OPM: Function Attrs: nofree nosync nounwind willreturn
@ -495,13 +495,13 @@ define internal void @test_sret(%struct.X* sret(%struct.X) %a, %struct.X** %b) {
; ;
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
; IS__TUNIT____-LABEL: define {{[^@]+}}@test_sret ; IS__TUNIT____-LABEL: define {{[^@]+}}@test_sret
; IS__TUNIT____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 1073741824 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__TUNIT____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 4294967296 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] {
; IS__TUNIT____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8 ; IS__TUNIT____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8
; IS__TUNIT____-NEXT: ret void ; IS__TUNIT____-NEXT: ret void
; ;
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
; IS__CGSCC____-LABEL: define {{[^@]+}}@test_sret ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_sret
; IS__CGSCC____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 1073741824 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] { ; IS__CGSCC____-SAME: (%struct.X* noalias nofree noundef nonnull writeonly sret([[STRUCT_X:%.*]]) align 4294967296 dereferenceable(8) [[A:%.*]], %struct.X** nocapture nofree noundef nonnull writeonly align 8 dereferenceable(8) [[B:%.*]]) #[[ATTR2:[0-9]+]] {
; IS__CGSCC____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8 ; IS__CGSCC____-NEXT: store %struct.X* [[A]], %struct.X** [[B]], align 8
; IS__CGSCC____-NEXT: ret void ; IS__CGSCC____-NEXT: ret void
; ;
@ -515,7 +515,7 @@ define void @complicated_args_sret(%struct.X** %b) {
; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly ; IS__TUNIT____: Function Attrs: argmemonly nofree nosync nounwind willreturn writeonly
; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_sret ; IS__TUNIT____-LABEL: define {{[^@]+}}@complicated_args_sret
; IS__TUNIT____-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) #[[ATTR2]] { ; IS__TUNIT____-SAME: (%struct.X** nocapture nofree writeonly [[B:%.*]]) #[[ATTR2]] {
; IS__TUNIT____-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly sret([[STRUCT_X:%.*]]) align 1073741824 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) #[[ATTR3:[0-9]+]] ; IS__TUNIT____-NEXT: call void @test_sret(%struct.X* noalias nocapture nofree noundef writeonly sret([[STRUCT_X:%.*]]) align 4294967296 null, %struct.X** nocapture nofree writeonly align 8 [[B]]) #[[ATTR3:[0-9]+]]
; IS__TUNIT____-NEXT: ret void ; IS__TUNIT____-NEXT: ret void
; ;
; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly ; IS__CGSCC____: Function Attrs: argmemonly nofree norecurse nosync nounwind willreturn writeonly
@ -530,7 +530,7 @@ define void @complicated_args_sret(%struct.X** %b) {
define internal %struct.X* @test_nest(%struct.X* nest %a) { define internal %struct.X* @test_nest(%struct.X* nest %a) {
; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn ; IS__CGSCC____: Function Attrs: nofree norecurse nosync nounwind readnone willreturn
; IS__CGSCC____-LABEL: define {{[^@]+}}@test_nest ; IS__CGSCC____-LABEL: define {{[^@]+}}@test_nest
; IS__CGSCC____-SAME: (%struct.X* nest noalias nocapture nofree readnone align 1073741824 [[A:%.*]]) #[[ATTR1]] { ; IS__CGSCC____-SAME: (%struct.X* nest noalias nocapture nofree readnone align 4294967296 [[A:%.*]]) #[[ATTR1]] {
; IS__CGSCC____-NEXT: ret %struct.X* undef ; IS__CGSCC____-NEXT: ret %struct.X* undef
; ;
ret %struct.X* %a ret %struct.X* %a

View File

@ -38,7 +38,7 @@ entry:
; ALL: br i1 %tobool, label %entry.cond.end_crit_edge, label %cond.false, !dbg [[LOC_15_6:![0-9]+]] ; ALL: br i1 %tobool, label %entry.cond.end_crit_edge, label %cond.false, !dbg [[LOC_15_6:![0-9]+]]
; ALL: entry.cond.end_crit_edge: ; ALL: entry.cond.end_crit_edge:
; GVN: %.pre = load %struct.node*, %struct.node** null, align 8, !dbg [[LOC_16_13:![0-9]+]] ; GVN: %.pre = load %struct.node*, %struct.node** null, align 8, !dbg [[LOC_16_13:![0-9]+]]
; INSTCOMBINE:store %struct.node* poison, %struct.node** null, align 1073741824, !dbg [[LOC_16_13:![0-9]+]] ; INSTCOMBINE:store %struct.node* poison, %struct.node** null, align 4294967296, !dbg [[LOC_16_13:![0-9]+]]
cond.false: cond.false:
%0 = bitcast %struct.desc* %desc to i8***, !dbg !11 %0 = bitcast %struct.desc* %desc to i8***, !dbg !11

View File

@ -119,7 +119,7 @@ define i32 @test8(i32* %p) {
; ordering imposed. ; ordering imposed.
define i32 @test9() { define i32 @test9() {
; CHECK-LABEL: @test9( ; CHECK-LABEL: @test9(
; CHECK-NEXT: store i32 poison, i32* null, align 1073741824 ; CHECK-NEXT: store i32 poison, i32* null, align 4294967296
; CHECK-NEXT: ret i32 poison ; CHECK-NEXT: ret i32 poison
; ;
%x = load atomic i32, i32* null unordered, align 4 %x = load atomic i32, i32* null unordered, align 4
@ -128,7 +128,7 @@ define i32 @test9() {
define i32 @test9_no_null_opt() #0 { define i32 @test9_no_null_opt() #0 {
; CHECK-LABEL: @test9_no_null_opt( ; CHECK-LABEL: @test9_no_null_opt(
; CHECK-NEXT: [[X:%.*]] = load atomic i32, i32* null unordered, align 1073741824 ; CHECK-NEXT: [[X:%.*]] = load atomic i32, i32* null unordered, align 4294967296
; CHECK-NEXT: ret i32 [[X]] ; CHECK-NEXT: ret i32 [[X]]
; ;
%x = load atomic i32, i32* null unordered, align 4 %x = load atomic i32, i32* null unordered, align 4
@ -138,7 +138,7 @@ define i32 @test9_no_null_opt() #0 {
; FIXME: Could also fold ; FIXME: Could also fold
define i32 @test10() { define i32 @test10() {
; CHECK-LABEL: @test10( ; CHECK-LABEL: @test10(
; CHECK-NEXT: [[X:%.*]] = load atomic i32, i32* null monotonic, align 1073741824 ; CHECK-NEXT: [[X:%.*]] = load atomic i32, i32* null monotonic, align 4294967296
; CHECK-NEXT: ret i32 [[X]] ; CHECK-NEXT: ret i32 [[X]]
; ;
%x = load atomic i32, i32* null monotonic, align 4 %x = load atomic i32, i32* null monotonic, align 4
@ -147,7 +147,7 @@ define i32 @test10() {
define i32 @test10_no_null_opt() #0 { define i32 @test10_no_null_opt() #0 {
; CHECK-LABEL: @test10_no_null_opt( ; CHECK-LABEL: @test10_no_null_opt(
; CHECK-NEXT: [[X:%.*]] = load atomic i32, i32* null monotonic, align 1073741824 ; CHECK-NEXT: [[X:%.*]] = load atomic i32, i32* null monotonic, align 4294967296
; CHECK-NEXT: ret i32 [[X]] ; CHECK-NEXT: ret i32 [[X]]
; ;
%x = load atomic i32, i32* null monotonic, align 4 %x = load atomic i32, i32* null monotonic, align 4
@ -157,7 +157,7 @@ define i32 @test10_no_null_opt() #0 {
; Would this be legal to fold? Probably? ; Would this be legal to fold? Probably?
define i32 @test11() { define i32 @test11() {
; CHECK-LABEL: @test11( ; CHECK-LABEL: @test11(
; CHECK-NEXT: [[X:%.*]] = load atomic i32, i32* null seq_cst, align 1073741824 ; CHECK-NEXT: [[X:%.*]] = load atomic i32, i32* null seq_cst, align 4294967296
; CHECK-NEXT: ret i32 [[X]] ; CHECK-NEXT: ret i32 [[X]]
; ;
%x = load atomic i32, i32* null seq_cst, align 4 %x = load atomic i32, i32* null seq_cst, align 4
@ -166,7 +166,7 @@ define i32 @test11() {
define i32 @test11_no_null_opt() #0 { define i32 @test11_no_null_opt() #0 {
; CHECK-LABEL: @test11_no_null_opt( ; CHECK-LABEL: @test11_no_null_opt(
; CHECK-NEXT: [[X:%.*]] = load atomic i32, i32* null seq_cst, align 1073741824 ; CHECK-NEXT: [[X:%.*]] = load atomic i32, i32* null seq_cst, align 4294967296
; CHECK-NEXT: ret i32 [[X]] ; CHECK-NEXT: ret i32 [[X]]
; ;
%x = load atomic i32, i32* null seq_cst, align 4 %x = load atomic i32, i32* null seq_cst, align 4
@ -177,7 +177,7 @@ define i32 @test11_no_null_opt() #0 {
; ordering imposed. ; ordering imposed.
define i32 @test12() { define i32 @test12() {
; CHECK-LABEL: @test12( ; CHECK-LABEL: @test12(
; CHECK-NEXT: store atomic i32 poison, i32* null unordered, align 1073741824 ; CHECK-NEXT: store atomic i32 poison, i32* null unordered, align 4294967296
; CHECK-NEXT: ret i32 0 ; CHECK-NEXT: ret i32 0
; ;
store atomic i32 0, i32* null unordered, align 4 store atomic i32 0, i32* null unordered, align 4
@ -186,7 +186,7 @@ define i32 @test12() {
define i32 @test12_no_null_opt() #0 { define i32 @test12_no_null_opt() #0 {
; CHECK-LABEL: @test12_no_null_opt( ; CHECK-LABEL: @test12_no_null_opt(
; CHECK-NEXT: store atomic i32 0, i32* null unordered, align 1073741824 ; CHECK-NEXT: store atomic i32 0, i32* null unordered, align 4294967296
; CHECK-NEXT: ret i32 0 ; CHECK-NEXT: ret i32 0
; ;
store atomic i32 0, i32* null unordered, align 4 store atomic i32 0, i32* null unordered, align 4
@ -196,7 +196,7 @@ define i32 @test12_no_null_opt() #0 {
; FIXME: Could also fold ; FIXME: Could also fold
define i32 @test13() { define i32 @test13() {
; CHECK-LABEL: @test13( ; CHECK-LABEL: @test13(
; CHECK-NEXT: store atomic i32 0, i32* null monotonic, align 1073741824 ; CHECK-NEXT: store atomic i32 0, i32* null monotonic, align 4294967296
; CHECK-NEXT: ret i32 0 ; CHECK-NEXT: ret i32 0
; ;
store atomic i32 0, i32* null monotonic, align 4 store atomic i32 0, i32* null monotonic, align 4
@ -205,7 +205,7 @@ define i32 @test13() {
define i32 @test13_no_null_opt() #0 { define i32 @test13_no_null_opt() #0 {
; CHECK-LABEL: @test13_no_null_opt( ; CHECK-LABEL: @test13_no_null_opt(
; CHECK-NEXT: store atomic i32 0, i32* null monotonic, align 1073741824 ; CHECK-NEXT: store atomic i32 0, i32* null monotonic, align 4294967296
; CHECK-NEXT: ret i32 0 ; CHECK-NEXT: ret i32 0
; ;
store atomic i32 0, i32* null monotonic, align 4 store atomic i32 0, i32* null monotonic, align 4
@ -215,7 +215,7 @@ define i32 @test13_no_null_opt() #0 {
; Would this be legal to fold? Probably? ; Would this be legal to fold? Probably?
define i32 @test14() { define i32 @test14() {
; CHECK-LABEL: @test14( ; CHECK-LABEL: @test14(
; CHECK-NEXT: store atomic i32 0, i32* null seq_cst, align 1073741824 ; CHECK-NEXT: store atomic i32 0, i32* null seq_cst, align 4294967296
; CHECK-NEXT: ret i32 0 ; CHECK-NEXT: ret i32 0
; ;
store atomic i32 0, i32* null seq_cst, align 4 store atomic i32 0, i32* null seq_cst, align 4
@ -224,7 +224,7 @@ define i32 @test14() {
define i32 @test14_no_null_opt() #0 { define i32 @test14_no_null_opt() #0 {
; CHECK-LABEL: @test14_no_null_opt( ; CHECK-LABEL: @test14_no_null_opt(
; CHECK-NEXT: store atomic i32 0, i32* null seq_cst, align 1073741824 ; CHECK-NEXT: store atomic i32 0, i32* null seq_cst, align 4294967296
; CHECK-NEXT: ret i32 0 ; CHECK-NEXT: ret i32 0
; ;
store atomic i32 0, i32* null seq_cst, align 4 store atomic i32 0, i32* null seq_cst, align 4

View File

@ -495,7 +495,7 @@ define i1 @test23() {
define void @test25() { define void @test25() {
; CHECK-LABEL: @test25( ; CHECK-LABEL: @test25(
; CHECK-NEXT: entry: ; CHECK-NEXT: entry:
; CHECK-NEXT: store i64 poison, i64* null, align 1073741824 ; CHECK-NEXT: store i64 poison, i64* null, align 4294967296
; CHECK-NEXT: tail call void @foo25(i32 0, i64 poison) ; CHECK-NEXT: tail call void @foo25(i32 0, i64 poison)
; CHECK-NEXT: unreachable ; CHECK-NEXT: unreachable
; ;
@ -613,7 +613,7 @@ declare i32 @printf(i8*, ...)
define i32 @test29(i8* %start, i32 %X) nounwind { define i32 @test29(i8* %start, i32 %X) nounwind {
; CHECK-LABEL: @test29( ; CHECK-LABEL: @test29(
; CHECK-NEXT: entry: ; CHECK-NEXT: entry:
; CHECK-NEXT: store i64 poison, i64* null, align 1073741824 ; CHECK-NEXT: store i64 poison, i64* null, align 4294967296
; CHECK-NEXT: br i1 poison, label [[IF_THEN216:%.*]], label [[IF_END363:%.*]] ; CHECK-NEXT: br i1 poison, label [[IF_THEN216:%.*]], label [[IF_END363:%.*]]
; CHECK: if.then216: ; CHECK: if.then216:
; CHECK-NEXT: ret i32 1 ; CHECK-NEXT: ret i32 1

View File

@ -59,7 +59,7 @@ define i32 @test5(i1 %C) {
define i32 @load_gep_null_inbounds(i64 %X) { define i32 @load_gep_null_inbounds(i64 %X) {
; CHECK-LABEL: @load_gep_null_inbounds( ; CHECK-LABEL: @load_gep_null_inbounds(
; CHECK-NEXT: store i32 poison, i32* null, align 1073741824 ; CHECK-NEXT: store i32 poison, i32* null, align 4294967296
; CHECK-NEXT: ret i32 poison ; CHECK-NEXT: ret i32 poison
; ;
%V = getelementptr inbounds i32, i32* null, i64 %X %V = getelementptr inbounds i32, i32* null, i64 %X
@ -69,7 +69,7 @@ define i32 @load_gep_null_inbounds(i64 %X) {
define i32 @load_gep_null_not_inbounds(i64 %X) { define i32 @load_gep_null_not_inbounds(i64 %X) {
; CHECK-LABEL: @load_gep_null_not_inbounds( ; CHECK-LABEL: @load_gep_null_not_inbounds(
; CHECK-NEXT: store i32 poison, i32* null, align 1073741824 ; CHECK-NEXT: store i32 poison, i32* null, align 4294967296
; CHECK-NEXT: ret i32 poison ; CHECK-NEXT: ret i32 poison
; ;
%V = getelementptr i32, i32* null, i64 %X %V = getelementptr i32, i32* null, i64 %X

View File

@ -57,7 +57,7 @@ define i8* @memcpy_big_const_n(i8* %d, i8* nocapture readonly %s) {
define i32 @PR48810() { define i32 @PR48810() {
; CHECK-LABEL: @PR48810( ; CHECK-LABEL: @PR48810(
; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 undef, i8* align 1073741824 null, i64 undef, i1 false) ; CHECK-NEXT: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 undef, i8* align 4294967296 null, i64 undef, i1 false)
; CHECK-NEXT: ret i32 undef ; CHECK-NEXT: ret i32 undef
; ;
%r = call dereferenceable(1) i8* @mempcpy(i8* undef, i8* null, i64 undef) %r = call dereferenceable(1) i8* @mempcpy(i8* undef, i8* null, i64 undef)

View File

@ -159,7 +159,7 @@ define void @test_2(i1 %c) local_unnamed_addr {
; CHECK: cond.true133: ; CHECK: cond.true133:
; CHECK-NEXT: br label [[COND_END144:%.*]] ; CHECK-NEXT: br label [[COND_END144:%.*]]
; CHECK: cond.false138: ; CHECK: cond.false138:
; CHECK-NEXT: store %type_2* poison, %type_2** null, align 1073741824 ; CHECK-NEXT: store %type_2* poison, %type_2** null, align 4294967296
; CHECK-NEXT: br label [[COND_END144]] ; CHECK-NEXT: br label [[COND_END144]]
; CHECK: cond.end144: ; CHECK: cond.end144:
; CHECK-NEXT: br label [[WHILE_COND]] ; CHECK-NEXT: br label [[WHILE_COND]]

View File

@ -4,7 +4,7 @@
define void @test1(i32* %P) { define void @test1(i32* %P) {
; CHECK-LABEL: @test1( ; CHECK-LABEL: @test1(
; CHECK-NEXT: store i32 123, i32* undef, align 4 ; CHECK-NEXT: store i32 123, i32* undef, align 4
; CHECK-NEXT: store i32 poison, i32* null, align 1073741824 ; CHECK-NEXT: store i32 poison, i32* null, align 4294967296
; CHECK-NEXT: ret void ; CHECK-NEXT: ret void
; ;
store i32 undef, i32* %P store i32 undef, i32* %P

View File

@ -49,9 +49,9 @@ define weak void @spmd() {
define weak void @parallel() { define weak void @parallel() {
; CHECK-LABEL: define {{[^@]+}}@parallel() { ; CHECK-LABEL: define {{[^@]+}}@parallel() {
; CHECK-NEXT: [[I:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* align 1073741824 null, i8 2, i1 false, i1 false) ; CHECK-NEXT: [[I:%.*]] = call i32 @__kmpc_target_init(%struct.ident_t* align 4294967296 null, i8 2, i1 false, i1 false)
; CHECK-NEXT: call void @spmd_helper() ; CHECK-NEXT: call void @spmd_helper()
; CHECK-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* noalias noundef align 1073741824 null, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i8* noalias noundef align 1073741824 null, i8* noalias noundef align 1073741824 null, i8** noalias noundef align 1073741824 null, i64 noundef 0) ; CHECK-NEXT: call void @__kmpc_parallel_51(%struct.ident_t* noalias noundef align 4294967296 null, i32 noundef 0, i32 noundef 0, i32 noundef 0, i32 noundef 0, i8* noalias noundef align 4294967296 null, i8* noalias noundef align 4294967296 null, i8** noalias noundef align 4294967296 null, i64 noundef 0)
; CHECK-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* null, i8 2, i1 false) ; CHECK-NEXT: call void @__kmpc_target_deinit(%struct.ident_t* null, i8 2, i1 false)
; CHECK-NEXT: ret void ; CHECK-NEXT: ret void
; ;
@ -108,7 +108,7 @@ define internal void @spmd_helper() {
define internal void @__kmpc_parallel_51(%struct.ident_t*, i32, i32, i32, i32, i8*, i8*, i8**, i64) { define internal void @__kmpc_parallel_51(%struct.ident_t*, i32, i32, i32, i32, i8*, i8*, i8**, i64) {
; CHECK-LABEL: define {{[^@]+}}@__kmpc_parallel_51 ; CHECK-LABEL: define {{[^@]+}}@__kmpc_parallel_51
; CHECK-SAME: (%struct.ident_t* noalias nocapture nofree readnone align 1073741824 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]], i32 [[TMP3:%.*]], i32 [[TMP4:%.*]], i8* noalias nocapture nofree readnone align 1073741824 [[TMP5:%.*]], i8* noalias nocapture nofree readnone align 1073741824 [[TMP6:%.*]], i8** noalias nocapture nofree readnone align 1073741824 [[TMP7:%.*]], i64 [[TMP8:%.*]]) #[[ATTR0:[0-9]+]] { ; CHECK-SAME: (%struct.ident_t* noalias nocapture nofree readnone align 4294967296 [[TMP0:%.*]], i32 [[TMP1:%.*]], i32 [[TMP2:%.*]], i32 [[TMP3:%.*]], i32 [[TMP4:%.*]], i8* noalias nocapture nofree readnone align 4294967296 [[TMP5:%.*]], i8* noalias nocapture nofree readnone align 4294967296 [[TMP6:%.*]], i8** noalias nocapture nofree readnone align 4294967296 [[TMP7:%.*]], i64 [[TMP8:%.*]]) #[[ATTR0:[0-9]+]] {
; CHECK-NEXT: call void @parallel_helper() ; CHECK-NEXT: call void @parallel_helper()
; CHECK-NEXT: ret void ; CHECK-NEXT: ret void
; ;

View File

@ -52,7 +52,7 @@ entry:
define i8* @f7(i8** %x) { define i8* @f7(i8** %x) {
entry: entry:
%y = load i8*, i8** %x, !align !{i64 2147483648} %y = load i8*, i8** %x, !align !{i64 8589934592}
ret i8* %y ret i8* %y
} }
; CHECK: alignment is larger that implementation defined limit ; CHECK: alignment is larger that implementation defined limit

View File

@ -61,9 +61,9 @@ TEST(GlobalTest, CreateAddressSpace) {
GlobalVariable::NotThreadLocal, GlobalVariable::NotThreadLocal,
1); 1);
EXPECT_TRUE(Value::MaximumAlignment == 1073741824U); EXPECT_TRUE(Value::MaximumAlignment == 4294967296ULL);
Dummy0->setAlignment(Align(1073741824)); Dummy0->setAlignment(Align(4294967296ULL));
EXPECT_EQ(Dummy0->getAlignment(), 1073741824U); EXPECT_EQ(Dummy0->getAlignment(), 4294967296ULL);
// Make sure the address space isn't dropped when returning this. // Make sure the address space isn't dropped when returning this.
Constant *Dummy1 = M->getOrInsertGlobal("dummy", Int32Ty); Constant *Dummy1 = M->getOrInsertGlobal("dummy", Int32Ty);
@ -101,7 +101,7 @@ TEST(GlobalTest, AlignDeath) {
Constant::getAllOnesValue(Int32Ty), "var", nullptr, Constant::getAllOnesValue(Int32Ty), "var", nullptr,
GlobalVariable::NotThreadLocal, 1); GlobalVariable::NotThreadLocal, 1);
EXPECT_DEATH(Var->setAlignment(Align(2147483648U)), EXPECT_DEATH(Var->setAlignment(Align(8589934592ULL)),
"Alignment is greater than MaximumAlignment"); "Alignment is greater than MaximumAlignment");
} }
#endif #endif