[PATCH] D70917: [NFC] Use EVT instead of bool for getSetCCInverse()

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 11:57:09 PST 2019


arichardson created this revision.
arichardson added reviewers: spatel, bogner.
Herald added subscribers: llvm-commits, jsji, atanasyan, jrtc27, kbarton, hiraditya, nhaehnle, jvesely, nemanjai, sdardis, arsenm.
Herald added a project: LLVM.

The use of a boolean isInteger flag (generally initialized using
VT.isInteger()) caused errors in our out-of-tree CHERI backend
(https://github.com/CTSRD-CHERI/llvm-project).

In our backend pointers use a separate ValueType (iFATPTR) and therefore
.isInteger() returns false. This means that getSetCCInverse() uses the
floating-point variant and generates incorrect code for us:
`(void *)0x12033091e < (void *)0xffffffffffffffff` would return false.

Committing this change will significantly reduce our merge conflicts
for each upstream merge.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D70917

Files:
  llvm/include/llvm/CodeGen/ISDOpcodes.h
  llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
  llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
  llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
  llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
  llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp
  llvm/lib/Target/AMDGPU/R600ISelLowering.cpp
  llvm/lib/Target/ARM/ARMISelLowering.cpp
  llvm/lib/Target/Mips/MipsISelLowering.cpp
  llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
  llvm/lib/Target/SystemZ/SystemZISelLowering.cpp
  llvm/lib/Target/X86/X86ISelLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D70917.231750.patch
Type: text/x-patch
Size: 21350 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191202/01c81a61/attachment-0001.bin>


More information about the llvm-commits mailing list