Landing: 170fcbba4c97

Project / Subsystem

gcc / middle-end

Date

2026-07-13

Author

Hu, Lin1

Commit

170fcbba4c97ea40750cc5c2fd0eb787311085f0

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
middle-end
patch_id
commit_hash
170fcbba4c97ea40750cc5c2fd0eb787311085f0
source_type
github
headline
Use correct mode for masked cbranch operand
tldr
Fixes an assertion failure related to vector boolean constants in masked operations.
author
Hu, Lin1
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • vectorization
  • optimization
discussion_id_link
bugzilla_pr
date
2026-07-13T00:00:00.000Z

This change corrects how the mode for masked cbranch operands is determined. Previously, it used GET_MODE on an expanded masked operation, which could incorrectly result in VOIDmode for vector boolean constants. The fix adjusts this to use TYPE_MODE of the operand, ensuring constants are materialized in the correct mask mode and preventing an assertion failure.