MCPcopy Create free account
hub / github.com/GoSSIP-SJTU/Armariris / ThreadBinOpOverPHI

Function ThreadBinOpOverPHI

lib/Analysis/InstructionSimplify.cpp:451–487  ·  view source on GitHub ↗

In the case of a binary operation with an operand that is a PHI instruction, try to simplify the binop by seeing whether evaluating it on the incoming phi values yields the same result for every value. If so returns the common value, otherwise returns null.

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 7

SimplifyMulInstFunction · 0.85
SimplifyDivFunction · 0.85
SimplifyRemFunction · 0.85
SimplifyShiftFunction · 0.85
SimplifyAndInstFunction · 0.85
SimplifyOrInstFunction · 0.85
SimplifyBinOpFunction · 0.85

Calls 4

ValueDominatesPHIFunction · 0.85
SimplifyBinOpFunction · 0.85
assertFunction · 0.50
incoming_valuesMethod · 0.45

Tested by

no test coverage detected