Skip to content

Commit

Permalink
Merge branch 'misc'
Browse files Browse the repository at this point in the history
  • Loading branch information
lucvoo committed Oct 9, 2020
2 parents 26f670c + a28fcda commit 0c6896f
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ version.h: FORCE

check: all
$(Q)cd validation && ./test-suite
validation/%: $(PROGRAMS)
validation/%: $(PROGRAMS) FORCE
$(Q)validation/test-suite $*


Expand Down
2 changes: 1 addition & 1 deletion lib.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
#define ARRAY_SIZE(x) (sizeof(x)/sizeof((x)[0]))
#endif

#ifndef PATH_MAX
#ifdef __gnu_hurd__
#define PATH_MAX 4096 // Hurd doesn't define this
#endif

Expand Down
2 changes: 0 additions & 2 deletions opcode.def
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ OPCODE(FMUL, BADOP, BADOP, BADOP, 2, OPF_TARGET)
OPCODE(FDIV, BADOP, BADOP, BADOP, 2, OPF_TARGET)

/* Logical */
OPCODE(AND_BOOL, BADOP, BADOP, BADOP, 2, OPF_TARGET)
OPCODE(OR_BOOL, BADOP, BADOP, BADOP, 2, OPF_TARGET)
OPCODE(AND, BADOP, BADOP, BADOP, 2, OPF_TARGET)
OPCODE(OR, BADOP, BADOP, BADOP, 2, OPF_TARGET)
OPCODE(XOR, BADOP, BADOP, BADOP, 2, OPF_TARGET)
Expand Down
6 changes: 2 additions & 4 deletions simplify.c
Original file line number Diff line number Diff line change
Expand Up @@ -1311,13 +1311,11 @@ static int simplify_unop(struct instruction *insn)
struct instruction *def;

case OP_NOT:
def = insn->src->def;
if (def && def->opcode == OP_NOT)
if (DEF_OPCODE(def, insn->src) == OP_NOT)
return replace_with_pseudo(insn, def->src);
break;
case OP_NEG:
def = insn->src->def;
if (def && def->opcode == OP_NEG)
if (DEF_OPCODE(def, insn->src) == OP_NEG)
return replace_with_pseudo(insn, def->src);
break;
default:
Expand Down
2 changes: 1 addition & 1 deletion validation/optim/canonical-mul.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ uint xtc_umul_ytc(uint x, uint y) { return (x * 3) * (y * 2); }
* check-description:
* 1) verify that constants in mul chains are
* pushed at the right of the whole chain.
* For example '(a * 3) * b' must be canonicalized into '(a * b) * 1'
* For example '(a * 3) * b' must be canonicalized into '(a * b) * 3'
* This is needed in general for constant simplification;
* for example, for:
* '(a * 3) * (b * 2)'
Expand Down

0 comments on commit 0c6896f

Please sign in to comment.