Skip to content
Commit 65277a2b authored by Tim Northover's avatar Tim Northover
Browse files

LegalizeDAG: make sure cast is unsigned before using FP_TO_UINT.

It's valid to use FP_TO_SINT when asking for a smaller type (e.g. all
"unsigned int16" values fit into a "signed int32"), but the reverse
isn't true.

Unfortunately, I'm not actually aware of any architecture with
asymmetric FP_TO_SINT and FP_TO_UINT handling and the logic happens to
work in the symmetric case, so I can't actually write a test for this.

llvm-svn: 210986
parent dbecc3b3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment