Skip to content
Commit 8a51d8ea authored by Ulrich Weigand's avatar Ulrich Weigand
Browse files

Make InstCombineCasts.cpp:OptimizeIntToFloatBitCast endian safe.

The OptimizeIntToFloatBitCast converts shift-truncate sequences
into extractelement operations.  The computation of the element
index to be used in the resulting operation is currently only
correct for little-endian targets.

This commit fixes the element index computation to be correct
for big-endian targets as well.  If the target byte order is
unknown, the optimization cannot be performed at all.

llvm-svn: 178031
parent f299668a
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