glsl: Add a lowering pass for 64-bit integer sign()
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
@@ -52,6 +52,7 @@
|
|||||||
|
|
||||||
/* Opertaions for lower_64bit_integer_instructions() */
|
/* Opertaions for lower_64bit_integer_instructions() */
|
||||||
#define MUL64 (1U << 0)
|
#define MUL64 (1U << 0)
|
||||||
|
#define SIGN64 (1U << 1)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \see class lower_packing_builtins_visitor
|
* \see class lower_packing_builtins_visitor
|
||||||
|
@@ -361,6 +361,13 @@ lower_64bit_visitor::handle_rvalue(ir_rvalue **rvalue)
|
|||||||
assert(ir != NULL);
|
assert(ir != NULL);
|
||||||
|
|
||||||
switch (ir->operation) {
|
switch (ir->operation) {
|
||||||
|
case ir_unop_sign:
|
||||||
|
if (lowering(SIGN64)) {
|
||||||
|
*rvalue = handle_op(ir, "__builtin_sign64", generate_ir::sign64);
|
||||||
|
this->progress = true;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case ir_binop_mul:
|
case ir_binop_mul:
|
||||||
if (lowering(MUL64)) {
|
if (lowering(MUL64)) {
|
||||||
*rvalue = handle_op(ir, "__builtin_umul64", generate_ir::umul64);
|
*rvalue = handle_op(ir, "__builtin_umul64", generate_ir::umul64);
|
||||||
|
Reference in New Issue
Block a user