projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5d7231d
)
ExtractElementsOp asserts for >1 operator however it actually expects
author
Rob Suderman
<suderman@google.com>
Tue, 30 Apr 2019 16:52:38 +0000
(09:52 -0700)
committer
Mehdi Amini
<joker.eph@gmail.com>
Mon, 6 May 2019 15:22:30 +0000
(08:22 -0700)
>0 operators.
--
PiperOrigin-RevId:
245966586
mlir/lib/StandardOps/Ops.cpp
patch
|
blob
|
history
diff --git
a/mlir/lib/StandardOps/Ops.cpp
b/mlir/lib/StandardOps/Ops.cpp
index
ab600bd
..
3aa35cd
100644
(file)
--- a/
mlir/lib/StandardOps/Ops.cpp
+++ b/
mlir/lib/StandardOps/Ops.cpp
@@
-1546,7
+1546,7
@@
LogicalResult ExtractElementOp::verify() {
Attribute ExtractElementOp::constantFold(ArrayRef<Attribute> operands,
MLIRContext *context) {
- assert(
operands.size() > 1 && "extract_element takes atleast one operands
");
+ assert(
!operands.empty() && "extract_element takes atleast one operand
");
// The aggregate operand must be a known constant.
Attribute aggregate = operands.front();