I am testing the following patch. While I was there, I made it agnostic
as to the signedness of the switch expression and cases (in Ada they can
be unsigned).
I forgot to emit a new BB after the unconditional branch to the default
label. Attached patch is otherwise the same as the previous
Hi Chris, thanks for looking at the patch.
In gcc, a switch case is a range of values that branch
to a label, for example 1 .. 17 - label. These are
emitted as individual LLVM switch cases: 1 - label,
2 - label, ..., 17 - label. This works well except,
for example, when the range is
On Wed, 2007-03-14 at 17:40 +0100, Duncan Sands wrote:
Hi Chris, thanks for looking at the patch.
In gcc, a switch case is a range of values that branch
to a label, for example 1 .. 17 - label. These are
emitted as individual LLVM switch cases: 1 - label,
2 - label, ..., 17 -
Hi Reid, thanks for replying.
Please use APInt's to do the subtraction, instead of constant
folding. Reid should be able to help you with this.
I don't understand why. If APInt's are much more efficient, then
shouldn't ConstantExpr:getSub be improved to detect this case and
I am testing the following patch. While I was there, I made it agnostic
as to the signedness of the switch expression and cases (in Ada they can
be unsigned).
Bootstraps (C, C++, Ada) and passes make check.
Duncan.
___
llvm-commits mailing list
On Mar 12, 2007, at 1:48 PM, Duncan Sands wrote:
In gcc, a switch case is a range of values that branch
to a label, for example 1 .. 17 - label. These are
emitted as individual LLVM switch cases: 1 - label,
2 - label, ..., 17 - label. This works well except,
for example, when the range is
In gcc, a switch case is a range of values that branch
to a label, for example 1 .. 17 - label. These are
emitted as individual LLVM switch cases: 1 - label,
2 - label, ..., 17 - label. This works well except,
for example, when the range is INT_MIN .. 0 - label,
in which case you can say goodbye