[PATCH] D33164: [Profile[ Enhance expect lowering to handle correlated branches

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 14:43:02 PDT 2017


davidxl marked 4 inline comments as done.
davidxl added inline comments.


================
Comment at: lib/Transforms/Scalar/LowerExpectIntrinsic.cpp:112-119
+        if (ConstantInt *CInt = dyn_cast<ConstantInt>(Opnd0)) {
+          V = Opnd1;
+          if (CInt->getZExtValue())
+            ValueInverted = !ValueInverted;
+        } else if (ConstantInt *CInt = dyn_cast<ConstantInt>(Opnd1)) {
+          V = Opnd0;
+          if (CInt->getZExtValue())
----------------
wmi wrote:
> BinaryOp should already be canonicalized here, so ConstantInt will be in Opnd1.
Done. added an assert.


https://reviews.llvm.org/D33164





More information about the llvm-commits mailing list