[PATCH] Fix crash in LICM due to unreachable uses after LCSSA

Amara Emerson amara.emerson at arm.com
Thu Jun 19 02:42:51 PDT 2014


Hi chandlerc,

This patch fixes a crash in LICM due to an unreachable use being missed by LCSSA (pr19798).

As LCSSA needs to check uses of all loop definitions, I've had to remove the early-exit optimisation to avoid scanning uses of blocks which don't dominate loop exits (and it's associated test). This may have an impact on compile times for large loops, but I'm not sure of any alternatives here.

Review appreciated.

http://reviews.llvm.org/D4207

Files:
  lib/Transforms/Utils/LCSSA.cpp
  test/Transforms/LCSSA/unreachable-use.ll
  test/Transforms/LCSSA/unreachable-uses-undef.ll
  test/Transforms/LICM/pr19798-lcssa-unreachable-crash.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4207.10618.patch
Type: text/x-patch
Size: 7249 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140619/1c173fbf/attachment.bin>


More information about the llvm-commits mailing list