[PATCH] D47019: [X86] Lowering rotation intrinsics to native IR

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 18 12:11:49 PDT 2018


craig.topper added a comment.

Why are we going through shift intrinsics to do this? Why can't we just emit shl and lshr instructions directly?



================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:1286
+    Value *Vec = Builder.CreateVectorSplat(NumElts, Max);
+    Count = Builder.CreateURem(Count, Vec);
+    Sub = Builder.CreateSub(Vec, Count);
----------------
Just create and And with 31 or 63? I believe one of the signatures of CreateAnd even takes a uint64_t as an argument.


Repository:
  rL LLVM

https://reviews.llvm.org/D47019





More information about the llvm-commits mailing list