GlobalISel/IRTranslator resetTargetOptions based on function attributes
authorPetar Avramovic <Petar.Avramovic@amd.com>
Tue, 15 Sep 2020 08:25:38 +0000 (10:25 +0200)
committerPetar Avramovic <Petar.Avramovic@amd.com>
Tue, 15 Sep 2020 08:26:09 +0000 (10:26 +0200)
commit9b4fa854343166dd88e4f2e135239bbf1ce0a16c
tree1a5e48ecec65be9dcce0e8a4008a580980e1e6a2
parent487412988cea99c94f2c58f8fa9eff34600fe684
GlobalISel/IRTranslator resetTargetOptions based on function attributes

Update TargetMachine.Options with function attributes before we start
to generate MIR instructions. This allows access to correct function
attributes via TargetMachine.Options (it used to access attributes of
the function that was translated first).
This affects some existing tests with "no-nans-fp-math" attribute.
Follow-up on D87456.

Differential Revision: https://reviews.llvm.org/D87511
llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
llvm/test/CodeGen/AMDGPU/GlobalISel/fmed3.ll
llvm/test/CodeGen/AMDGPU/GlobalISel/frem.ll