Landing: 649b2a6d9f9f

Project / Subsystem

gcc / gcc

Date

2026-07-08

Author

Jeff Law

Commit

649b2a6d9f9f1a29f7f26199b7b3ebbaeef3c634

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc
patch_id
commit_hash
649b2a6d9f9f1a29f7f26199b7b3ebbaeef3c634
source_type
github
headline
Fix dest = cond ? x : -1 when STORE_FLAG_VALUE is -1
tldr
Bug fix in GCC's if-conversion optimization corrects handling of conditional assignments to -1 when STORE_FLAG_VALUE is -1.
author
Jeff Law
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • optimization
  • bugfix
  • m68k
discussion_id_link
bugzilla_pr
date
2026-07-08T00:00:00.000Z

A bug in GCC’s ifcvt.cc pass, affecting conditional assignments of the form dest = cond ? x : -1, has been fixed. The issue occurred when STORE_FLAG_VALUE was set to -1, leading to incorrect tense handling in the generated code. This commit corrects the logic for platforms like m68k and gcn, ensuring accurate conditional assignments in such scenarios.