LuoYuanke added inline comments.
================ Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:1920 + setOperationAction(ISD::STRICT_FTRUNC, VT, Legal); + setOperationAction(ISD::FRINT, VT, Legal); + setOperationAction(ISD::STRICT_FRINT, VT, Legal); ---------------- craig.topper wrote: > LuoYuanke wrote: > > Does this node means "round to int"? What's the difference to "FNEARBYINT"? > rint and nearbyint are both C math library functions. rint raises an > exception if the rounding isn't exact, nearbyint doesn't. Got it. Thanks. :) ================ Comment at: llvm/lib/Target/X86/X86InstrFoldTables.cpp:3037 { X86::VSQRTSDr_Int, X86::VSQRTSDm_Int, TB_NO_REVERSE }, + { X86::VSQRTSHZr, X86::VSQRTSHZm, 0 }, + { X86::VSQRTSHZr_Int, X86::VSQRTSHZm_Int, TB_NO_REVERSE }, ---------------- craig.topper wrote: > LuoYuanke wrote: > > Why no TB_NO_REVERSE for it? > Only the _Int need TB_NO_REVERSE because the memory type is 16 bits but the > register class is VR128X so the sizes are different. The unfolding code would > use the size of the register class to do the unfold and create a > vmovaps/vmovups which would increase the size of the load. > > For VSQRTZr, the register class is FR16X and the memory size is 16 bits so > they match. Got it. Thanks. :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105267/new/ https://reviews.llvm.org/D105267 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits