[PATCH] D47631: [ValueTracking] Match select abs pattern when there's an sext involved
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 1 10:21:30 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/Analysis/ValueTracking.cpp:4618
// Set RHS to the negate operand. LHS was assigned to CmpLHS earlier.
- RHS = (CmpLHS == TrueVal) ? FalseVal : TrueVal;
+ RHS = LHSIsTrueVal ? FalseVal : TrueVal;
----------------
I think it might be better to make LHS assigned to the sign extended value here.
Repository:
rL LLVM
https://reviews.llvm.org/D47631
More information about the llvm-commits
mailing list