summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
authorHal Finkel <hfinkel@anl.gov>2014-04-13 17:10:58 +0000
committerHal Finkel <hfinkel@anl.gov>2014-04-13 17:10:58 +0000
commitd9963c75dafbcd159206c7028264f8924c290ece (patch)
tree69ab56c0252a4f4432b958811aaf8a3ed68c47dc /llvm/lib/CodeGen/LiveVariables.cpp
parent6a7ffbed8ab434277483075b7bb3ed37ab4d5889 (diff)
downloadbcm5719-llvm-d9963c75dafbcd159206c7028264f8924c290ece.tar.gz
bcm5719-llvm-d9963c75dafbcd159206c7028264f8924c290ece.zip
[PowerPC] Fix rlwimi isel when mask is not constant
We had been using the known-zero values of the operand of the or to construct the mask for an rlwimi; this is not quite correct, but fine when the mask is constant. When the mask is constant, then the known zeros of the operand must be a superset of the zeros in the mask. However, when the mask is not a constant, then there might be bits in the operand that are not known to be zero that, at runtime, might be zero in the mask. Therefore, we check that any bits not known to be zero *are* known to be one in the mask. Otherwise, we can't fold the mask with the or and shift. This was revealed as a miscompile of MultiSource/Benchmarks/BitBench/drop3/drop3 when I started experimenting with constant hoisting. llvm-svn: 206136
Diffstat (limited to 'llvm/lib/CodeGen/LiveVariables.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud