This is an archive of the discontinued LLVM Phabricator instance.

[msan] Improve handling of Intrinsic::is_fpclass after c55fffe
ClosedPublic

Authored by vitalybuka on Apr 28 2023, 3:19 PM.

Details

Summary

c55fffe replaced fcmp with fpclass.

declare i1 @llvm.is.fpclass(<fptype> <op>, i32 <test>)
declare <N x i1> @llvm.is.fpclass(<vector-fptype> <op>, i32 <test>)

Perfect fix will require checking bits of <op> corresponding to <test>
argument. For now just propagate shadow without reporting before
intrinsic. Still existing handling of fcmp is also simple OR, so it's
not making it worse.

Diff Detail

Event Timeline

vitalybuka created this revision.Apr 28 2023, 3:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2023, 3:19 PM
vitalybuka requested review of this revision.Apr 28 2023, 3:19 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 28 2023, 3:19 PM
vitalybuka edited the summary of this revision. (Show Details)Apr 28 2023, 3:21 PM
vitalybuka added a reviewer: arsenm.
vitalybuka added inline comments.Apr 28 2023, 3:29 PM
llvm/test/Instrumentation/MemorySanitizer/create-class-from-logic-fcmp.ll
4

Maybe better to move into original create-class-from-logic-fcmp.ll ?

fix condition

simplify test

eugenis accepted this revision.Apr 28 2023, 4:09 PM
This revision is now accepted and ready to land.Apr 28 2023, 4:09 PM
This revision was landed with ongoing or failed builds.Apr 28 2023, 4:27 PM
This revision was automatically updated to reflect the committed changes.