Fix integer mod.
authorSteve K <srk@LunarG.com>
Wed, 1 Oct 2014 13:21:15 +0000 (07:21 -0600)
committerCourtney Goeltzenleuchter <courtney@LunarG.com>
Fri, 31 Oct 2014 21:29:14 +0000 (15:29 -0600)
icd/intel/compiler/shader/glsl_glass_backend_translator.cpp

index f1f1145fa5022424ba8dd1e1868650c2759deb37..8401055fdd9068f227328e7bc4fbe1b45d0188b2 100644 (file)
@@ -3619,7 +3619,7 @@ void MesaGlassTranslator::addInstruction(const llvm::Instruction* llvmInst, bool
     case llvm::Instruction::SDiv:           // fall through...
     case llvm::Instruction::FDiv:           return emitOp<2>(ir_binop_div,     llvmInst);
     case llvm::Instruction::URem:           // fall through...
-    case llvm::Instruction::SRem:           // fall through...
+    case llvm::Instruction::SRem:           return emitOp<2>(ir_binop_mod,     llvmInst);
     case llvm::Instruction::FRem:           return emitFn("mod", llvmInst);
     case llvm::Instruction::Shl:            return emitOp<2>(ir_binop_lshift,  llvmInst);
     case llvm::Instruction::LShr:           // fall through