[llvm] 3540b80 - [llvm-exegesis] Fix 44b9942898c7.
Clement Courbet via llvm-commits
llvm-commits at lists.llvm.org
Mon Dec 2 07:14:12 PST 2019
Author: Clement Courbet
Date: 2019-12-02T16:13:27+01:00
New Revision: 3540b80fe445ec467cba5e4cab2a4865bb945639
URL: https://github.com/llvm/llvm-project/commit/3540b80fe445ec467cba5e4cab2a4865bb945639
DIFF: https://github.com/llvm/llvm-project/commit/3540b80fe445ec467cba5e4cab2a4865bb945639.diff
LOG: [llvm-exegesis] Fix 44b9942898c7.
Summary:
Add missing stack release instructions in
loadImplicitRegAndFinalize.
Reviewers: pengfei, gchatelet
Subscribers: tschuett, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D70903
Added:
llvm/test/tools/llvm-exegesis/X86/latency-SQRTSSr.s
Modified:
llvm/tools/llvm-exegesis/lib/X86/Target.cpp
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-exegesis/X86/latency-SQRTSSr.s b/llvm/test/tools/llvm-exegesis/X86/latency-SQRTSSr.s
new file mode 100644
index 000000000000..1908b9a9e073
--- /dev/null
+++ b/llvm/test/tools/llvm-exegesis/X86/latency-SQRTSSr.s
@@ -0,0 +1,13 @@
+# RUN: llvm-exegesis -mode=latency -opcode-name=SQRTSSr -repetition-mode=loop | FileCheck %s
+
+# Check that the setup code for MXCSR does not crash the snippet.
+
+CHECK: ---
+CHECK-NEXT: mode: latency
+CHECK-NEXT: key:
+CHECK-NEXT: instructions:
+CHECK-NEXT: SQRTSSr
+CHECK-NEXT: config: ''
+CHECK-NEXT: register_initial_values:
+CHECK-NOT: crashed
+CHECK-LAST: ...
diff --git a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
index 08724dd41526..61da38e5f5dd 100644
--- a/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
+++ b/llvm/tools/llvm-exegesis/lib/X86/Target.cpp
@@ -513,6 +513,7 @@ ConstantInliner::loadImplicitRegAndFinalize(unsigned Opcode, unsigned Value) {
.addReg(0) // IndexReg
.addImm(0) // Disp
.addReg(0)); // Segment
+ add(releaseStackSpace(4));
return std::move(Instructions);
}
More information about the llvm-commits
mailing list