[PATCH] D36069: [X86][InstCombine] Add some constant folding for BZHI intrinsics

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 00:37:12 PDT 2017


RKSimon added a comment.

LGTM



================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:2282
+      if (Index >= BitWidth)
+        return replaceInstUsesWith(CI, II->getArgOperand(0));
+      if (Index == 0)
----------------
RKSimon wrote:
> Can we support this case? It guarantees that the CF flag is set.
Sorry that was rubbish - yes we can fold this.


https://reviews.llvm.org/D36069





More information about the llvm-commits mailing list