File tree Expand file tree Collapse file tree 3 files changed +39
-0
lines changed
Expand file tree Collapse file tree 3 files changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -2360,3 +2360,19 @@ SystemZInstrInfo::isCopyInstrImpl(const MachineInstr &MI) const {
23602360
23612361 return std::nullopt ;
23622362}
2363+
2364+ std::pair<unsigned , unsigned >
2365+ SystemZInstrInfo::decomposeMachineOperandsTargetFlags (unsigned TF) const {
2366+ return std::make_pair (TF, 0u );
2367+ }
2368+
2369+ ArrayRef<std::pair<unsigned , const char *>>
2370+ SystemZInstrInfo::getSerializableDirectMachineOperandTargetFlags () const {
2371+ using namespace SystemZII ;
2372+
2373+ static const std::pair<unsigned , const char *> TargetFlags[] = {
2374+ {MO_ADA_DATA_SYMBOL_ADDR, " systemz-ada-datasymboladdr" },
2375+ {MO_ADA_INDIRECT_FUNC_DESC, " systemz-ada-indirectfuncdesc" },
2376+ {MO_ADA_DIRECT_FUNC_DESC, " systemz-ada-directfuncdesc" }};
2377+ return ArrayRef (TargetFlags);
2378+ }
Original file line number Diff line number Diff line change @@ -391,6 +391,12 @@ class SystemZInstrInfo : public SystemZGenInstrInfo {
391391
392392 std::optional<DestSourcePair>
393393 isCopyInstrImpl (const MachineInstr &MI) const override ;
394+
395+ std::pair<unsigned , unsigned >
396+ decomposeMachineOperandsTargetFlags (unsigned TF) const override ;
397+
398+ ArrayRef<std::pair<unsigned , const char *>>
399+ getSerializableDirectMachineOperandTargetFlags () const override ;
394400};
395401
396402} // end namespace llvm
Original file line number Diff line number Diff line change 1+ ; RUN: llc -mtriple=s390x-ibm-zos -stop-after=systemz-isel --simplify-mir < %s | FileCheck %s
2+
3+
4+ declare i64 @calc (i64 noundef, ptr noundef)
5+ declare i64 @morework (i64 noundef)
6+
7+ @i = external local_unnamed_addr global i64 , align 8
8+
9+ define i64 @work () {
10+ entry:
11+ ; CHECK: %{{.*}}:addr64bit = ADA_ENTRY_VALUE target-flags(systemz-ada-datasymboladdr) @i,
12+ ; CHECK: %{{.*}}:addr64bit = ADA_ENTRY_VALUE target-flags(systemz-ada-directfuncdesc) @calc,
13+ ; CHECK: %{{.*}}:addr64bit = ADA_ENTRY_VALUE target-flags(systemz-ada-indirectfuncdesc) @morework,
14+ %0 = load i64 , ptr @i , align 8
15+ %call = tail call i64 @calc (i64 noundef %0 , ptr noundef nonnull @morework ) #2
16+ ret i64 %call
17+ }
You can’t perform that action at this time.
0 commit comments