I'm totally not sure this is correct
I don't know the history of the frem instruction in IR, and the description in http://llvm.org/docs/LangRef.html#frem-instruction is vague.
But based on the existing code, I think this is working as intended. If the instruction has the same semantics as the math library function 'fmod', then we do want to convert this to an IR instruction in clang.
Note that when I filed PR34870, I assumed the bug was in the IR optimizer in the instcombine pass, but if the IR instruction does not match the semantics of the math library function, then I'd be wrong. :)