[PATCH] D67766: [Float2Int] avoid crashing on unreachable code (PR38502)

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 19 07:59:03 PDT 2019


spatel created this revision.
spatel added reviewers: bevinh, jmolloy, RKSimon.
Herald added subscribers: hiraditya, mcrosier.
Herald added a project: LLVM.

In the example from:
https://bugs.llvm.org/show_bug.cgi?id=38502
...we hit infinite looping/crashing because we have non-standard IR - an instruction operand is used before defined. 
This is allowed in unreachable blocks, so I'm proposing to avoid the problem by using DominatorTree to step around the landmines.


https://reviews.llvm.org/D67766

Files:
  llvm/include/llvm/Transforms/Scalar/Float2Int.h
  llvm/lib/Transforms/Scalar/Float2Int.cpp
  llvm/test/Transforms/Float2Int/basic.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67766.220867.patch
Type: text/x-patch
Size: 4933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190919/b599fd85/attachment.bin>


More information about the llvm-commits mailing list