Skip to content

Commit 6f6eea4

Browse files
committed
Rebase
1 parent b18f4e7 commit 6f6eea4

24 files changed

+79
-9907
lines changed

clang/lib/CodeGen/TargetInfo.cpp

Lines changed: 0 additions & 9826 deletions
Large diffs are not rendered by default.

clang/lib/CodeGen/Targets/SystemZ.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -445,16 +445,20 @@ ABIArgInfo SystemZABIInfo::classifyArgumentType(QualType Ty) const {
445445
return getNaturalAlignIndirect(Ty, /*ByVal=*/false);
446446

447447
// The structure is passed as an unextended integer, a float, or a double.
448-
llvm::Type *PassTy;
449448
if (isFPArgumentType(SingleElementTy)) {
450449
assert(Size == 32 || Size == 64);
450+
llvm::Type *PassTy;
451451
if (Size == 32)
452452
PassTy = llvm::Type::getFloatTy(getVMContext());
453453
else
454454
PassTy = llvm::Type::getDoubleTy(getVMContext());
455-
} else
456-
PassTy = llvm::IntegerType::get(getVMContext(), Size);
457-
return ABIArgInfo::getDirect(PassTy);
455+
return ABIArgInfo::getDirect(PassTy);
456+
} else {
457+
llvm::IntegerType *PassTy = llvm::IntegerType::get(getVMContext(), Size);
458+
if (Size <= 32)
459+
return ABIArgInfo::getNoExtend(PassTy);
460+
return ABIArgInfo::getDirect(PassTy);
461+
}
458462
}
459463

460464
// Non-structure compounds are passed indirectly.

clang/test/CodeGen/SystemZ/systemz-abi-vector.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,17 @@ v1f128 pass_v1f128(v1f128 arg) { return arg; }
146146

147147
struct agg_v1i8 { v1i8 a; };
148148
struct agg_v1i8 pass_agg_v1i8(struct agg_v1i8 arg) { return arg; }
149-
// CHECK-LABEL: define{{.*}} void @pass_agg_v1i8(ptr dead_on_unwind noalias writable sret(%struct.agg_v1i8) align 1 %{{.*}}, i8 %{{.*}})
149+
// CHECK-LABEL: define{{.*}} void @pass_agg_v1i8(ptr dead_on_unwind noalias writable sret(%struct.agg_v1i8) align 1 %{{.*}}, i8 noext %{{.*}})
150150
// CHECK-VECTOR-LABEL: define{{.*}} void @pass_agg_v1i8(ptr dead_on_unwind noalias writable sret(%struct.agg_v1i8) align 1 %{{.*}}, <1 x i8> %{{.*}})
151151

152152
struct agg_v2i8 { v2i8 a; };
153153
struct agg_v2i8 pass_agg_v2i8(struct agg_v2i8 arg) { return arg; }
154-
// CHECK-LABEL: define{{.*}} void @pass_agg_v2i8(ptr dead_on_unwind noalias writable sret(%struct.agg_v2i8) align 2 %{{.*}}, i16 %{{.*}})
154+
// CHECK-LABEL: define{{.*}} void @pass_agg_v2i8(ptr dead_on_unwind noalias writable sret(%struct.agg_v2i8) align 2 %{{.*}}, i16 noext %{{.*}})
155155
// CHECK-VECTOR-LABEL: define{{.*}} void @pass_agg_v2i8(ptr dead_on_unwind noalias writable sret(%struct.agg_v2i8) align 2 %{{.*}}, <2 x i8> %{{.*}})
156156

157157
struct agg_v4i8 { v4i8 a; };
158158
struct agg_v4i8 pass_agg_v4i8(struct agg_v4i8 arg) { return arg; }
159-
// CHECK-LABEL: define{{.*}} void @pass_agg_v4i8(ptr dead_on_unwind noalias writable sret(%struct.agg_v4i8) align 4 %{{.*}}, i32 %{{.*}})
159+
// CHECK-LABEL: define{{.*}} void @pass_agg_v4i8(ptr dead_on_unwind noalias writable sret(%struct.agg_v4i8) align 4 %{{.*}}, i32 noext %{{.*}})
160160
// CHECK-VECTOR-LABEL: define{{.*}} void @pass_agg_v4i8(ptr dead_on_unwind noalias writable sret(%struct.agg_v4i8) align 4 %{{.*}}, <4 x i8> %{{.*}})
161161

