llvm-project/llvm/test/CodeGen/X86/sjlj-shadow-stack-liveness.mir
Guillaume Chatelet 48904e9452 [Alignment] Use llvm::Align in MachineFunction and TargetLowering - fixes mir parsing
Summary:
This catches malformed mir files which specify alignment as log2 instead of pow2.
See https://reviews.llvm.org/D65945 for reference,

This is patch is part of a series to introduce an Alignment type.
See this thread for context: http://lists.llvm.org/pipermail/llvm-dev/2019-July/133851.html
See this patch for the introduction of the type: https://reviews.llvm.org/D64790

Reviewers: courbet

Subscribers: MatzeB, qcolombet, dschuff, arsenm, sdardis, nemanjai, jvesely, nhaehnle, hiraditya, kbarton, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, rogfer01, MartinMosbeck, brucehoult, the_o, PkmX, jocewei, jsji, Petar.Avramovic, asbirlea, s.egerton, pzheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67433

llvm-svn: 371608
2019-09-11 11:16:48 +00:00

36 lines
963 B
YAML

# RUN: llc -mtriple=x86_64-- -run-pass=finalize-isel -verify-machineinstrs -o - %s | FileCheck %s
# Check that we're not copying the kill flags with the operands from the pseudo
# instruction.
--- |
define void @bar() { ret void }
!llvm.module.flags = !{!0}
!0 = !{i32 4, !"cf-protection-return", i32 1}
...
---
name: bar
# CHECK-LABEL: name: bar
alignment: 16
tracksRegLiveness: true
body: |
bb.0:
%0:gr64 = IMPLICIT_DEF
; CHECK: %0:gr64 = IMPLICIT_DEF
EH_SjLj_LongJmp64 killed %0, 1, $noreg, 0, $noreg
; CHECK: bb.3:
; CHECK: MOV64rm %0
; CHECK-NOT: MOV64rm killed %0
; CHECK: bb.7:
; CHECK-NEXT: MOV64rm %0
; CHECK-NOT: MOV64rm killed %0
; CHECK-NEXT: MOV64rm %0
; CHECK-NOT: MOV64rm killed %0
; CHECK-NEXT: MOV64rm killed %0
; FIXME: Dummy PHI to set the property NoPHIs to false. PR38439.
bb.2:
%1:gr64 = PHI undef %1, %bb.2, undef %1, %bb.2
JMP_1 %bb.2
...