add tem q ir

(cherry picked from commit a37bc3ade7882d5e950464bb29b78e989a170829)