Files
llvm/lib/CodeGen/SelectionDAG
Sanjay Patel 1b640459b6 [DAGCombiner][x86] prevent infinite loop from truncate/extend transforms
The test case is based on the example from the post-commit thread for:
https://reviews.llvm.org/rGc9171bd0a955

This replaces the x86-specific simple-type check from:
rL367766
with a check in the DAGCombiner. Adding the check isn't
strictly necessary after the fix from:
rL367768
...but it seems likely that we're heading for trouble if
we are creating weird types in this transform.

I combined the earlier legality check into the initial
clause to simplify the code.

So we should only try the trunc/sext transform at the
earliest combine stage, but we limit the transform to
simple types anyway because the TLI hook is probably
too lax about what it considers a free truncate.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367834 91177308-0d34-0410-b5e6-96231b3b80d8
2019-08-05 11:27:07 +00:00
..