162162
struct agg_v8i8 { v8i8 a; };
@@ -189,8 +189,8 @@ struct agg_novector2 pass_agg_novector2(struct agg_novector2 arg) { return arg;
189189

190190
struct agg_novector3 { v4i8 a; int : 0; };
191191
struct agg_novector3 pass_agg_novector3(struct agg_novector3 arg) { return arg; }
192-
// CHECK-LABEL: define{{.*}} void @pass_agg_novector3(ptr dead_on_unwind noalias writable sret(%struct.agg_novector3) align 4 %{{.*}}, i32 %{{.*}})
193-
// CHECK-VECTOR-LABEL: define{{.*}} void @pass_agg_novector3(ptr dead_on_unwind noalias writable sret(%struct.agg_novector3) align 4 %{{.*}}, i32 %{{.*}})
192+
// CHECK-LABEL: define{{.*}} void @pass_agg_novector3(ptr dead_on_unwind noalias writable sret(%struct.agg_novector3) align 4 %{{.*}}, i32 noext %{{.*}})
193+
// CHECK-VECTOR-LABEL: define{{.*}} void @pass_agg_novector3(ptr dead_on_unwind noalias writable sret(%struct.agg_novector3) align 4 %{{.*}}, i32 noext %{{.*}})
194194

195195
struct agg_novector4 { v4i8 a __attribute__((aligned (8))); };
196196
struct agg_novector4 pass_agg_novector4(struct agg_novector4 arg) { return arg; }

clang/test/CodeGen/SystemZ/systemz-abi.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,19 +86,19 @@ _Complex long double pass_complex_longdouble(_Complex long double arg) { return
8686

8787
struct agg_1byte { char a[1]; };
8888
struct agg_1byte pass_agg_1byte(struct agg_1byte arg) { return arg; }
89-
// CHECK-LABEL: define{{.*}} void @pass_agg_1byte(ptr dead_on_unwind noalias writable sret(%struct.agg_1byte) align 1 %{{.*}}, i8 %{{.*}})
89+
// CHECK-LABEL: define{{.*}} void @pass_agg_1byte(ptr dead_on_unwind noalias writable sret(%struct.agg_1byte) align 1 %{{.*}}, i8 noext %{{.*}})
9090

9191
struct agg_2byte { char a[2]; };
9292
struct agg_2byte pass_agg_2byte(struct agg_2byte arg) { return arg; }
93-
// CHECK-LABEL: define{{.*}} void @pass_agg_2byte(ptr dead_on_unwind noalias writable sret(%struct.agg_2byte) align 1 %{{.*}}, i16 %{{.*}})
93+
// CHECK-LABEL: define{{.*}} void @pass_agg_2byte(ptr dead_on_unwind noalias writable sret(%struct.agg_2byte) align 1 %{{.*}}, i16 noext %{{.*}})
9494

9595
struct agg_3byte { char a[3]; };
9696
struct agg_3byte pass_agg_3byte(struct agg_3byte arg) { return arg; }
9797
// CHECK-LABEL: define{{.*}} void @pass_agg_3byte(ptr dead_on_unwind noalias writable sret(%struct.agg_3byte) align 1 %{{.*}}, ptr %{{.*}})
9898

9999
struct agg_4byte { char a[4]; };
100100
struct agg_4byte pass_agg_4byte(struct agg_4byte arg) { return arg; }
101-
// CHECK-LABEL: define{{.*}} void @pass_agg_4byte(ptr dead_on_unwind noalias writable sret(%struct.agg_4byte) align 1 %{{.*}}, i32 %{{.*}})
101+
// CHECK-LABEL: define{{.*}} void @pass_agg_4byte(ptr dead_on_unwind noalias writable sret(%struct.agg_4byte) align 1 %{{.*}}, i32 noext %{{.*}})
102102

103103
struct agg_5byte { char a[5]; };
104104
struct agg_5byte pass_agg_5byte(struct agg_5byte arg) { return arg; }
@@ -126,7 +126,7 @@ struct agg_16byte pass_agg_16byte(struct agg_16byte arg) { return arg; }
126126
struct agg_float { float a; };
127127
struct agg_float pass_agg_float(struct agg_float arg) { return arg; }
128128
// HARD-FLOAT-LABEL: define{{.*}} void @pass_agg_float(ptr dead_on_unwind noalias writable sret(%struct.agg_float) align 4 %{{.*}}, float %{{.*}})
129-
// SOFT-FLOAT-LABEL: define{{.*}} void @pass_agg_float(ptr dead_on_unwind noalias writable sret(%struct.agg_float) align 4 %{{.*}}, i32 %{{.*}})
129+
// SOFT-FLOAT-LABEL: define{{.*}} void @pass_agg_float(ptr dead_on_unwind noalias writable sret(%struct.agg_float) align 4 %{{.*}}, i32 noext %{{.*}})
130130

131131
struct agg_double { double a; };
132132
struct agg_double pass_agg_double(struct agg_double arg) { return arg; }
@@ -159,14 +159,14 @@ struct agg_nofloat2 pass_agg_nofloat2(struct agg_nofloat2 arg) { return arg; }
159159

160160
struct agg_nofloat3 { float a; int : 0; };
161161
struct agg_nofloat3 pass_agg_nofloat3(struct agg_nofloat3 arg) { return arg; }
162-
// CHECK-LABEL: define{{.*}} void @pass_agg_nofloat3(ptr dead_on_unwind noalias writable sret(%struct.agg_nofloat3) align 4 %{{.*}}, i32 %{{.*}})
162+
// CHECK-LABEL: define{{.*}} void @pass_agg_nofloat3(ptr dead_on_unwind noalias writable sret(%struct.agg_nofloat3) align 4 %{{.*}}, i32 noext %{{.*}})
163163

164164

165165
// Union types likewise are *not* float-like aggregate types
166166

167167
union union_float { float a; };
168168
union union_float pass_union_float(union union_float arg) { return arg; }
169-
// CHECK-LABEL: define{{.*}} void @pass_union_float(ptr dead_on_unwind noalias writable sret(%union.union_float) align 4 %{{.*}}, i32 %{{.*}})
169+
// CHECK-LABEL: define{{.*}} void @pass_union_float(ptr dead_on_unwind noalias writable sret(%union.union_float) align 4 %{{.*}}, i32 noext %{{.*}})
170170

171171
union union_double { double a; };
172172
union union_double pass_union_double(union union_double arg) { return arg; }

clang/test/CodeGen/SystemZ/systemz-abi.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@
77
class agg_float_class { float a; };
88
class agg_float_class pass_agg_float_class(class agg_float_class arg) { return arg; }
99
// CHECK-LABEL: define{{.*}} void @_Z20pass_agg_float_class15agg_float_class(ptr dead_on_unwind noalias writable sret(%class.agg_float_class) align 4 %{{.*}}, float %{{.*}})
10-
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z20pass_agg_float_class15agg_float_class(ptr dead_on_unwind noalias writable sret(%class.agg_float_class) align 4 %{{.*}}, i32 %{{.*}})
11-
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z20pass_agg_float_class15agg_float_class(ptr noalias sret(%class.agg_float_class) align 4 %{{.*}}, i32 noext%{{.*}})
10+
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z20pass_agg_float_class15agg_float_class(ptr dead_on_unwind noalias writable sret(%class.agg_float_class) align 4 %{{.*}}, i32 noext %{{.*}})
1211

1312
class agg_double_class { double a; };
1413
class agg_double_class pass_agg_double_class(class agg_double_class arg) { return arg; }
@@ -19,9 +18,8 @@ class agg_double_class pass_agg_double_class(class agg_double_class arg) { retur
1918
// This structure is passed in a GPR in C++ (and C, checked in systemz-abi.c).
2019
struct agg_float_cpp { float a; int : 0; };
2120
struct agg_float_cpp pass_agg_float_cpp(struct agg_float_cpp arg) { return arg; }
22-
// CHECK-LABEL: define{{.*}} void @_Z18pass_agg_float_cpp13agg_float_cpp(ptr dead_on_unwind noalias writable sret(%struct.agg_float_cpp) align 4 %{{.*}}, i32 %{{.*}})
23-
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z18pass_agg_float_cpp13agg_float_cpp(ptr dead_on_unwind noalias writable sret(%struct.agg_float_cpp) align 4 %{{.*}}, i32 %{{.*}})
24-
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z18pass_agg_float_cpp13agg_float_cpp(ptr noalias sret(%struct.agg_float_cpp) align 4 %{{.*}}, i32 noext %{{.*}})
21+
// CHECK-LABEL: define{{.*}} void @_Z18pass_agg_float_cpp13agg_float_cpp(ptr dead_on_unwind noalias writable sret(%struct.agg_float_cpp) align 4 %{{.*}}, i32 noext %{{.*}})
22+
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z18pass_agg_float_cpp13agg_float_cpp(ptr dead_on_unwind noalias writable sret(%struct.agg_float_cpp) align 4 %{{.*}}, i32 noext %{{.*}})
2523

2624

2725
// A field member of empty class type in C++ makes the record nonhomogeneous,
@@ -34,8 +32,7 @@ struct agg_nofloat_empty pass_agg_nofloat_empty(struct agg_nofloat_empty arg) {
3432
struct agg_float_empty { float a; [[no_unique_address]] empty dummy; };
3533
struct agg_float_empty pass_agg_float_empty(struct agg_float_empty arg) { return arg; }
3634
// CHECK-LABEL: define{{.*}} void @_Z20pass_agg_float_empty15agg_float_empty(ptr dead_on_unwind noalias writable sret(%struct.agg_float_empty) align 4 %{{.*}}, float %{{.*}})
37-
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z20pass_agg_float_empty15agg_float_empty(ptr dead_on_unwind noalias writable sret(%struct.agg_float_empty) align 4 %{{.*}}, i32 %{{.*}})
38-
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z20pass_agg_float_empty15agg_float_empty(ptr noalias sret(%struct.agg_float_empty) align 4 %{{.*}}, i32 noext %{{.*}})
35+
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z20pass_agg_float_empty15agg_float_empty(ptr dead_on_unwind noalias writable sret(%struct.agg_float_empty) align 4 %{{.*}}, i32 noext %{{.*}})
3936
struct agg_nofloat_emptyarray { float a; [[no_unique_address]] empty dummy[3]; };
4037
struct agg_nofloat_emptyarray pass_agg_nofloat_emptyarray(struct agg_nofloat_emptyarray arg) { return arg; }
4138
// CHECK-LABEL: define{{.*}} void @_Z27pass_agg_nofloat_emptyarray22agg_nofloat_emptyarray(ptr dead_on_unwind noalias writable sret(%struct.agg_nofloat_emptyarray) align 4 %{{.*}}, i64 %{{.*}})
@@ -51,8 +48,7 @@ struct emptybase { [[no_unique_address]] empty dummy; };
5148
struct agg_float_emptybase : emptybase { float a; };
5249
struct agg_float_emptybase pass_agg_float_emptybase(struct agg_float_emptybase arg) { return arg; }
5350
// CHECK-LABEL: define{{.*}} void @_Z24pass_agg_float_emptybase19agg_float_emptybase(ptr dead_on_unwind noalias writable sret(%struct.agg_float_emptybase) align 4 %{{.*}}, float %{{.*}})
54-
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z24pass_agg_float_emptybase19agg_float_emptybase(ptr dead_on_unwind noalias writable sret(%struct.agg_float_emptybase) align 4 %{{.*}}, i32 %{{.*}})
55-
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z24pass_agg_float_emptybase19agg_float_emptybase(ptr noalias sret(%struct.agg_float_emptybase) align 4 %{{.*}}, i32 noext %{{.*}})
51+
// SOFT-FLOAT-LABEL: define{{.*}} void @_Z24pass_agg_float_emptybase19agg_float_emptybase(ptr dead_on_unwind noalias writable sret(%struct.agg_float_emptybase) align 4 %{{.*}}, i32 noext %{{.*}})
5652
struct noemptybasearray { [[no_unique_address]] empty dummy[3]; };
5753
struct agg_nofloat_emptybasearray : noemptybasearray { float a; };
5854
struct agg_nofloat_emptybasearray pass_agg_nofloat_emptybasearray(struct agg_nofloat_emptybasearray arg) { return arg; }

llvm/include/llvm/Bitcode/LLVMBitCodes.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -757,9 +757,9 @@ enum AttributeKindCodes {
757757
ATTR_KIND_RANGE = 92,
758758
ATTR_KIND_SANITIZE_NUMERICAL_STABILITY = 93,
759759
ATTR_KIND_INITIALIZES = 94,
760-
ATTR_KIND_NO_EXT = 93, XXX
761760
ATTR_KIND_HYBRID_PATCHABLE = 95,
762-
};
761+
ATTR_KIND_NO_EXT = 96,
762+
};
763763

764764
enum ComdatSelectionKindCodes {
765765
COMDAT_SELECTION_KIND_ANY = 1,

llvm/lib/Bitcode/Reader/BitcodeReader.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2171,8 +2171,6 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
21712171
return Attribute::ByRef;
21722172
case bitc::ATTR_KIND_MUSTPROGRESS:
21732173
return Attribute::MustProgress;
2174-
case bitc::ATTR_KIND_NO_EXT:
2175-
return Attribute::NoExt;
21762174
case bitc::ATTR_KIND_HOT:
21772175
return Attribute::Hot;
21782176
case bitc::ATTR_KIND_PRESPLIT_COROUTINE:
@@ -2187,6 +2185,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
21872185
return Attribute::Range;
21882186
case bitc::ATTR_KIND_INITIALIZES:
21892187
return Attribute::Initializes;
2188+
case bitc::ATTR_KIND_NO_EXT:
2189+
return Attribute::NoExt;
21902190
}
21912191
}
21922192

llvm/lib/Bitcode/Writer/BitcodeWriter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -885,7 +885,7 @@ static uint64_t getAttrKindEncoding(Attribute::AttrKind Kind) {
885885
return bitc::ATTR_KIND_RANGE;
886886
case Attribute::Initializes:
887887
return bitc::ATTR_KIND_INITIALIZES;
888-
case Attribute::NoExt: XXX right place?
888+
case Attribute::NoExt:
889889
return bitc::ATTR_KIND_NO_EXT;
890890
case Attribute::EndAttrKinds:
891891
llvm_unreachable("Can not encode end-attribute kinds marker.");

llvm/lib/Target/SystemZ/SystemZISelLowering.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ using namespace llvm;
3434

3535
#define DEBUG_TYPE "systemz-lower"
3636

37-
static cl::opt<bool> VerifyIntArgExtensions(
38-
"int-arg-ext-ver", cl::init(true),
39-
cl::desc("Verify that narrow int args are properly extended per the ABI."),
40-
cl::Hidden);
37+
static cl::opt<bool> DisableIntArgExtCheck(
38+
"no-argext-abi-check", cl::init(false),
39+
cl::desc("Do not verify that narrow int args are properly extended per the "
40+
"SystemZ ABI."));
4141

4242
namespace {
4343
// Represents information about a comparison.
@@ -1483,13 +1483,13 @@ static void VerifyIntegerArg(MVT VT, ISD::ArgFlagsTy Flags) {
14831483
"Unexpected integer argument VT.");
14841484
assert((VT != MVT::i32 ||
14851485
(Flags.isSExt() || Flags.isZExt() || Flags.isNoExt())) &&
1486-
"Narrow integer without valid extension type! [-int-arg-ext-ver]");
1486+
"Narrow integer argument must have a valid extension type.");
14871487
}
14881488
}
14891489

14901490
// Verify that narrow integer arguments are extended as required by the ABI.
14911491
static void CheckNarrowIntegerArgs(SmallVectorImpl<ISD::OutputArg> &Outs) {
1492-
if (VerifyIntArgExtensions) {
1492+
if (!DisableIntArgExtCheck) {
14931493
for (unsigned i = 0; i < Outs.size(); ++i)
14941494
VerifyIntegerArg(Outs[i].VT, Outs[i].Flags);
14951495
return;

llvm/lib/Transforms/Utils/CodeExtractor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -984,7 +984,6 @@ Function *CodeExtractor::constructFunction(const ValueSet &inputs,
984984
case Attribute::Nest:
985985
case Attribute::NoAlias:
986986
case Attribute::NoCapture:
987-
case Attribute::NoExt:
988987
case Attribute::NoUndef:
989988
case Attribute::NonNull:
990989
case Attribute::Preallocated:
@@ -1004,6 +1003,7 @@ Function *CodeExtractor::constructFunction(const ValueSet &inputs,
10041003
case Attribute::DeadOnUnwind:
10051004
case Attribute::Range:
10061005
case Attribute::Initializes:
1006+
case Attribute::NoExt:
10071007
// These are not really attributes.
10081008
case Attribute::None:
10091009
case Attribute::EndAttrKinds:

llvm/test/Analysis/CostModel/SystemZ/divrem-const.ll

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,19 @@ define i64 @fun0(i64 %a) {
1818
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = sdiv i64 %a, 20
1919
}
2020

21-
define i32 @fun1(i32 %a) {
21+
define internal i32 @fun1(i32 %a) {
2222
%r = sdiv i32 %a, 20
2323
ret i32 %r
2424
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = sdiv i32 %a, 20
2525
}
2626

27-
define i16 @fun2(i16 %a) {
27+
define internal i16 @fun2(i16 %a) {
2828
%r = sdiv i16 %a, 20
2929
ret i16 %r
3030
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = sdiv i16 %a, 20
3131
}
3232

33-
define i8 @fun3(i8 %a) {
33+
define internal i8 @fun3(i8 %a) {
3434
%r = sdiv i8 %a, 20
3535
ret i8 %r
3636
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = sdiv i8 %a, 20
@@ -88,19 +88,19 @@ define i64 @fun11(i64 %a) {
8888
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = udiv i64 %a, 20
8989
}
9090

91-
define i32 @fun12(i32 %a) {
91+
define internal i32 @fun12(i32 %a) {
9292
%r = udiv i32 %a, 20
9393
ret i32 %r
9494
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = udiv i32 %a, 20
9595
}
9696

97-
define i16 @fun13(i16 %a) {
97+
define internal i16 @fun13(i16 %a) {
9898
%r = udiv i16 %a, 20
9999
ret i16 %r
100100
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = udiv i16 %a, 20
101101
}
102102

103-
define i8 @fun14(i8 %a) {
103+
define internal i8 @fun14(i8 %a) {
104104
%r = udiv i8 %a, 20
105105
ret i8 %r
106106
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = udiv i8
@@ -158,19 +158,19 @@ define i64 @fun22(i64 %a) {
158158
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = srem i64
159159
}
160160

161-
define i32 @fun23(i32 %a) {
161+
define internal i32 @fun23(i32 %a) {
162162
%r = srem i32 %a, 20
163163
ret i32 %r
164164
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = srem i32
165165
}
166166

167-
define i16 @fun24(i16 %a) {
167+
define internal i16 @fun24(i16 %a) {
168168
%r = srem i16 %a, 20
169169
ret i16 %r
170170
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = srem i16
171171
}
172172

173-
define i8 @fun25(i8 %a) {
173+
define internal i8 @fun25(i8 %a) {
174174
%r = srem i8 %a, 20
175175
ret i8 %r
176176
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = srem i8
@@ -228,19 +228,19 @@ define i64 @fun33(i64 %a) {
228228
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = urem i64
229229
}
230230

231-
define i32 @fun34(i32 %a) {
231+
define internal i32 @fun34(i32 %a) {
232232
%r = urem i32 %a, 20
233233
ret i32 %r
234234
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = urem i32
235235
}
236236

237-
define i16 @fun35(i16 %a) {
237+
define internal i16 @fun35(i16 %a) {
238238
%r = urem i16 %a, 20
239239
ret i16 %r
240240
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = urem i16
241241
}
242242

243-
define i8 @fun36(i8 %a) {
243+
define internal i8 @fun36(i8 %a) {
244244
%r = urem i8 %a, 20
245245
ret i8 %r
246246
; COST: Cost Model: Found an estimated cost of 10 for instruction: %r = urem i8

llvm/test/Analysis/CostModel/SystemZ/divrem-pow2.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
; RUN: | FileCheck %s -check-prefix=COST
33

44
; Check that all divide/remainder instructions are implemented by cheaper instructions.
5-
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -o - | FileCheck %s
5+
; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 -o - -no-argext-abi-check | FileCheck %s
66
; CHECK-NOT: dsg
77
; CHECK-NOT: dl
88

llvm/test/CodeGen/Generic/2002-04-16-StackFrameSizeAlignment.ll

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ declare i32 @SIM(ptr, ptr, i32, i32, i32, ptr, i32, i32, i32)
88
define void @foo() {
99
bb0:
1010
%V = alloca [256 x i32], i32 256 ; <ptr> [#uses=1]
11-
call i32 @SIM( ptr null, ptr null, i32 0, i32 0, i32 0, ptr %V, i32 0, i32 0, i32 2 ) ; <i32>:0 [#uses=0]
11+
call signext i32 @SIM( ptr null, ptr null, i32 signext 0, i32 signext 0, i32 signext 0,
12+
ptr %V, i32 signext 0, i32 signext 0, i32 signext 2 ) ; <i32>:0 [#uses=0]
1213
ret void
1314
}
1415

llvm/test/CodeGen/SystemZ/args-12.ll

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,3 @@ define void @foo() {
4141
i64 5, i64 6, i64 7, i64 8, i128 0)
4242
ret void
4343
}
44-
Move to new file
45-
; RUN: not --crash llc < %s -mtriple=s390x-linux-gnu 2>&1 | FileCheck %s
46-
; REQUIRES: asserts
47-
;
48-
; Test detection of missing extension of an i32 return value.
49-
50-
define i32 @callee_MissingRetAttr() {
51-
ret i32 -1
52-
}
53-
54-
; CHECK: Narrow integer argument must have a valid extension type

llvm/test/CodeGen/SystemZ/args-13.ll

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,3 @@ define i128 @f14(i128 %r3) {
4141
%y = add i128 %r3, %r3
4242
ret i128 %y
4343
}
44-
45-
Move to new file
46-
RUN: not --crash llc < %s -mtriple=s390x-linux-gnu 2>&1 | FileCheck %s
47-
; REQUIRES: asserts
48-
;
49-
; Test detection of missing extension of an i16 return value.
50-
51-
define i16 @callee_MissingRetAttr() {
52-
ret i16 -1
53-
}
54-
55-
; CHECK: Narrow integer argument must have a valid extension type
56-
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
; RUN: not --crash llc < %s -mtriple=s390x-linux-gnu 2>&1 | FileCheck %s
2+
; REQUIRES: asserts
3+
;
4+
; Test detection of missing extension of an i16 return value.
5+
6+
define i16 @callee_MissingRetAttr() {
7+
ret i16 -1
8+
}
9+
10+
; CHECK: Narrow integer argument must have a valid extension type.
11+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
; RUN: not --crash llc < %s -mtriple=s390x-linux-gnu 2>&1 | FileCheck %s
2+
; REQUIRES: asserts
3+
;
4+
; Test detection of missing extension of an i32 return value.
5+
6+
define i32 @callee_MissingRetAttr() {
7+
ret i32 -1
8+
}
9+
10+
; CHECK: Narrow integer argument must have a valid extension type.

0 commit comments

Comments
 (0)