Page MenuHomePhabricator

[FPEnv][X86] Implement lowering of llvm.set.rounding
Needs ReviewPublic

Authored by sepavloff on Feb 17 2020, 10:26 AM.

Event Timeline

sepavloff created this revision.Feb 17 2020, 10:26 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 17 2020, 10:26 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
craig.topper added inline comments.Feb 17 2020, 10:50 AM
llvm/lib/Target/X86/X86ISelLowering.cpp
25790

Why do we need an APInt?

25859

Why do we need an APInt?

25873

Removed commented out code.

30125

Where did FNSTSW16r come from? I deleted that recently.

llvm/lib/Target/X86/X86ISelLowering.h
660

STMXCSR/LDMXCSR aren't used.

craig.topper added inline comments.Feb 17 2020, 11:14 AM
llvm/lib/Target/X86/X86ISelLowering.cpp
25774

I have no idea why FLT_ROUNDS calls TFI.getStackAlignment() to get the second parameter here. It should just be 4.

Modified patch according to reviewer's notes

sepavloff marked 7 inline comments as done.Feb 18 2020, 12:00 AM
sepavloff added inline comments.
llvm/lib/Target/X86/X86ISelLowering.cpp
25774

Changed here but implementation of LowerFLT_ROUNDS_ was not changed.

RKSimon added inline comments.Feb 18 2020, 6:45 AM
llvm/lib/Target/X86/X86ISelLowering.cpp
30125

FNSTSW16r was removed at D73863, but FNSTCW16m stayed