[PATCH] D31396: [X86][LLVM][Canonical Compare Intrinsics] Creating a canonical representation for X86 CMP intrinsics
Filipe Cabecinhas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 3 08:23:59 PDT 2017
filcab added inline comments.
================
Comment at: lib/Transforms/InstCombine/InstCombineCalls.cpp:1590
+ // The three first bits represent:
+ // equal, less than ,Less-than-or-equal ,Unordered, Not-equal,
+ // Not less than , Not Less-than-or-equal and Ordered.
----------------
Spaces after commas, not before. Please be consistent in capitalization and hyphenation.
================
Comment at: test/Transforms/InstCombine/X86CanonicCmp.ll:5
+
+define zeroext i32 @fucntionTets(<2 x double> %a, <4 x double> %b, <8 x double> %c, <4 x float> %d, <8 x float> %e, <16 x float> %f) local_unnamed_addr #0 {
+entry:
----------------
Typo in the function name (it could also be a bit more specific).
Please explain what a canonical compare is in the comment.
Or simply something like:
```Transform compare(constant, variable, comparison, ...) into compare(variable, constant, flip(comparison), ...)```
================
Comment at: test/Transforms/InstCombine/X86CanonicCmp.ll:48
+ %andF = and i32 %and1011, %conv28
+ ret i32 %andF
+}
----------------
What's happening here?
Can you get more meaningful names and maybe do a log2 `and` chain?
https://reviews.llvm.org/D31396
More information about the llvm-commits
mailing list