OSDN Git Service

[llvm-exegesis] Fix off-by-one in llvm-exegesis documentation.
authorClement Courbet <courbet@google.com>
Fri, 1 Jun 2018 14:49:06 +0000 (14:49 +0000)
committerClement Courbet <courbet@google.com>
Fri, 1 Jun 2018 14:49:06 +0000 (14:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333759 91177308-0d34-0410-b5e6-96231b3b80d8

docs/CommandGuide/llvm-exegesis.rst

index bd71327..1cba978 100644 (file)
@@ -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'