Skip to content

Commit

Permalink
Revert "Unnecessary casting unsigned 32 bit to 64 bit on x64?"
Browse files Browse the repository at this point in the history
This reverts commit 18cdffe.
  • Loading branch information
tyfkda committed Nov 19, 2024
1 parent 592593c commit 2ed77f8
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/cc/arch/x64/ir_x64.c
Original file line number Diff line number Diff line change
Expand Up @@ -927,10 +927,9 @@ static void ei_cast(IR *ir) {
assert(0 <= pows && pows < 4);
assert(0 <= powd && powd < 4);
if (ir->flag & IRF_UNSIGNED) {
if (pows == 2 && powd == 3) {
// MOVZX %64bit, %32bit doesn't exist!
if (ir->dst->phys != ir->opr1->phys)
MOV(kRegSizeTable[pows][ir->opr1->phys], kRegSizeTable[pows][ir->dst->phys]);
if (pows == 2) {
// MOVZX %32bit, %64bit doesn't exist!
MOV(kRegSizeTable[pows][ir->opr1->phys], kRegSizeTable[pows][ir->dst->phys]);
} else {
MOVZX(kRegSizeTable[pows][ir->opr1->phys], kRegSizeTable[powd][ir->dst->phys]);
}
Expand Down

0 comments on commit 2ed77f8

Please sign in to comment.