[llvm-commits] [llvm] r133443 - in /llvm/trunk/lib/Target/PTX: PTXAsmPrinter.cpp PTXInstrInfo.cpp PTXInstrInfo.h PTXInstrInfo.td
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Jun 20 09:59:03 PDT 2011
On Jun 20, 2011, at 8:56 AM, Justin Holewinski wrote:
> + int OpCode;
> +
> + // Select the appropriate opcode based on the register class
> + if (RC == PTX::RegI16RegisterClass) {
> + OpCode = PTX::STACKSTOREI16;
> + }
> + else if (RC == PTX::RegI32RegisterClass) {
> + OpCode = PTX::STACKSTOREI32;
> + }
> + else if (RC == PTX::RegI64RegisterClass) {
> + OpCode = PTX::STACKSTOREI32;
> + }
> + else if (RC == PTX::RegF32RegisterClass) {
> + OpCode = PTX::STACKSTOREF32;
> + }
> + else if (RC == PTX::RegF64RegisterClass) {
> + OpCode = PTX::STACKSTOREF64;
> + }
Please add an assertion for the unknown register class case.
Also, format your else-ifs like so:
} else if (..) {
/jakob
More information about the llvm-commits
mailing list