[CODEGEN] Fixed bug that caused conditional operator to not always

properly mask load operations

Also includes minor improvement to benchmarking infrastructure
This commit is contained in:
Philippe Tillet
2021-03-07 14:53:48 -05:00
parent d1d09566b1
commit 5b9afaa688
9 changed files with 146 additions and 64 deletions

View File

@@ -32,6 +32,7 @@ private:
bool rewrite_mult(ir::instruction *value, ir::builder& builder);
bool rewrite_unit_red(ir::instruction *value, ir::builder& builder);
bool rewrite_gep_ptr_min_off_plus_off(ir::instruction *value, ir::builder& builder);
bool rewrite_select_masked_load(ir::instruction *value, ir::builder& builder);
bool rewrite_load_to_shared(ir::instruction *value, ir::builder& builder);
private:

View File

@@ -748,6 +748,9 @@ private:
public:
static instruction* create(value *pred, value *if_value, value *else_value, const std::string &name = "", instruction *next = nullptr);
value* get_pred_op() { return get_operand(0); }
value* get_if_value_op() { return get_operand(1); }
value* get_else_value_op() { return get_operand(2); }
};
//===----------------------------------------------------------------------===//