[PATCH] D60625: [X86][SSE] Lower ICMP EQ(AND(X,C),C) -> SRA(SHL(X,LOG2(C)),BW-1) iff C is power-of-2.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 17 04:59:34 PDT 2019


RKSimon marked 2 inline comments as done.
RKSimon added inline comments.


================
Comment at: lib/Target/X86/X86ISelLowering.cpp:19925
+        Op0.hasOneUse()) {
+      KnownBits KnownOp1 = DAG.computeKnownBits(Op1);
+      if (KnownOp1.isConstant() && KnownOp1.getConstant().isPowerOf2()) {
----------------
craig.topper wrote:
> Would we not have constant folded this somewhere else already such that we could just check for all constant build_vector here?
Fixed - that was a leftover from some other experiments I was doing.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60625/new/

https://reviews.llvm.org/D60625





More information about the llvm-commits mailing list