[PATCH] D12139: Add 'strlen' formation to LoopIdiomRecognize

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 00:47:44 PDT 2015


sanjoy added inline comments.

================
Comment at: lib/Transforms/Scalar/LoopIdiomRecognize.cpp:1083
@@ +1082,3 @@
+    case Instruction::Add:
+    case Instruction::GetElementPtr:
+    case Instruction::ZExt:
----------------
sanjoy wrote:
> What if these have uses outside the loop?  Also why these specifically?  Why not also handle, say, `mul`?
> What if these have uses outside the loop?

I'll redact this bit -- I had initially missed what you were doing with the splicing logic below.


Repository:
  rL LLVM

http://reviews.llvm.org/D12139





More information about the llvm-commits mailing list