This is an archive of the discontinued LLVM Phabricator instance.

Fix checked arithmetic for i8 on X86
ClosedPublic

Authored by loladiro on May 27 2014, 4:15 AM.

Diff Detail

Event Timeline

loladiro updated this revision to Diff 9829.May 27 2014, 4:15 AM
loladiro retitled this revision from to Fix checked arithmetic for i8 on X86.
loladiro updated this object.
loladiro edited the test plan for this revision. (Show Details)
loladiro added a subscriber: Unknown Object (MLST).

Hi Keno,

Thanks for the patch.
Can you add a test for it? I think you can probably reuse the example you posted on the bugzilla to verify that we correctly test and branch.

lib/Target/X86/X86ISelLowering.cpp
11472–11475

You can simplify this into:

X86::CondCode X86Cond = Inverted ? X86::COND_E : X86::COND_NE;
loladiro updated this revision to Diff 10016.Jun 2 2014, 7:24 AM

Added test. Simplified conditional.

Hi Keno,

I only have a small request (see below). Otherwise, the patch looks good to me. Thanks!

test/CodeGen/X86/i8-umulo.ll
2–3

Please add a reference to the bugzilla.
Something like '; PR19858'

loladiro updated this revision to Diff 10021.Jun 2 2014, 8:35 AM

Add reference to the bugzilla bug.

Done. I don't have commit access though.

loladiro accepted this revision.Jun 3 2014, 9:28 AM
loladiro added a reviewer: loladiro.
This revision is now accepted and ready to land.Jun 3 2014, 9:28 AM
loladiro closed this revision.Jun 3 2014, 9:28 AM