Skip to content

Commit 4f031ea

Browse files
committed
Update tests
1 parent fcfed92 commit 4f031ea

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
@@ -3255,10 +3255,14 @@ MachineBasicBlock *AArch64TargetLowering::EmitInstrWithCustomInserter(
32553255
case AArch64::MOVT_TIZ_PSEUDO:
32563256
return EmitZTInstr(MI, BB, AArch64::MOVT_TIZ, /*Op0IsDef=*/true);
32573257

3258-
case AArch64::AUT:
3258+
case AArch64::AUTx16x17:
32593259
fixupBlendComponents(MI, BB, MI.getOperand(1), MI.getOperand(2),
32603260
&AArch64::GPR64noipRegClass);
32613261
return BB;
3262+
case AArch64::AUTxMxN:
3263+
fixupBlendComponents(MI, BB, MI.getOperand(4), MI.getOperand(5),
3264+
&AArch64::GPR64noipRegClass);
3265+
return BB;
32623266
case AArch64::PAC:
32633267
fixupPtrauthDiscriminator(MI, BB, MI.getOperand(3), MI.getOperand(4),
32643268
&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.
@@ -166,36 +166,62 @@ entry:
166166
}
167167

168168
define i64 @blend_and_auth_same_bb(i64 %addr) {
169-
; DAGISEL-LABEL: name: blend_and_auth_same_bb
170-
; DAGISEL: bb.0.entry:
171-
; DAGISEL-NEXT: liveins: $x0
172-
; DAGISEL-NEXT: {{ $}}
173-
; DAGISEL-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
174-
; DAGISEL-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
175-
; DAGISEL-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
176-
; DAGISEL-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
177-
; DAGISEL-NEXT: $x16 = COPY [[COPY]]
178-
; DAGISEL-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
179-
; DAGISEL-NEXT: AUT 2, 42, killed [[COPY1]], implicit-def $x16, implicit-def dead $x17, implicit-def dead $nzcv, implicit $x16
180-
; DAGISEL-NEXT: [[COPY2:%[0-9]+]]:gpr64all = COPY $x16
181-
; DAGISEL-NEXT: $x0 = COPY [[COPY2]]
182-
; DAGISEL-NEXT: RET_ReallyLR implicit $x0
169+
; DAGISEL-DARWIN-LABEL: name: blend_and_auth_same_bb
170+
; DAGISEL-DARWIN: bb.0.entry:
171+
; DAGISEL-DARWIN-NEXT: liveins: $x0
172+
; DAGISEL-DARWIN-NEXT: {{ $}}
173+
; DAGISEL-DARWIN-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
174+
; DAGISEL-DARWIN-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
175+
; DAGISEL-DARWIN-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
176+
; DAGISEL-DARWIN-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
177+
; DAGISEL-DARWIN-NEXT: $x16 = COPY [[COPY]]
178+
; DAGISEL-DARWIN-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
179+
; DAGISEL-DARWIN-NEXT: AUTx16x17 2, 42, killed [[COPY1]], implicit-def $x16, implicit-def dead $x17, implicit-def dead $nzcv, implicit $x16
180+
; DAGISEL-DARWIN-NEXT: [[COPY2:%[0-9]+]]:gpr64all = COPY $x16
181+
; DAGISEL-DARWIN-NEXT: $x0 = COPY [[COPY2]]
182+
; DAGISEL-DARWIN-NEXT: RET_ReallyLR implicit $x0
183183
;
184-
; GISEL-LABEL: name: blend_and_auth_same_bb
185-
; GISEL: bb.1.entry:
186-
; GISEL-NEXT: liveins: $x0
187-
; GISEL-NEXT: {{ $}}
188-
; GISEL-NEXT: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
189-
; GISEL-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
190-
; GISEL-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
191-
; GISEL-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
192-
; GISEL-NEXT: $x16 = COPY [[COPY]]
193-
; GISEL-NEXT: $x17 = IMPLICIT_DEF
194-
; GISEL-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
195-
; GISEL-NEXT: AUT 2, 42, [[COPY1]], implicit-def $x16, implicit-def $x17, implicit-def dead $nzcv, implicit $x16
196-
; GISEL-NEXT: [[COPY2:%[0-9]+]]:gpr64 = COPY $x16
197-
; GISEL-NEXT: $x0 = COPY [[COPY2]]
198-
; GISEL-NEXT: RET_ReallyLR implicit $x0
184+
; GISEL-DARWIN-LABEL: name: blend_and_auth_same_bb
185+
; GISEL-DARWIN: bb.1.entry:
186+
; GISEL-DARWIN-NEXT: liveins: $x0
187+
; GISEL-DARWIN-NEXT: {{ $}}
188+
; GISEL-DARWIN-NEXT: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
189+
; GISEL-DARWIN-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
190+
; GISEL-DARWIN-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
191+
; GISEL-DARWIN-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
192+
; GISEL-DARWIN-NEXT: $x16 = COPY [[COPY]]
193+
; GISEL-DARWIN-NEXT: $x17 = IMPLICIT_DEF
194+
; GISEL-DARWIN-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
195+
; GISEL-DARWIN-NEXT: AUTx16x17 2, 42, [[COPY1]], implicit-def $x16, implicit-def $x17, implicit-def dead $nzcv, implicit $x16
196+
; GISEL-DARWIN-NEXT: [[COPY2:%[0-9]+]]:gpr64 = COPY $x16
197+
; GISEL-DARWIN-NEXT: $x0 = COPY [[COPY2]]
198+
; GISEL-DARWIN-NEXT: RET_ReallyLR implicit $x0
199+
;
200+
; DAGISEL-ELF-LABEL: name: blend_and_auth_same_bb
201+
; DAGISEL-ELF: bb.0.entry:
202+
; DAGISEL-ELF-NEXT: liveins: $x0
203+
; DAGISEL-ELF-NEXT: {{ $}}
204+
; DAGISEL-ELF-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
205+
; DAGISEL-ELF-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
206+
; DAGISEL-ELF-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
207+
; DAGISEL-ELF-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
208+
; DAGISEL-ELF-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
209+
; DAGISEL-ELF-NEXT: [[AUTxMxN:%[0-9]+]]:gpr64, [[AUTxMxN1:%[0-9]+]]:gpr64common = AUTxMxN [[COPY]], 2, 42, killed [[COPY1]], implicit-def dead $nzcv
210+
; DAGISEL-ELF-NEXT: $x0 = COPY [[AUTxMxN]]
211+
; DAGISEL-ELF-NEXT: RET_ReallyLR implicit $x0
212+
;
213+
; GISEL-ELF-LABEL: name: blend_and_auth_same_bb
214+
; GISEL-ELF: bb.1.entry:
215+
; GISEL-ELF-NEXT: liveins: $x0
216+
; GISEL-ELF-NEXT: {{ $}}
217+
; GISEL-ELF-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
218+
; GISEL-ELF-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
219+
; GISEL-ELF-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
220+
; GISEL-ELF-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
221+
; GISEL-ELF-NEXT: [[COPY1:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
222+
; GISEL-ELF-NEXT: [[AUTxMxN:%[0-9]+]]:gpr64, [[AUTxMxN1:%[0-9]+]]:gpr64common = AUTxMxN [[COPY]], 2, 42, [[COPY1]], implicit-def dead $nzcv
223+
; GISEL-ELF-NEXT: $x0 = COPY [[AUTxMxN]]
224+
; GISEL-ELF-NEXT: RET_ReallyLR implicit $x0
199225
entry:
200226
%addrdisc = load i64, ptr @discvar
201227
%disc = call i64 @llvm.ptrauth.blend(i64 %addrdisc, i64 42)
@@ -284,61 +310,112 @@ entry:
284310
; making them harder to express via ISD::PtrAuthGlobalAddress.
285311

286312
define i64 @blend_and_auth_different_bbs(i64 %addr, i64 %cond) {
287-
; DAGISEL-LABEL: name: blend_and_auth_different_bbs
288-
; DAGISEL: bb.0.entry:
289-
; DAGISEL-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
290-
; DAGISEL-NEXT: liveins: $x0, $x1
291-
; DAGISEL-NEXT: {{ $}}
292-
; DAGISEL-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x1
293-
; DAGISEL-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x0
294-
; DAGISEL-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
295-
; DAGISEL-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
296-
; DAGISEL-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
297-
; DAGISEL-NEXT: [[COPY2:%[0-9]+]]:gpr64noip = COPY [[MOVKXi]]
298-
; DAGISEL-NEXT: CBZX [[COPY]], %bb.2
299-
; DAGISEL-NEXT: B %bb.1
300-
; DAGISEL-NEXT: {{ $}}
301-
; DAGISEL-NEXT: bb.1.next:
302-
; DAGISEL-NEXT: successors: %bb.2(0x80000000)
303-
; DAGISEL-NEXT: {{ $}}
304-
; DAGISEL-NEXT: [[COPY3:%[0-9]+]]:gpr64common = COPY [[COPY2]]
305-
; DAGISEL-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY3]]
306-
; DAGISEL-NEXT: {{ $}}
307-
; DAGISEL-NEXT: bb.2.exit:
308-
; DAGISEL-NEXT: $x16 = COPY [[COPY1]]
309-
; DAGISEL-NEXT: [[COPY4:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
310-
; DAGISEL-NEXT: AUT 2, 42, [[COPY4]], implicit-def $x16, implicit-def dead $x17, implicit-def dead $nzcv, implicit $x16
311-
; DAGISEL-NEXT: [[COPY5:%[0-9]+]]:gpr64all = COPY $x16
312-
; DAGISEL-NEXT: $x0 = COPY [[COPY5]]
313-
; DAGISEL-NEXT: RET_ReallyLR implicit $x0
313+
; DAGISEL-DARWIN-LABEL: name: blend_and_auth_different_bbs
314+
; DAGISEL-DARWIN: bb.0.entry:
315+
; DAGISEL-DARWIN-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
316+
; DAGISEL-DARWIN-NEXT: liveins: $x0, $x1
317+
; DAGISEL-DARWIN-NEXT: {{ $}}
318+
; DAGISEL-DARWIN-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x1
319+
; DAGISEL-DARWIN-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x0
320+
; DAGISEL-DARWIN-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
321+
; DAGISEL-DARWIN-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
322+
; DAGISEL-DARWIN-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
323+
; DAGISEL-DARWIN-NEXT: [[COPY2:%[0-9]+]]:gpr64noip = COPY [[MOVKXi]]
324+
; DAGISEL-DARWIN-NEXT: CBZX [[COPY]], %bb.2
325+
; DAGISEL-DARWIN-NEXT: B %bb.1
326+
; DAGISEL-DARWIN-NEXT: {{ $}}
327+
; DAGISEL-DARWIN-NEXT: bb.1.next:
328+
; DAGISEL-DARWIN-NEXT: successors: %bb.2(0x80000000)
329+
; DAGISEL-DARWIN-NEXT: {{ $}}
330+
; DAGISEL-DARWIN-NEXT: [[COPY3:%[0-9]+]]:gpr64common = COPY [[COPY2]]
331+
; DAGISEL-DARWIN-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY3]]
332+
; DAGISEL-DARWIN-NEXT: {{ $}}
333+
; DAGISEL-DARWIN-NEXT: bb.2.exit:
334+
; DAGISEL-DARWIN-NEXT: $x16 = COPY [[COPY1]]
335+
; DAGISEL-DARWIN-NEXT: [[COPY4:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
336+
; DAGISEL-DARWIN-NEXT: AUTx16x17 2, 42, [[COPY4]], implicit-def $x16, implicit-def dead $x17, implicit-def dead $nzcv, implicit $x16
337+
; DAGISEL-DARWIN-NEXT: [[COPY5:%[0-9]+]]:gpr64all = COPY $x16
338+
; DAGISEL-DARWIN-NEXT: $x0 = COPY [[COPY5]]
339+
; DAGISEL-DARWIN-NEXT: RET_ReallyLR implicit $x0
314340
;
315-
; GISEL-LABEL: name: blend_and_auth_different_bbs
316-
; GISEL: bb.1.entry:
317-
; GISEL-NEXT: successors: %bb.2(0x50000000), %bb.3(0x30000000)
318-
; GISEL-NEXT: liveins: $x0, $x1
319-
; GISEL-NEXT: {{ $}}
320-
; GISEL-NEXT: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
321-
; GISEL-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
322-
; GISEL-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
323-
; GISEL-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
324-
; GISEL-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
325-
; GISEL-NEXT: CBZX [[COPY1]], %bb.3
326-
; GISEL-NEXT: B %bb.2
327-
; GISEL-NEXT: {{ $}}
328-
; GISEL-NEXT: bb.2.next:
329-
; GISEL-NEXT: successors: %bb.3(0x80000000)
330-
; GISEL-NEXT: {{ $}}
331-
; GISEL-NEXT: [[COPY2:%[0-9]+]]:gpr64common = COPY [[MOVKXi]]
332-
; GISEL-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY2]]
333-
; GISEL-NEXT: {{ $}}
334-
; GISEL-NEXT: bb.3.exit:
335-
; GISEL-NEXT: $x16 = COPY [[COPY]]
336-
; GISEL-NEXT: $x17 = IMPLICIT_DEF
337-
; GISEL-NEXT: [[COPY3:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
338-
; GISEL-NEXT: AUT 2, 42, [[COPY3]], implicit-def $x16, implicit-def $x17, implicit-def dead $nzcv, implicit $x16
339-
; GISEL-NEXT: [[COPY4:%[0-9]+]]:gpr64 = COPY $x16
340-
; GISEL-NEXT: $x0 = COPY [[COPY4]]
341-
; GISEL-NEXT: RET_ReallyLR implicit $x0
341+
; GISEL-DARWIN-LABEL: name: blend_and_auth_different_bbs
342+
; GISEL-DARWIN: bb.1.entry:
343+
; GISEL-DARWIN-NEXT: successors: %bb.2(0x50000000), %bb.3(0x30000000)
344+
; GISEL-DARWIN-NEXT: liveins: $x0, $x1
345+
; GISEL-DARWIN-NEXT: {{ $}}
346+
; GISEL-DARWIN-NEXT: [[COPY:%[0-9]+]]:gpr64all = COPY $x0
347+
; GISEL-DARWIN-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
348+
; GISEL-DARWIN-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
349+
; GISEL-DARWIN-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
350+
; GISEL-DARWIN-NEXT: [[MOVKXi:%[0-9]+]]:gpr64noip = MOVKXi [[LDRXui]], 42, 48
351+
; GISEL-DARWIN-NEXT: CBZX [[COPY1]], %bb.3
352+
; GISEL-DARWIN-NEXT: B %bb.2
353+
; GISEL-DARWIN-NEXT: {{ $}}
354+
; GISEL-DARWIN-NEXT: bb.2.next:
355+
; GISEL-DARWIN-NEXT: successors: %bb.3(0x80000000)
356+
; GISEL-DARWIN-NEXT: {{ $}}
357+
; GISEL-DARWIN-NEXT: [[COPY2:%[0-9]+]]:gpr64common = COPY [[MOVKXi]]
358+
; GISEL-DARWIN-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY2]]
359+
; GISEL-DARWIN-NEXT: {{ $}}
360+
; GISEL-DARWIN-NEXT: bb.3.exit:
361+
; GISEL-DARWIN-NEXT: $x16 = COPY [[COPY]]
362+
; GISEL-DARWIN-NEXT: $x17 = IMPLICIT_DEF
363+
; GISEL-DARWIN-NEXT: [[COPY3:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
364+
; GISEL-DARWIN-NEXT: AUTx16x17 2, 42, [[COPY3]], implicit-def $x16, implicit-def $x17, implicit-def dead $nzcv, implicit $x16
365+
; GISEL-DARWIN-NEXT: [[COPY4:%[0-9]+]]:gpr64 = COPY $x16
366+
; GISEL-DARWIN-NEXT: $x0 = COPY [[COPY4]]
367+
; GISEL-DARWIN-NEXT: RET_ReallyLR implicit $x0
368+
;
369+
; DAGISEL-ELF-LABEL: name: blend_and_auth_different_bbs
370+
; DAGISEL-ELF: bb.0.entry:
371+
; DAGISEL-ELF-NEXT: successors: %bb.1(0x50000000), %bb.2(0x30000000)
372+
; DAGISEL-ELF-NEXT: liveins: $x0, $x1
373+
; DAGISEL-ELF-NEXT: {{ $}}
374+
; DAGISEL-ELF-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x1
375+
; DAGISEL-ELF-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x0
376+
; DAGISEL-ELF-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
377+
; DAGISEL-ELF-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui killed [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
378+
; DAGISEL-ELF-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
379+
; DAGISEL-ELF-NEXT: [[COPY2:%[0-9]+]]:gpr64 = COPY [[MOVKXi]]
380+
; DAGISEL-ELF-NEXT: CBZX [[COPY]], %bb.2
381+
; DAGISEL-ELF-NEXT: B %bb.1
382+
; DAGISEL-ELF-NEXT: {{ $}}
383+
; DAGISEL-ELF-NEXT: bb.1.next:
384+
; DAGISEL-ELF-NEXT: successors: %bb.2(0x80000000)
385+
; DAGISEL-ELF-NEXT: {{ $}}
386+
; DAGISEL-ELF-NEXT: [[COPY3:%[0-9]+]]:gpr64common = COPY [[COPY2]]
387+
; DAGISEL-ELF-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY3]]
388+
; DAGISEL-ELF-NEXT: {{ $}}
389+
; DAGISEL-ELF-NEXT: bb.2.exit:
390+
; DAGISEL-ELF-NEXT: [[COPY4:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
391+
; DAGISEL-ELF-NEXT: [[AUTxMxN:%[0-9]+]]:gpr64, [[AUTxMxN1:%[0-9]+]]:gpr64common = AUTxMxN [[COPY1]], 2, 42, [[COPY4]], implicit-def dead $nzcv
392+
; DAGISEL-ELF-NEXT: $x0 = COPY [[AUTxMxN]]
393+
; DAGISEL-ELF-NEXT: RET_ReallyLR implicit $x0
394+
;
395+
; GISEL-ELF-LABEL: name: blend_and_auth_different_bbs
396+
; GISEL-ELF: bb.1.entry:
397+
; GISEL-ELF-NEXT: successors: %bb.2(0x50000000), %bb.3(0x30000000)
398+
; GISEL-ELF-NEXT: liveins: $x0, $x1
399+
; GISEL-ELF-NEXT: {{ $}}
400+
; GISEL-ELF-NEXT: [[COPY:%[0-9]+]]:gpr64 = COPY $x0
401+
; GISEL-ELF-NEXT: [[COPY1:%[0-9]+]]:gpr64 = COPY $x1
402+
; GISEL-ELF-NEXT: [[ADRP:%[0-9]+]]:gpr64common = ADRP target-flags(aarch64-page) @discvar
403+
; GISEL-ELF-NEXT: [[LDRXui:%[0-9]+]]:gpr64 = LDRXui [[ADRP]], target-flags(aarch64-pageoff, aarch64-nc) @discvar :: (dereferenceable load (s64) from @discvar)
404+
; GISEL-ELF-NEXT: [[MOVKXi:%[0-9]+]]:gpr64 = MOVKXi [[LDRXui]], 42, 48
405+
; GISEL-ELF-NEXT: CBZX [[COPY1]], %bb.3
406+
; GISEL-ELF-NEXT: B %bb.2
407+
; GISEL-ELF-NEXT: {{ $}}
408+
; GISEL-ELF-NEXT: bb.2.next:
409+
; GISEL-ELF-NEXT: successors: %bb.3(0x80000000)
410+
; GISEL-ELF-NEXT: {{ $}}
411+
; GISEL-ELF-NEXT: [[COPY2:%[0-9]+]]:gpr64common = COPY [[MOVKXi]]
412+
; GISEL-ELF-NEXT: INLINEASM &nop, 1 /* sideeffect attdialect */, 3866633 /* reguse:GPR64common */, [[COPY2]]
413+
; GISEL-ELF-NEXT: {{ $}}
414+
; GISEL-ELF-NEXT: bb.3.exit:
415+
; GISEL-ELF-NEXT: [[COPY3:%[0-9]+]]:gpr64noip = COPY [[LDRXui]]
416+
; GISEL-ELF-NEXT: [[AUTxMxN:%[0-9]+]]:gpr64, [[AUTxMxN1:%[0-9]+]]:gpr64common = AUTxMxN [[COPY]], 2, 42, [[COPY3]], implicit-def dead $nzcv
417+
; GISEL-ELF-NEXT: $x0 = COPY [[AUTxMxN]]
418+
; GISEL-ELF-NEXT: RET_ReallyLR implicit $x0
342419
entry:
343420
%addrdisc = load i64, ptr @discvar
344421
%disc = call i64 @llvm.ptrauth.blend(i64 %addrdisc, i64 42)

0 commit comments

Comments
 (0)