diff options
| author | Sanjay Patel <spatel@rotateright.com> | 2017-05-17 14:21:19 +0000 |
|---|---|---|
| committer | Sanjay Patel <spatel@rotateright.com> | 2017-05-17 14:21:19 +0000 |
| commit | b2e7003103b77207fca8fabe9a7bd1a88079c3ad (patch) | |
| tree | 6de041da7e9c717b8d9da535c4d12f2d929ce7e5 /llvm/lib/Transforms/Coroutines | |
| parent | dbc3911ce2b66003122752873902fe1a69b74a92 (diff) | |
| download | bcm5719-llvm-b2e7003103b77207fca8fabe9a7bd1a88079c3ad.tar.gz bcm5719-llvm-b2e7003103b77207fca8fabe9a7bd1a88079c3ad.zip | |
[InstCombine] add isCanonicalPredicate() helper function and use it; NFCI
There should be a slight efficiency improvement from handling icmp/fcmp with one matcher and reducing duplicated code.
The larger motivation is that there are questions about how predicate canonicalization is handled, and the refactoring
should make it easier if we want to change any of that behavior.
1. As noted in the code comment, we've chosen 3 of the 16 FCMP preds as not canonical. Why those 3? It goes back to
rL32751 from what I can tell, but I'm not sure if there's a justification for that rule.
2. We currently do not canonicalize integer select conditions. Should we use the same rule that applies to branches
for selects?
3. We currently do canonicalize some FP select conditions, and those rules would conflict with the rule shown here.
Should one or both be changed?
No-functional-change-intended, but adding tests anyway because there's no coverage for most of the predicates.
Differential Revision: https://reviews.llvm.org/D33247
llvm-svn: 303261
Diffstat (limited to 'llvm/lib/Transforms/Coroutines')
0 files changed, 0 insertions, 0 deletions

