From 1a0db4462517a6541aa6011e020dd004058bdbab Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Fri, 1 Jun 2018 14:49:06 +0000 Subject: [PATCH] [llvm-exegesis] Fix off-by-one in llvm-exegesis documentation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333759 91177308-0d34-0410-b5e6-96231b3b80d8 --- docs/CommandGuide/llvm-exegesis.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/CommandGuide/llvm-exegesis.rst b/docs/CommandGuide/llvm-exegesis.rst index bd7132700d0..1cba9788584 100644 --- a/docs/CommandGuide/llvm-exegesis.rst +++ b/docs/CommandGuide/llvm-exegesis.rst @@ -67,7 +67,7 @@ To measure the latency of all instructions for the host architecture, run: .. code-block:: bash #!/bin/bash - readonly INSTRUCTIONS=$(grep INSTRUCTION_LIST_END build/lib/Target/X86/X86GenInstrInfo.inc | cut -f2 -d=) + readonly INSTRUCTIONS=$(($(grep INSTRUCTION_LIST_END build/lib/Target/X86/X86GenInstrInfo.inc | cut -f2 -d=) - 1)) for INSTRUCTION in $(seq 1 ${INSTRUCTIONS}); do ./build/bin/llvm-exegesis -mode=latency -opcode-index=${INSTRUCTION} | sed -n '/---/,$p' -- 2.11.0