OSDN Git Service

[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)
commit5198106235ce56ea86a43f1d654acf9d7bb6ff22
treea21f32cdfca8a1c9cd91039b429468827bde1d9c
parent9f6280a85bdd9974c16ab79ffe51bf6b66aced58
[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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@303840 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h