[SelectionDAG] Fix off by one in a compare in getOperationAction.
authorCraig Topper <craig.topper@gmail.com>
Thu, 25 May 2017 05:38:40 +0000 (05:38 +0000)
committerCraig Topper <craig.topper@gmail.com>
Thu, 25 May 2017 05:38:40 +0000 (05:38 +0000)
commit37e46bfbf5426919da5688eaee9f8af54b022110
tree41a02de242d4a814b0b91f24ad5c49f88c410c9a
parent6e770813c9e66c058ed47f15535d29d7eebbe6c7
[SelectionDAG] Fix off by one in a compare in getOperationAction.

If Op is equal to array_lengthof, the lookup would be out of bounds, but we were only checking for greater than. I suspect nothing ever passes in the equal value because its a sentinel to mark the end of the builtin opcodes and not a real opcode.

So really this fix is just so that the code looks right and makes sense.

llvm-svn: 303840
llvm/include/llvm/Target/TargetLowering.h