diff options
author | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-02-04 12:03:37 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-04-07 21:06:19 -0700 |
commit | caeaf72d34d1e91aaea7340241232d1d877907b7 (patch) | |
tree | c8be032fa19c1817dbdd16aac5500187f1515ed0 /simplify.c | |
parent | Simplify OP_CAST of OP_AND. (diff) | |
download | sparse-caeaf72d34d1e91aaea7340241232d1d877907b7.tar.gz sparse-caeaf72d34d1e91aaea7340241232d1d877907b7.tar.bz2 sparse-caeaf72d34d1e91aaea7340241232d1d877907b7.zip |
Split OP_CAST into signed, unsigned and FP casts.
Otherwise we lose the information what the target
type is (we only have the bit-size of the target).
Diffstat (limited to 'simplify.c')
-rw-r--r-- | simplify.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -694,7 +694,7 @@ static int simplify_branch(struct instruction *insn) return REPEAT_CSE; } } - if (def->opcode == OP_CAST) { + if (def->opcode == OP_CAST || def->opcode == OP_SCAST) { int orig_size = def->orig_type ? def->orig_type->bit_size : 0; if (def->size > orig_size) { use_pseudo(def->src, &insn->cond); @@ -770,8 +770,10 @@ int simplify_instruction(struct instruction *insn) if (dead_insn(insn, NULL, NULL, NULL)) return REPEAT_CSE | REPEAT_SYMBOL_CLEANUP; return replace_with_pseudo(insn, insn->symbol); - case OP_PTRCAST: case OP_CAST: + case OP_SCAST: + case OP_FPCAST: + case OP_PTRCAST: return simplify_cast(insn); case OP_PHI: if (dead_insn(insn, NULL, NULL, NULL)) { |