[InstCombine] exclude bitcast of ppc_fp128 in icmp signbit fold
authorSanjay Patel <spatel@rotateright.com>
Wed, 8 Apr 2020 12:54:28 +0000 (08:54 -0400)
committerSanjay Patel <spatel@rotateright.com>
Wed, 8 Apr 2020 12:56:19 +0000 (08:56 -0400)
commita1c05fe20f3def1f1be9f50d2adefc6b6f1578ad
tree877db101b6c10a943c67df6bb609fe9a11f5bb80
parent5e5d36671833e186e847e74bb5ed0c559625b906
[InstCombine] exclude bitcast of ppc_fp128 in icmp signbit fold

Based on the post-commit comments for rG0f56bbc, there might
be a problem with this transform:

(bitcast (fpext/fptrunc X)) to iX) < 0 --> (bitcast X to iY) < 0

...and the ppc_fp128 data type, so conservatively bypass if we
are bitcasting a ppc_fp128.

We might be able to account for endian or other differences to
enable this for PowerPC again if that is useful.

Differential Revision: https://reviews.llvm.org/D77642
llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp
llvm/test/Transforms/InstCombine/icmp.ll