]> granicus.if.org Git - llvm/commit
[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering
authorMandeep Singh Grang <mgrang@codeaurora.org>
Tue, 28 Nov 2017 19:55:54 +0000 (19:55 +0000)
committerMandeep Singh Grang <mgrang@codeaurora.org>
Tue, 28 Nov 2017 19:55:54 +0000 (19:55 +0000)
commitc0c70f9b720e81bbb5adf9ab24e68ae90de390c5
tree911538d516666e58138c3cc8673779a855b12152
parent219ddf4678749fb554e5bb758a57676929cc0179
[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering

Summary:
Recommitting this with the correct sorting predicate. The Low field of Clusters is a ConstantInt and
cannot be directly compared. So we needed to invoke slt (signed less than) to compare correctly.

This fixes failures in the following tests uncovered by D39245:

LLVM :: CodeGen/ARM/ifcvt3.ll
LLVM :: CodeGen/ARM/switch-minsize.ll
LLVM :: CodeGen/X86/switch.ll
LLVM :: CodeGen/X86/switch-bt.ll
LLVM :: CodeGen/X86/switch-density.ll

Reviewers: hans, fhahn

Reviewed By: hans

Subscribers: aemerson, llvm-commits, kristof.beyls

Differential Revision: https://reviews.llvm.org/D40541

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@319210 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp