OSDN Git Service

[Constant] remove fdiv and frem from canTrap()
authorSanjay Patel <spatel@rotateright.com>
Mon, 29 Aug 2016 15:27:17 +0000 (15:27 +0000)
committerSanjay Patel <spatel@rotateright.com>
Mon, 29 Aug 2016 15:27:17 +0000 (15:27 +0000)
commitae5557cf0a7758451c0be46cbfdd2d1e3146d56d
treec307498a14c98ca88b37d77c01588574088772cb
parentd00367231d65ef2a69f32368f54a0be28c29629c
[Constant] remove fdiv and frem from canTrap()

Assuming the default FP env, we should not treat fdiv and frem any differently in terms of
trapping behavior than any other FP op. Ie, FP ops do not trap with the default FP env.

This matches how we treat the fdiv/frem in IR with isSafeToSpeculativelyExecute() and in
the backend after:
https://reviews.llvm.org/rL279970

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@279973 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Constants.cpp
test/Transforms/SimplifyCFG/ConditionalTrappingConstantExpr.ll