This is an archive of the discontinued LLVM Phabricator instance.

AMDGPU/SI: Correctly encode constant expressions
ClosedPublic

Authored by tstellarAMD on Jun 10 2016, 12:18 PM.

Details

Summary

We we have an MCConstantExpr, we can encode it directly into the instruction
instead of emitting fixups.

Diff Detail

Event Timeline

tstellarAMD retitled this revision from to AMDGPU/SI: Correctly encode constant expressions.
tstellarAMD updated this object.
tstellarAMD added a subscriber: llvm-commits.
artem.tamazov accepted this revision.Jun 10 2016, 12:22 PM
artem.tamazov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Jun 10 2016, 12:22 PM
artem.tamazov added inline comments.Jun 10 2016, 12:46 PM
lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp
168

BTW, is it possible to use MCExpr::evaluateAsAbsolute() to to get a "constant" (i.e. known during assembly time) value?

lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp
168

Maybe, I will look into this and do a follow on patch.