[PATCH] D36081: [X86] Improved X86::CMOV to Branch heuristic

Amjad Aboud via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 2 16:10:49 PDT 2017


aaboud added a comment.

Thanks Zvi for the comments.
Please see answers below.



================
Comment at: test/CodeGen/X86/pr33954.ll:1
+; RUN: llc -mtriple=x86_64-pc-linux -x86-cmov-converter=true -verify-machineinstrs < %s | FileCheck %s
+
----------------
zvi wrote:
> Since the -x86-cmov-converter is invoked explicitly, should the  -x86-cmov-converter-threshold=4 flag be added too?
Actually, I want to guard the threshold, whoever change it, should revisit this test.
However, this test is not guarding against turning off the CMOV optimization., it is just verifying that the optimization itself works as expected.


================
Comment at: test/CodeGen/X86/x86-cmov-converter.ll:99
+;;    int t = c[i];
+;;    if (c[i] * a > b)
+;;      t = 10;
----------------
zvi wrote:
> if (t *a> b)
Why is this important?


https://reviews.llvm.org/D36081





More information about the llvm-commits mailing list