the llvm cos intrinsic currently does not propagate undef's. This change transforms cos(undef) to null value or 0.
There are 2 test cases added as well.
Differential D18863
Propagate Undef in llvm.cos Intrinsic anna on Apr 7 2016, 8:18 AM. Authored by
Details the llvm cos intrinsic currently does not propagate undef's. This change transforms cos(undef) to null value or 0. There are 2 test cases added as well.
Diff Detail Event Timeline
Comment Actions LGTM pending a minor comment inline. Let me know once you're ready for me to commit this for you.
Comment Actions updated based on Sanjoy's comment to place the check in the first test after the cos(undef) itself |
Since you're not using Op, using isa instead of dyn_cast is better.