Skip to content

Commit f5a5e44

Browse files
committed
Update tests
1 parent 8f6c32d commit f5a5e44

File tree

3 files changed

+170
-88
lines changed

3 files changed

+170
-88
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3248,10 +3248,14 @@ MachineBasicBlock *AArch64TargetLowering::EmitInstrWithCustomInserter(
32483248
case AArch64::MOVT_TIZ_PSEUDO:
32493249
return EmitZTInstr(MI, BB, AArch64::MOVT_TIZ, /*Op0IsDef=*/true);
32503250

3251-
case AArch64::AUT:
3251+
case AArch64::AUTx16x17:
32523252
fixupBlendComponents(MI, BB, MI.getOperand(1), MI.getOperand(2),
32533253
&AArch64::GPR64noipRegClass);
32543254
return BB;
3255+
case AArch64::AUTxMxN:
3256+
fixupBlendComponents(MI, BB, MI.getOperand(4), MI.getOperand(5),
3257+
&AArch64::GPR64noipRegClass);
3258+
return BB;
32553259
case AArch64::PAC:
32563260
fixupBlendComponents(MI, BB, MI.getOperand(3), MI.getOperand(4),
32573261
&AArch64::GPR64noipRegClass);

llvm/lib/Target/AArch64/AArch64InstrInfo.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2155,6 +2155,7 @@ let Predicates = [HasPAuth] in {
21552155
let Size = 32;
21562156
let Defs = [NZCV];
21572157
let Uses = [];
2158+
let usesCustomInserter = 1;
21582159
}
21592160

21602161
// PAC pseudo instruction. Is AsmPrinter, it is expanded into an actual PAC*

llvm/test/CodeGen/AArch64/ptrauth-isel.ll

Lines changed: 164 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
22
; RUN: llc < %s -mtriple arm64e-apple-darwin -verify-machineinstrs -stop-after=finalize-isel -global-isel=0 \
3-
; RUN: | FileCheck %s --check-prefixes=DAGISEL
3+
; RUN: | FileCheck %s --check-prefixes=DAGISEL,DAGISEL-DARWIN
44
; RUN: llc < %s -mtriple arm64e-apple-darwin -verify-machineinstrs -stop-after=finalize-isel -global-isel=1 -global-isel-abort=1 \
5-
; RUN: | FileCheck %s --check-prefixes=GISEL
5+
; RUN: | FileCheck %s --check-prefixes=GISEL,GISEL-DARWIN
66
; RUN: llc < %s -mtriple aarch64-linux-gnu -mattr=+pauth -verify-machineinstrs -stop-after=finalize-isel -global-isel=0 \
7-
; RUN: | FileCheck %s --check-prefixes=DAGISEL
7+
; RUN: | FileCheck %s --check-prefixes=DAGISEL,DAGISEL-ELF
88
; RUN: llc < %s -mtriple aarch64-linux-gnu -mattr=+pauth -verify-machineinstrs -stop-after=finalize-isel -global-isel=1 -global-isel-abort=1 \
9-
; RUN: | FileCheck %s --check-prefixes=GISEL
9+
; RUN: | FileCheck %s --check-prefixes=GISEL,GISEL-ELF
1010

1111
; Check MIR produced by the instruction selector to validate properties that
1212
; cannot be reliably tested by only inspecting the final asm output.
@@ -102,36 +102,62 @@ entry:
102102
}
103103

