aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/ScalarEvolutionExpander.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-10-22 18:26:21 +0000
committerDuncan Sands <baldrick@free.fr>2007-10-22 18:26:21 +0000
commit245741d2a1ccec53a87bb5d02b711244c179f07a (patch)
treec3921c9f886d2b170eb8f0c7db8f8712e267264c /lib/Analysis/ScalarEvolutionExpander.cpp
parentbee175b3dcadcc3702c9f6ac1f006aedb8ab8e59 (diff)
Fix up the logic for result expanding the various extension
operations so they work right for integers with funky bit-widths. For example, consider extending i48 to i64 on a 32 bit machine. The i64 result is expanded to 2 x i32. We know that the i48 operand will be promoted to i64, then also expanded to 2 x i32. If we had the expanded promoted operand to hand, then expanding the result would be trivial. Unfortunately at this stage we can only get hold of the promoted operand. So instead we kind of hand-expand, doing explicit shifting and truncating to get the top and bottom halves of the i64 operand into 2 x i32, which are then used to expand the result. This is harmless, because when the promoted operand is finally expanded all this bit fiddling turns into trivial operations which are eliminated either by the expansion code itself or the DAG combiner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43223 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolutionExpander.cpp')
0 files changed, 0 insertions, 0 deletions