[mlir][StandardOps] Verify that the result of an integer constant is signless
authorRiver Riddle <riddleriver@gmail.com>
Thu, 10 Dec 2020 19:47:17 +0000 (11:47 -0800)
committerRiver Riddle <riddleriver@gmail.com>
Thu, 10 Dec 2020 20:40:10 +0000 (12:40 -0800)
commit1f5f006d9d53e785296d1a8fbb0e90904a5eaf60
tree5bb4648e9875a8621ffd99aecd6a918b9b12c4bf
parentb5216b2950499a95df157063d6f0cd0f9486ca8d
[mlir][StandardOps] Verify that the result of an integer constant is signless

This was missed when supported for unsigned/signed integer types was first added, and results in crashes if a user tries to create/print a constant with the incorrect integer type.

Fixes PR#46222

Differential Revision: https://reviews.llvm.org/D92981
mlir/lib/Dialect/StandardOps/IR/Ops.cpp
mlir/test/Dialect/Standard/invalid.mlir