This is an archive of the discontinued LLVM Phabricator instance.

[SelectionDAG] Make sorting predicate stronger to remove non-deterministic ordering
ClosedPublic

Authored by mgrang on Nov 27 2017, 11:23 PM.

Details

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

Diff Detail

Repository
rL LLVM

Event Timeline

mgrang created this revision.Nov 27 2017, 11:23 PM
hans accepted this revision.Nov 28 2017, 8:39 AM

Thanks! Sorry I didn't catch this last time.

This revision is now accepted and ready to land.Nov 28 2017, 8:39 AM
This revision was automatically updated to reflect the committed changes.