|
From: Stephen M.
|
In playing with Vex recently, I noticed that it isn't possible to choose between 1-bit values using Mul0X. Syntactically it's allowed, but iselCondCode() doesn't have any patterns to handle Mul0X, so any use of an I1 Mul0X will cause the instruction selector to panic. It seems to me that it would be better either to support this combination in the code generator, or explicitly document that it's not allowed (such as by making the IR sanity checks reject it with a reasonable error message). Supporting it would be nice from the standpoint of orthogonality, but I haven't thought of an example where using this combination would be the right thing to do in terms of generating good code. (In the example that led me to discover this, what I was doing was really better thought of as an "or" operation on I1 values.) If it would be helpful, I would be happy to work on a patch for either of the alternative solutions. -- Stephen |