Skip to content
Commit 7fd1d725 authored by Pete Cooper's avatar Pete Cooper
Browse files

Use a logical not when inverting SetCC. This unfortunately doesn't fire on...

Use a logical not when inverting SetCC.  This unfortunately doesn't fire on any targets so I couldn't find a test case to trigger it.

The problem occurs when a non-i1 setcc is inverted.  For example 'i8 = setcc' will get 'xor 0xff' to invert this.   This is clearly wrong when the boolean contents are ZeroOrOne.

This patch introduces getLogicalNOT and updates SetCC legalisation to use it.

Reviewed by Hal Finkel.

llvm-svn: 208641
parent 5d78558c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment