[PATCH] D48354: [LoopIdiomRecognize] Support for loops that use LSHR instruction added.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 24 18:23:31 PDT 2018
craig.topper added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:1569
+ InitXNext =
+ Builder.CreateLShr(InitX, ConstantInt::get(InitX->getType(), 1));
+ } else
----------------
Can you add
```
else
llvm_unreachable("Unexpected opcode!);
```
It should only be of the two shift opcodes and if for some reason that fails we should error. It also make the code behavior more obvious.
Repository:
rL LLVM
https://reviews.llvm.org/D48354
More information about the llvm-commits
mailing list