summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
diff options
context:
space:
mode:
authorShuxin Yang <shuxin.llvm@gmail.com>2013-01-14 22:48:41 +0000
committerShuxin Yang <shuxin.llvm@gmail.com>2013-01-14 22:48:41 +0000
commit320f52a4b0dd0a2b6757918d39fee19cac12ecff (patch)
treebc743742a24b154db2425b0591c9de8eb474c4de /llvm/lib/Transforms/Utils/BasicBlockUtils.cpp
parentfdfc739277c9cf0b1b925bf86e94d1666083f382 (diff)
downloadbcm5719-llvm-320f52a4b0dd0a2b6757918d39fee19cac12ecff.tar.gz
bcm5719-llvm-320f52a4b0dd0a2b6757918d39fee19cac12ecff.zip
This change is to implement following rules under the condition C_A and/or C_R
--------------------------------------------------------------------------- C_A: reassociation is allowed C_R: reciprocal of a constant C is appropriate, which means - 1/C is exact, or - reciprocal is allowed and 1/C is neither a special value nor a denormal. ----------------------------------------------------------------------------- rule1: (X/C1) / C2 => X / (C2*C1) (if C_A) => X * (1/(C2*C1)) (if C_A && C_R) rule 2: X*C1 / C2 => X * (C1/C2) if C_A rule 3: (X/Y)/Z = > X/(Y*Z) (if C_A && at least one of Y and Z is symbolic value) rule 4: Z/(X/Y) = > (Z*Y)/X (similar to rule3) rule 5: C1/(X*C2) => (C1/C2) / X (if C_A) rule 6: C1/(X/C2) => (C1*C2) / X (if C_A) rule 7: C1/(C2/X) => (C1/C2) * X (if C_A) llvm-svn: 172488
Diffstat (limited to 'llvm/lib/Transforms/Utils/BasicBlockUtils.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud