Skip to content
Commit 6124cae8 authored by Sanjay Patel's avatar Sanjay Patel
Browse files

[DAGCombine] (float)((int) f) --> ftrunc (PR36617)

fptosi / fptoui round towards zero, and that's the same behavior as ISD::FTRUNC, 
so replace a pair of casts with the equivalent node. We don't have to account for 
special cases (NaN, INF) because out-of-range casts are undefined.

Differential Revision: https://reviews.llvm.org/D44909

llvm-svn: 328921
parent 9c755450
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment