[PATCH] D30099: Loop predication expand both sides of the widened condition

Artur Pilipenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 17 08:13:43 PST 2017


apilipenko created this revision.
Herald added a subscriber: mzolotukhin.

This is a fix for a loop predication bug which resulted in malformed IR generation.

Loop invariant side of the widened condition is not guaranteed to be available in the preheader as is, so we need to expand it as well. See added unsigned_loop_0_to_n_hoist_length test for example.


https://reviews.llvm.org/D30099

Files:
  lib/Transforms/Scalar/LoopPredication.cpp
  test/Transforms/LoopPredication/basic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30099.88903.patch
Type: text/x-patch
Size: 4458 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170217/7f41c917/attachment.bin>


More information about the llvm-commits mailing list