From: Clement Courbet Date: Fri, 1 Jun 2018 14:49:06 +0000 (+0000) Subject: [llvm-exegesis] Fix off-by-one in llvm-exegesis documentation. X-Git-Tag: android-x86-7.1-r4~352 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1a0db4462517a6541aa6011e020dd004058bdbab;p=android-x86%2Fexternal-llvm.git [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 --- 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'