ptx: add integer div and rem instruction
authorChe-Liang Chiou <clchiou@gmail.com>
Wed, 20 Apr 2011 09:28:55 +0000 (09:28 +0000)
committerChe-Liang Chiou <clchiou@gmail.com>
Wed, 20 Apr 2011 09:28:55 +0000 (09:28 +0000)
Patched by Dan Bailey

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129848 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/PTX/PTXInstrInfo.td

index 25e7ae1b6ed812b3636266e8d0802fafb7bbf7b4..972002cf6aec758bd8582897224a68ed521090f1 100644 (file)
@@ -534,6 +534,8 @@ multiclass PTX_ST_ALL<string opstr, PatFrag pat_store> {
 defm ADD : INT3<"add", add>;
 defm SUB : INT3<"sub", sub>;
 defm MUL : INT3<"mul.lo", mul>; // FIXME: Allow 32x32 -> 64 multiplies
+defm DIV : INT3<"div", udiv>;
+defm REM : INT3<"rem", urem>;
 
 ///===- Floating-Point Arithmetic Instructions ----------------------------===//