Closed Bug 538514 Opened 15 years ago Closed 14 years ago

nanojit: ExprFilter::ins2(): uses isconstq() when isconstf() would be appropriate

Categories

(Core Graveyard :: Nanojit, defect)

x86_64
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 541030
Future

People

(Reporter: edwsmith, Assigned: n.nethercote)

References

Details

else if (oprnd1->isconstq() && oprnd2->isconstq())
        {
            double c1 = oprnd1->imm64f();
            double c2 = oprnd2->imm64f();
...

all the handled cases are float const folding, so might as well check for isconstf().

Found this when looking to add missing cases for 64bit ALU operations.
Blocks: 534309
Well spotted.  There are similar cases in ins1(): qlo, qhi, fneg.

(qlo is a tricky case;  it's currently used on both F64 and I64 values.  We'll need to create a new opcode to separate these clearly for the type-checker.  For now we can just change it's isconstq() to isconstf() in ins1().)
Component: JIT Compiler (NanoJIT) → Nanojit
Product: Tamarin → Core
QA Contact: nanojit → nanojit
Target Milestone: --- → Future
Assignee: nobody → nnethercote
Depends on: 540368
Summary: ExprFilter::ins2(): uses isconstq() when isconstf() would be appropriate → nanojit: ExprFilter::ins2(): uses isconstq() when isconstf() would be appropriate
Actually, isconstq() succeeds for LIR_float and LIR_quad at the moment, so this actually works.  isconstq() should eventually only succeed for LIR_quad, so this change should still be made.
This bug is subsumed by bug 541030.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → DUPLICATE
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.