Mercurial > hg > truffle
diff graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java @ 2853:0635ba16afe4
Reintroduce Logic subclasses, creating some Canonicalization related classes
author | Gilles Duboscq <gilles.duboscq@oracle.com> |
---|---|
date | Tue, 07 Jun 2011 15:52:55 +0200 |
parents | c6bdec623ef9 |
children | a97605b0489b |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Tue Jun 07 12:10:27 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/graph/GraphBuilder.java Tue Jun 07 15:52:55 2011 +0200 @@ -560,7 +560,18 @@ private void genLogicOp(CiKind kind, int opcode) { Value y = frameState.pop(kind); Value x = frameState.pop(kind); - frameState.push(kind, append(new Logic(opcode, x, y, graph))); + Logic v; + switch(opcode){ + case IAND: + case LAND: v = new And(kind, x, y, graph); break; + case IOR: + case LOR: v = new Or(kind, x, y, graph); break; + case IXOR: + case LXOR: v = new Xor(kind, x, y, graph); break; + default: + throw new CiBailout("should not reach"); + } + frameState.push(kind, append(v)); } private void genCompareOp(CiKind kind, int opcode, CiKind resultKind) {