104104
define i64 @blend_and_auth_same_bb(i64 %addr) {
105-
; DAGISEL-LABEL: name: blend_and_auth_same_bb
106-
; DAGISEL: bb.0.entry:
107-
; DAGISEL-NEXT: liveins: $x0
108-
; DAGISEL-NEXT: {{ $}}
109-
; DAGISEL-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
110-
; DAGISEL-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
111-
; DAGISEL-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
112-
; DAGISEL-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
113-
; DAGISEL-NEXT: $x16 = COPY [[COPY]]
114-
; DAGISEL-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
115-
; DAGISEL-NEXT: AUT 2, 42, killed [[COPY1]], implicit-def $x16, implicit-def dead $x17, implicit-def dead $nzcv, implicit $x16
116-
; DAGISEL-NEXT: [[COPY2:%[0-9]+]]:gpr64all = COPY $x16
117-
; DAGISEL-NEXT: $x0 = COPY [[COPY2]]
118-
; DAGISEL-NEXT: RET_ReallyLR implicit $x0
105+
; DAGISEL-DARWIN-LABEL: name: blend_and_auth_same_bb
106+
; DAGISEL-DARWIN: bb.0.entry:
107+
; DAGISEL-DARWIN-NEXT: liveins: $x0
108+
; DAGISEL-DARWIN-NEXT: {{ $}}
109+
; DAGISEL-DARWIN-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
110+
; DAGISEL-DARWIN-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
111+
; DAGISEL-DARWIN-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
112+
; DAGISEL-DARWIN-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
113+
; DAGISEL-DARWIN-NEXT: $x16 = COPY [[COPY]]
114+
; DAGISEL-DARWIN-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
115+
; DAGISEL-DARWIN-NEXT: AUTx16x17 2, 42, killed [[COPY1]], implicit-def $x16, implicit-def dead $x17, implicit-def dead $nzcv, implicit $x16
116+
; DAGISEL-DARWIN-NEXT: [[COPY2:%[0-9]+]]:gpr64all = COPY $x16
117+
; DAGISEL-DARWIN-NEXT: $x0 = COPY [[COPY2]]
118+
; DAGISEL-DARWIN-NEXT: RET_ReallyLR implicit $x0
119119
;
120-
; GISEL-LABEL: name: blend_and_auth_same_bb
121-
; GISEL: bb.1.entry:
122-
; GISEL-NEXT: liveins: $x0
123-
; GISEL-NEXT: {{ $}}
124-
; GISEL-NEXT: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
125-
; GISEL-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
126-
; GISEL-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
127-
; GISEL-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
128-
; GISEL-NEXT: $x16 = COPY [[COPY]]
129-
; GISEL-NEXT: $x17 = IMPLICIT_DEF
130-
; GISEL-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
131-
; GISEL-NEXT: AUT 2, 42, [[COPY1]], implicit-def $x16, implicit-def $x17, implicit-def dead $nzcv, implicit $x16
132-
; GISEL-NEXT: [[COPY2:%[0-9]+]]:gpr64 = COPY $x16
133-
; GISEL-NEXT: $x0 = COPY [[COPY2]]
134-
; GISEL-NEXT: RET_ReallyLR implicit $x0
120+
; GISEL-DARWIN-LABEL: name: blend_and_auth_same_bb
121+
; GISEL-DARWIN: bb.1.entry:
122+
; GISEL-DARWIN-NEXT: liveins: $x0
123+
; GISEL-DARWIN-NEXT: {{ $}}
124+
; GISEL-DARWIN-NEXT: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
125+
; GISEL-DARWIN-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
126+
; GISEL-DARWIN-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
127+
; GISEL-DARWIN-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
128+
; GISEL-DARWIN-NEXT: $x16 = COPY [[COPY]]
129+
; GISEL-DARWIN-NEXT: $x17 = IMPLICIT_DEF
130+
; GISEL-DARWIN-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
131+
; GISEL-DARWIN-NEXT: AUTx16x17 2, 42, [[COPY1]], implicit-def $x16, implicit-def $x17, implicit-def dead $nzcv, implicit $x16
132+
; GISEL-DARWIN-NEXT: [[COPY2:%[0-9]+]]:gpr64 = COPY $x16
133+
; GISEL-DARWIN-NEXT: $x0 = COPY [[COPY2]]
134+
; GISEL-DARWIN-NEXT: RET_ReallyLR implicit $x0
135+
;
136+
; DAGISEL-ELF-LABEL: name: blend_and_auth_same_bb
137+
; DAGISEL-ELF: bb.0.entry:
138+
; DAGISEL-ELF-NEXT: liveins: $x0
139+
; DAGISEL-ELF-NEXT: {{ $}}
140+
; DAGISEL-ELF-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
141+
; DAGISEL-ELF-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
142+
; DAGISEL-ELF-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
143+
; DAGISEL-ELF-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
144+
; DAGISEL-ELF-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
145+
; DAGISEL-ELF-NEXT: [[AUTxMxN:%[0-9]+]]:gpr64, [[AUTxMxN1:%[0-9]+]]:gpr64common = AUTxMxN [[COPY]], 2, 42, killed [[COPY1]], implicit-def dead $nzcv
146+
; DAGISEL-ELF-NEXT: $x0 = COPY [[AUTxMxN]]
147+
; DAGISEL-ELF-NEXT: RET_ReallyLR implicit $x0
148+
;
149+
; GISEL-ELF-LABEL: name: blend_and_auth_same_bb
150+
; GISEL-ELF: bb.1.entry:
151+
; GISEL-ELF-NEXT: liveins: $x0
152+
; GISEL-ELF-NEXT: {{ $}}
153+
; GISEL-ELF-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
154+
; GISEL-ELF-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
155+
; GISEL-ELF-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
156+
; GISEL-ELF-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
157+
; GISEL-ELF-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
158+
; GISEL-ELF-NEXT: [[AUTxMxN:%[0-9]+]]:gpr64, [[AUTxMxN1:%[0-9]+]]:gpr64common = AUTxMxN [[COPY]], 2, 42, [[COPY1]], implicit-def dead $nzcv
159+
; GISEL-ELF-NEXT: $x0 = COPY [[AUTxMxN]]
160+
; GISEL-ELF-NEXT: RET_ReallyLR implicit $x0
135161
entry:
136162
%addrdisc = load i64, ptr @discvar
137163
%disc = call i64 @llvm.ptrauth.blend(i64 %addrdisc, i64 42)
@@ -220,61 +246,112 @@ entry:
220246
; making them harder to express via ISD::PtrAuthGlobalAddress.
221247

222248
define i64 @blend_and_auth_different_bbs(i64 %addr, i64 %cond) {
223-
; DAGISEL-LABEL: name: blend_and_auth_different_bbs
224-
; DAGISEL: bb.0.entry:
225-
; DAGISEL-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
226-
; DAGISEL-NEXT: liveins: $x0, $x1
227-
; DAGISEL-NEXT: {{ $}}
228-
; DAGISEL-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x1
229-
; DAGISEL-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x0
230-
; DAGISEL-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
231-
; DAGISEL-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
232-
; DAGISEL-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
233-
; DAGISEL-NEXT: [[COPY2:%[0-9]+]]:gpr64noip = COPY [[MOVKXi]]
234-
; DAGISEL-NEXT: CBZX [[COPY]], %bb.2
235-
; DAGISEL-NEXT: B %bb.1
236-
; DAGISEL-NEXT: {{ $}}
237-
; DAGISEL-NEXT: bb.1.next:
238-
; DAGISEL-NEXT: successors: %bb.2(0x80000000)
239-
; DAGISEL-NEXT: {{ $}}
240-
; DAGISEL-NEXT: [[COPY3:%[0-9]+]]:gpr64common = COPY [[COPY2]]
241-
; DAGISEL-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY3]]
242-
; DAGISEL-NEXT: {{ $}}
243-
; DAGISEL-NEXT: bb.2.exit:
244-
; DAGISEL-NEXT: $x16 = COPY [[COPY1]]
245-
; DAGISEL-NEXT: [[COPY4:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
246-
; DAGISEL-NEXT: AUT 2, 42, [[COPY4]], implicit-def $x16, implicit-def dead $x17, implicit-def dead $nzcv, implicit $x16
247-
; DAGISEL-NEXT: [[COPY5:%[0-9]+]]:gpr64all = COPY $x16
248-
; DAGISEL-NEXT: $x0 = COPY [[COPY5]]
249-
; DAGISEL-NEXT: RET_ReallyLR implicit $x0
249+
; DAGISEL-DARWIN-LABEL: name: blend_and_auth_different_bbs
250+
; DAGISEL-DARWIN: bb.0.entry:
251+
; DAGISEL-DARWIN-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
252+
; DAGISEL-DARWIN-NEXT: liveins: $x0, $x1
253+
; DAGISEL-DARWIN-NEXT: {{ $}}
254+
; DAGISEL-DARWIN-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x1
255+
; DAGISEL-DARWIN-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x0
256+
; DAGISEL-DARWIN-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
257+
; DAGISEL-DARWIN-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
258+
; DAGISEL-DARWIN-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
259+
; DAGISEL-DARWIN-NEXT: [[COPY2:%[0-9]+]]:gpr64noip = COPY [[MOVKXi]]
260+
; DAGISEL-DARWIN-NEXT: CBZX [[COPY]], %bb.2
261+
; DAGISEL-DARWIN-NEXT: B %bb.1
262+
; DAGISEL-DARWIN-NEXT: {{ $}}
263+
; DAGISEL-DARWIN-NEXT: bb.1.next:
264+
; DAGISEL-DARWIN-NEXT: successors: %bb.2(0x80000000)
265+
; DAGISEL-DARWIN-NEXT: {{ $}}
266+
; DAGISEL-DARWIN-NEXT: [[COPY3:%[0-9]+]]:gpr64common = COPY [[COPY2]]
267+
; DAGISEL-DARWIN-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY3]]
268+
; DAGISEL-DARWIN-NEXT: {{ $}}
269+
; DAGISEL-DARWIN-NEXT: bb.2.exit:
270+
; DAGISEL-DARWIN-NEXT: $x16 = COPY [[COPY1]]
271+
; DAGISEL-DARWIN-NEXT: [[COPY4:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
272+
; DAGISEL-DARWIN-NEXT: AUTx16x17 2, 42, [[COPY4]], implicit-def $x16, implicit-def dead $x17, implicit-def dead $nzcv, implicit $x16
273+
; DAGISEL-DARWIN-NEXT: [[COPY5:%[0-9]+]]:gpr64all = COPY $x16
274+
; DAGISEL-DARWIN-NEXT: $x0 = COPY [[COPY5]]
275+
; DAGISEL-DARWIN-NEXT: RET_ReallyLR implicit $x0
250276
;
251-
; GISEL-LABEL: name: blend_and_auth_different_bbs
252-
; GISEL: bb.1.entry:
253-
; GISEL-NEXT: successors: %bb.2(0x50000000), %bb.3(0x30000000)
254-
; GISEL-NEXT: liveins: $x0, $x1
255-
; GISEL-NEXT: {{ $}}
256-
; GISEL-NEXT: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
257-
; GISEL-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
258-
; GISEL-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
259-
; GISEL-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
260-
; GISEL-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
261-
; GISEL-NEXT: CBZX [[COPY1]], %bb.3
262-
; GISEL-NEXT: B %bb.2
263-
; GISEL-NEXT: {{ $}}
264-
; GISEL-NEXT: bb.2.next:
265-
; GISEL-NEXT: successors: %bb.3(0x80000000)
266-
; GISEL-NEXT: {{ $}}
267-
; GISEL-NEXT: [[COPY2:%[0-9]+]]:gpr64common = COPY [[MOVKXi]]
268-
; GISEL-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY2]]
269-
; GISEL-NEXT: {{ $}}
270-
; GISEL-NEXT: bb.3.exit:
271-
; GISEL-NEXT: $x16 = COPY [[COPY]]
272-
; GISEL-NEXT: $x17 = IMPLICIT_DEF
273-
; GISEL-NEXT: [[COPY3:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
274-
; GISEL-NEXT: AUT 2, 42, [[COPY3]], implicit-def $x16, implicit-def $x17, implicit-def dead $nzcv, implicit $x16
275-
; GISEL-NEXT: [[COPY4:%[0-9]+]]:gpr64 = COPY $x16
276-
; GISEL-NEXT: $x0 = COPY [[COPY4]]
277-
; GISEL-NEXT: RET_ReallyLR implicit $x0
277+
; GISEL-DARWIN-LABEL: name: blend_and_auth_different_bbs
278+
; GISEL-DARWIN: bb.1.entry:
279+
; GISEL-DARWIN-NEXT: successors: %bb.2(0x50000000), %bb.3(0x30000000)
280+
; GISEL-DARWIN-NEXT: liveins: $x0, $x1
281+
; GISEL-DARWIN-NEXT: {{ $}}
282+
; GISEL-DARWIN-NEXT: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
283+
; GISEL-DARWIN-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
284+
; GISEL-DARWIN-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
285+
; GISEL-DARWIN-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
286+
; GISEL-DARWIN-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
287+
; GISEL-DARWIN-NEXT: CBZX [[COPY1]], %bb.3
288+
; GISEL-DARWIN-NEXT: B %bb.2
289+
; GISEL-DARWIN-NEXT: {{ $}}
290+
; GISEL-DARWIN-NEXT: bb.2.next:
291+
; GISEL-DARWIN-NEXT: successors: %bb.3(0x80000000)
292+
; GISEL-DARWIN-NEXT: {{ $}}
293+
; GISEL-DARWIN-NEXT: [[COPY2:%[0-9]+]]:gpr64common = COPY [[MOVKXi]]
294+
; GISEL-DARWIN-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY2]]
295+
; GISEL-DARWIN-NEXT: {{ $}}
296+
; GISEL-DARWIN-NEXT: bb.3.exit:
297+
; GISEL-DARWIN-NEXT: $x16 = COPY [[COPY]]
298+
; GISEL-DARWIN-NEXT: $x17 = IMPLICIT_DEF
299+
; GISEL-DARWIN-NEXT: [[COPY3:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
300+
; GISEL-DARWIN-NEXT: AUTx16x17 2, 42, [[COPY3]], implicit-def $x16, implicit-def $x17, implicit-def dead $nzcv, implicit $x16
301+
; GISEL-DARWIN-NEXT: [[COPY4:%[0-9]+]]:gpr64 = COPY $x16
302+
; GISEL-DARWIN-NEXT: $x0 = COPY [[COPY4]]
303+
; GISEL-DARWIN-NEXT: RET_ReallyLR implicit $x0
304+
;
305+
; DAGISEL-ELF-LABEL: name: blend_and_auth_different_bbs
306+
; DAGISEL-ELF: bb.0.entry:
307+
; DAGISEL-ELF-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
308+
; DAGISEL-ELF-NEXT: liveins: $x0, $x1
309+
; DAGISEL-ELF-NEXT: {{ $}}
310+
; DAGISEL-ELF-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x1
311+
; DAGISEL-ELF-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x0
312+
; DAGISEL-ELF-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
313+
; DAGISEL-ELF-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
314+
; DAGISEL-ELF-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
315+
; DAGISEL-ELF-NEXT: [[COPY2:%[0-9]+]]:gpr64 = COPY [[MOVKXi]]
316+
; DAGISEL-ELF-NEXT: CBZX [[COPY]], %bb.2
317+
; DAGISEL-ELF-NEXT: B %bb.1
318+
; DAGISEL-ELF-NEXT: {{ $}}
319+
; DAGISEL-ELF-NEXT: bb.1.next:
320+
; DAGISEL-ELF-NEXT: successors: %bb.2(0x80000000)
321+
; DAGISEL-ELF-NEXT: {{ $}}
322+
; DAGISEL-ELF-NEXT: [[COPY3:%[0-9]+]]:gpr64common = COPY [[COPY2]]
323+
; DAGISEL-ELF-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY3]]
324+
; DAGISEL-ELF-NEXT: {{ $}}
325+
; DAGISEL-ELF-NEXT: bb.2.exit:
326+
; DAGISEL-ELF-NEXT: [[COPY4:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
327+
; DAGISEL-ELF-NEXT: [[AUTxMxN:%[0-9]+]]:gpr64, [[AUTxMxN1:%[0-9]+]]:gpr64common = AUTxMxN [[COPY1]], 2, 42, [[COPY4]], implicit-def dead $nzcv
328+
; DAGISEL-ELF-NEXT: $x0 = COPY [[AUTxMxN]]
329+
; DAGISEL-ELF-NEXT: RET_ReallyLR implicit $x0
330+
;
331+
; GISEL-ELF-LABEL: name: blend_and_auth_different_bbs
332+
; GISEL-ELF: bb.1.entry:
333+
; GISEL-ELF-NEXT: successors: %bb.2(0x50000000), %bb.3(0x30000000)
334+
; GISEL-ELF-NEXT: liveins: $x0, $x1
335+
; GISEL-ELF-NEXT: {{ $}}
336+
; GISEL-ELF-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
337+
; GISEL-ELF-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
338+
; GISEL-ELF-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
339+
; GISEL-ELF-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
340+
; GISEL-ELF-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
341+
; GISEL-ELF-NEXT: CBZX [[COPY1]], %bb.3
342+
; GISEL-ELF-NEXT: B %bb.2
343+
; GISEL-ELF-NEXT: {{ $}}
344+
; GISEL-ELF-NEXT: bb.2.next:
345+
; GISEL-ELF-NEXT: successors: %bb.3(0x80000000)
346+
; GISEL-ELF-NEXT: {{ $}}
347+
; GISEL-ELF-NEXT: [[COPY2:%[0-9]+]]:gpr64common = COPY [[MOVKXi]]
348+
; GISEL-ELF-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY2]]
349+
; GISEL-ELF-NEXT: {{ $}}
350+
; GISEL-ELF-NEXT: bb.3.exit:
351+
; GISEL-ELF-NEXT: [[COPY3:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
352+
; GISEL-ELF-NEXT: [[AUTxMxN:%[0-9]+]]:gpr64, [[AUTxMxN1:%[0-9]+]]:gpr64common = AUTxMxN [[COPY]], 2, 42, [[COPY3]], implicit-def dead $nzcv
353+
; GISEL-ELF-NEXT: $x0 = COPY [[AUTxMxN]]
354+
; GISEL-ELF-NEXT: RET_ReallyLR implicit $x0
278355
entry:
279356
%addrdisc = load i64, ptr @discvar
280357
%disc = call i64 @llvm.ptrauth.blend(i64 %addrdisc, i64 42)

0 commit comments

Comments
 (0)