| 970 | } |
| 971 | |
| 972 | static int getDecodedUnaryOpcode(unsigned Val, Type *Ty) { |
| 973 | bool IsFP = Ty->isFPOrFPVectorTy(); |
| 974 | // UnOps are only valid for int/fp or vector of int/fp types |
| 975 | if (!IsFP && !Ty->isIntOrIntVectorTy()) |
| 976 | return -1; |
| 977 | |
| 978 | switch (Val) { |
| 979 | default: |
| 980 | return -1; |
| 981 | case bitc::UNOP_NEG: |
| 982 | return IsFP ? Instruction::FNeg : -1; |
| 983 | } |
| 984 | } |
| 985 | |
| 986 | static int getDecodedBinaryOpcode(unsigned Val, Type *Ty) { |
| 987 | bool IsFP = Ty->isFPOrFPVectorTy(); |
no test coverage detected