spavloff wrote: > Any instruction that returns a floating-point value can have fast-math flags > attached to it, and because we need to check the fast-math flags on input > operands, the select instruction generated by the conditional operator needs > the flags set when fast-math is enabled. That's happening in the general > case, but it isn't currently being modified correctly in the presence of > pragmas.
Clang should not need similar workaround. FP pragmas have block scope, so their effect should be recorded in CompoundStmt. When entering this scope IRBuilder must be tuned according to FPOptions, stored in CompoundStmt. Now the code that tunes IRBuilder is absent, if we add it, it should implement the required behavior. https://github.com/llvm/llvm-project/pull/105912 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits